I wanted to get the latest UK Policy Rate prior to a certain date so I did this
ds.get_data(tickers="UKPRATE.", start="-1M", end="20260528", freq="M")
But you get an error response $$ER: 0628,UKPRATE. NO ECONOMIC DATA
However if you do this
ds.get_data(tickers="UKPRATE.", start="-1M", end="20260528", freq="M") the response is
2026-04-30 3.75
2026-05-29 Missing Value
At some point the may data point will be populated and my first attempt will stop failing.
I also tried
ds.get_data(tickers="UKPRATE.", start="-0M", end="20260528", freq="M")
where I got an error Invalid Dates. Start date must be earlier than or same as end date.
What I am after is the latest data point for a series bounded by an end-date.
The -2M thing works but you have to write code to sort a df and get teh latest non nan value.