I am trying to get a time series request to return month end values. At the moment it returns the value on the same day of the month as when I run the script. This is what my script looks like:
AB.10Y <- dsws$timeSeriesRequest(instrument = "ABND10Y",
datatype = "",
startDate = "-2Y",
endDate = "-0D",
frequency = "M")
So if I run it on the 16th it will give me the value on the 16th of each month, but I want the value from month end of each month. How can I set it do give me these results?
You can use an absolute date instead of a relative date.
data <- mydsws$timeSeriesRequest(instrument = "ABND10Y", datatype="", startDate="2017-01-31", endDate="-0D", frequency="M")