-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bdp function returns error for BID_YIELD #148
Comments
This may just be a vanilla error on the Bloomberg side in that is 'lies' to us about the field type. Or ... it may just be you being behind the most recent version 0.3.3. The current version works for me: R> bdp("EJ421905 Corp", "BID_YIELD")
BID_YIELD
EJ421905 Corp -0.021369
R> So I guess we can close this. |
locale: attached base packages: other attached packages: loaded via a namespace (and not attached): I should be running all the latest versions, have to try something different. Could it have something to do that I have finnish settings? or can you post sessioninfo() so I could think some way to modify my session? Sorry if I don't understand what is Vanilla error from bloomberg side, but how could I fix that? If not I will close this one, as it seems to work for you. |
That is strange. I actually added a 'verbose' option. I'll send your updated source to win-builder and post the link here once it has built. You can then try |
ok, thanks. Will wait for the link and see what we get then. |
Here it is:
This may have something to do with the underlying version / release of the Bloomberg object code. Here is what I get now: R> bdp("EJ421905 Corp", "BID_YIELD", verbose=TRUE)
ReferenceDataResponse = {
securityData[] = {
securityData = {
security = "EJ421905 Corp"
eidData[] = {
}
fieldExceptions[] = {
}
sequenceNumber = 0
fieldData = {
BID_YIELD = -0.015399
}
}
}
}
BID_YIELD
EJ421905 Corp -0.015399
R> |
Weird. Same message, different behavior. On Windows: > bdp("EJ421905 Corp", "BID_YIELD", verbose=TRUE)
ReferenceDataResponse = {
securityData[] = {
securityData = {
security = "EJ421905 Corp"
eidData[] = {
}
fieldExceptions[] = {
}
sequenceNumber = 0
fieldData = {
BID_YIELD = -0.015399
}
}
}
}
Error: Attempt to access value of element 'BID_YIELD'(type: 'Float64') as 'bool' type. Checking why this is happening: > fieldInfo("BID_YIELD")
id mnemonic datatype ftype
BID_YIELD RQ057 BID_YIELD Float Real but that's the same as we see on LInux |
bdp("EJ421905 Corp", "BID_YIELD", verbose=TRUE) Here is what I got. Not sure if I'm doing everything correctly, but installed 0.3.3.1 from the link and then run the code. (First time ever handeling something like this). So seems it is giving similar response, but just don't go all the way (my two cents). just saw answer above, I'm fairly new to R but at least I'm not totally crazy. |
That makes it a valid bug report. Let us mull this over. |
Thank you and really enjoy the package, so thanks for doing stuff for us. |
I think we have 3.8.8.1 everywhere. I'll try adding a function which emits the API version -- that is usually available in a header somewhere. |
OK, here we are. So, this seems like it's working on Linux: > (x <- bdp("EJ421905 Corp", "BID_YIELD"))
BID_YIELD
EJ421905 Corp -0.015399 Looks good. But is it? > x$BID_YIELD
[1] "-0.015399" Wait! That's a string. Hmmmm. Bloomberg tells us this is a Float, but we actually don't handle Float! From const std::map<std::string, DatatypeT> stringToDatatypeT {
{"Bool",DatatypeT::Bool},{"Datetime",DatatypeT::Datetime},{"Double",DatatypeT::Double},{"Int32",DatatypeT::Int32},{"Int64",DatatypeT::Int64},{"String",DatatypeT::String}
}; We do a |
Same thing could be happening with COUPON_RT. bdp("EJ421905 Corp", "COUPON_RT") |
Thank You. Now maybe a stupid question but this correction will be available in next package update? or how does it work? Maybe I learn something of package development at the same time. |
I already submitted a new build request to win-builder to have a Windows binary -- with the new code -- produced you can test. And yes, this will be in 0.3.4 (or whatever number the next release gets) but we don't yet know when we will release that. |
Please try this link for a windows build off the current (and hopefully fixed) sources. |
Yeah, works with package from that Link, and thanks for info. |
Is there possibility to contribute/help constructing this package? I'm fairly new to R but maybe I could learn some simple task? For example, I feel like there is some fields missing that I use in Fixed Income. I could try to help, if adding fields is easy? |
Yes it is! This thread is in a so-called 'issue' ticket. You can browse existing ones, both open (which includes some that need work) and closed (both work that has been done as well as things that were discussed but rejected). Generally you would make a copy of the project ("fork it"), work out your changes and then submit a pull request. We generally prefer an issue ticket discussion prior to an unsolicited pull request. And documentation, tests, .... are welcome too. Maybe start by locally rebuilding the package. |
Ok, will try to expand my knowledge. Thanks. |
bdp("EJ421905 Corp", "BID_YIELD")
Error: Attempt to access value of element 'BID_YIELD'(type: 'Float64') as 'bool' type
trying to understand that error, could someone give insights?
Both of these fields work:
"MTY_YEARS_TDY"
"ASSET_SWAP_SPD_MID"
RQ057 BID_YIELD Bid Yield
is found with fieldSearch(), is it maybe that field is real-time?
maybe correction would be to add additional fields to package, which are not real-time fields:
YLD_YTM_BID
YLD_YTM_MID
YLD_YTM_ASK
-Markku
The text was updated successfully, but these errors were encountered: