How to assign boolean value to parameter? #40
Unanswered
yiyun-chen-wim
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thank the team for the wonderful project!!! And thank you for anyone who can help!!
I have a question to assign Ture/False to the parameter.
Using xbbg, the following request returns an empty dataframe:
blp.bdh('IBM US Equity','px_last','20200101','20200105', returnRelativeDate=True)
But using Bloomberg python API directly, it returns the desired values:
request = refDataService.createRequest("HistoricalDataRequest")
request.getElement("securities").appendValue("IBM US Equity")
request.getElement("fields").appendValue("PX_LAST")
request.set("startDate", "20210101")
request.set("endDate", "20210105")
request.set("returnRelativeDate", "TRUE")
{
securityData = {
security = "IBM US Equity"
eidData[] = {
}
sequenceNumber = 0
fieldExceptions[] = {
}
fieldData[] = {
fieldData = {
date = 2021-01-01
RELATIVE_DATE = "2020 Q4"
}
fieldData = {
date = 2021-01-02
RELATIVE_DATE = "2020 Q4"
}
fieldData = {
date = 2021-01-03
RELATIVE_DATE = "2020 Q4"
}
fieldData = {
date = 2021-01-04
RELATIVE_DATE = "2020 Q4"
PX_LAST = 120.954200
}
fieldData = {
date = 2021-01-05
RELATIVE_DATE = "2020 Q4"
PX_LAST = 123.101200
}
}
}
}
Beta Was this translation helpful? Give feedback.
All reactions