Closed OussCHE closed 1 year ago
This is a case where the Excel and C++ APIs differ. It's documented in the dev guide but hard to find if you're not sure what to look for.
Try this:
bdh('OAH3 Comdty', fields = 'PX_LAST', start.date = '20221226', end.date = '20221226',
options = c(nonTradingDayFillOption="ALL_CALENDAR_DAYS", nonTradingDayFillMethod="PREVIOUS_VALUE"))
Thank you @johnlaing , It actuallty worked for a lot of products, but for some , it didn't work e.g:
blpConnect()
K <-bdh('/isin/AU2CLT240335', fields = 'PX_LAST', start.date = '20221226', end.date = '20221226',
options = c(nonTradingDayFillOption="ALL_CALENDAR_DAYS", nonTradingDayFillMethod="PREVIOUS_VALUE"))
I still receive NA. I guess some Aussies have weird holidays :)
That one works ok for me too. Possibly it is something with your settings. Does it work in Excel? This might be a question for the helpdesk.
I am actually getting plain wrong value, when I ask for Last Price ,I am getting the Yield.I will ask the helpdesk about the reason.
When pulling historical data (bdh),I am trying to replace the N/A when I have holidays (or unavailable values) with the last available quote.
For example,
The values are NA,I try to get the last available value, so I added the following options parameter
It should be known that using EXCEL the previous solution works " BDH("OAH3 COMDTY"; "PX_LAST"; "26/12/2022"; "26/12/2022"; "days"; "A"; "FILL"; "P") "
I also tried the following solutions but they also didn't work.