Serving the Quantitative Finance Community

 
User avatar
bluewave
Topic Author
Posts: 2
Joined: February 10th, 2011, 5:30 pm

Need Help on Bloomberg API

December 3rd, 2011, 1:12 am

Hi,I am trying to develop a BDH to download the running history of GDP CYOY Index for the past 30 days.=BDH("GDP CYOY Index","PX_LAST",TODAY()-30,TODAY(),"Dir=V","Dts=H","Sort=A","Quote=C","QtTyp=Y","Days=A","Per=cd","DtFmt=D","Fill=P","UseDPDF=Y","cols=1","cols=1;rows=31")It returns #N/A N/As.The formula works well for SPX Index, but not quarterly data like GDP CYOY Index. I remember it worked before when we set the number of days to a higher number. But currently I need to track only the past 30 days, and when there's no updated data then I want to to return the last non-N/A data. I know BDH functions allow this but some how I can't get it to return the data.Can any one help me to fix this?
Last edited by bluewave on December 2nd, 2011, 11:00 pm, edited 1 time in total.
 
User avatar
bluewave
Topic Author
Posts: 2
Joined: February 10th, 2011, 5:30 pm

Need Help on Bloomberg API

December 5th, 2011, 6:47 am

I don't have access to the help desk.Can any one please help?
 
User avatar
bearish
Posts: 5906
Joined: February 3rd, 2011, 2:19 pm

Need Help on Bloomberg API

December 5th, 2011, 11:16 am

That is very odd. You are working on a spreadsheet that will only work on a computer where a user is logged in to BBG, yet you don't have access to the help desk?
 
User avatar
EndOfTheWorld
Posts: 4
Joined: September 30th, 2008, 8:35 am

Need Help on Bloomberg API

December 5th, 2011, 12:28 pm

last price is 30sep11
 
User avatar
bluewave
Topic Author
Posts: 2
Joined: February 10th, 2011, 5:30 pm

Need Help on Bloomberg API

December 5th, 2011, 1:46 pm

Yes, because I am writing this spreadsheet on a non-bloomberg computer for someone else whose company has the terminal but he only knows how to use Excel.Please help.QuoteOriginally posted by: bearishThat is very odd. You are working on a spreadsheet that will only work on a computer where a user is logged in to BBG, yet you don't have access to the help desk?
Last edited by bluewave on December 4th, 2011, 11:00 pm, edited 1 time in total.
 
User avatar
bluewave
Topic Author
Posts: 2
Joined: February 10th, 2011, 5:30 pm

Need Help on Bloomberg API

December 5th, 2011, 1:47 pm

But I remember when I generated this formula I selected "use the last non-N/A value when there's no data". Shouldn't this return me the 30sep11 number?QuoteOriginally posted by: EndOfTheWorldlast price is 30sep11
Last edited by bluewave on December 4th, 2011, 11:00 pm, edited 1 time in total.
 
User avatar
EndOfTheWorld
Posts: 4
Joined: September 30th, 2008, 8:35 am

Need Help on Bloomberg API

December 5th, 2011, 4:04 pm

in that case you will get the non NA between today and the 5th of Nov, which is no data
Last edited by EndOfTheWorld on December 4th, 2011, 11:00 pm, edited 1 time in total.
 
User avatar
bluewave
Topic Author
Posts: 2
Joined: February 10th, 2011, 5:30 pm

Need Help on Bloomberg API

December 6th, 2011, 2:04 am

Shouldn't the forumla also return the sep30 data for the dates between sep30 to today (when there's no data)?QuoteOriginally posted by: EndOfTheWorldin that case you will get the non NA between today and the 5th of Nov, which is no data
Last edited by bluewave on December 5th, 2011, 11:00 pm, edited 1 time in total.
 
User avatar
bluewave
Topic Author
Posts: 2
Joined: February 10th, 2011, 5:30 pm

Need Help on Bloomberg API

December 7th, 2011, 7:43 am

Anyone?Thanks.
 
User avatar
MHill
Posts: 21
Joined: February 26th, 2010, 11:32 pm

Need Help on Bloomberg API

December 7th, 2011, 11:52 am

It seems that the "Filll=P" only works for the following calendar month.So for your quarterly series, if your start date is anywhere from 30 Sep to 31st Oct, the value as at 30 Sep will be returned, and carried forward.Using today()-30 gives you a date in November, so Bloomberg returns "n/a", then carries this value forward.You either need to change your date range, or the way you collect the data. I don't think you'll get an easy fix.
 
User avatar
bluewave
Topic Author
Posts: 2
Joined: February 10th, 2011, 5:30 pm

Need Help on Bloomberg API

December 8th, 2011, 12:38 am

Would it work if I remove "Filll=P"?Thanks!QuoteOriginally posted by: MHillIt seems that the "Filll=P" only works for the following calendar month.So for your quarterly series, if your start date is anywhere from 30 Sep to 31st Oct, the value as at 30 Sep will be returned, and carried forward.Using today()-30 gives you a date in November, so Bloomberg returns "n/a", then carries this value forward.You either need to change your date range, or the way you collect the data. I don't think you'll get an easy fix.
 
User avatar
MHill
Posts: 21
Joined: February 26th, 2010, 11:32 pm

Need Help on Bloomberg API

December 8th, 2011, 12:13 pm

I don't have access to check just now, but I don't think that will work. As you're no longer carrying forward data, I would expect it to return 'n/a' for each day as there are no set values for those dates.