Closed calik97 closed 3 years ago
If I recall correctly that is in fact a 'feature' of bonds. Check the docs, there are price-related fields available, try requesting one of those.
Well, the issue is that if I choose a different Bond the output is fine. For instance: bdh('GB00BK5CVX03 Govt', "PX_LAST", as.Date('2005-04-27'), as.Date('2021-03-29'))
@eddelbuettel is correct. It looks like EK783758 is a JGB, which is probably yield quoted. I no longer have a terminal so cannot verify this.
The parameter to change is: should be pricingOption=PRICING_OPTION_PRICE.
This is a legacy component of how bonds price, as opposed to how Bloomberg handles them.
How could I access the documentation and change that parameter? I was struggling a lot and did not find a way to do it.
Bloomberg documentation is at their website. Our documentation has links.
Our code is documented here as well as in the package you installed to run. Try help(bdh)
for a start, I am sure we have examples in different places on how to set options.
Finally, it works. Thank you very much for your help. That made the trick:
bdh('EK783758 Corp', 'PX_LAST', as.Date('2005-04-27'), as.Date('2021-03-29'),
options = c("pricingOption"="PRICING_OPTION_PRICE"))
That function instead of showing the Last Price of this security, shows the Yield. Do you know how to fix it?
bdh('EK783758 Corp', "PX_LAST", as.Date('2005-04-27'), as.Date('2021-03-29'))