question

Upvotes
Accepted
21 0 0 1

Daily data being retrieved despite using a quarterly frequency

Hi Team,

I have a client who is new to DSWS.  He is using the below request and wants just one datapoint for each month.  Instead he is retrieving the data at a daily frequency (see code and output below).  
This is economics data (GDP) which is published quarterly.   I have run the same request but I get the data back quarterly as expected.  Please can you advise what has gone wrong here?

ds.get_data(tickers='USGDP...B,EKCGDP..A', fields=['X'], start=’2002-09-16’, end=’-0D’, freq=’Q’)
But client still gets the data for each day, instead for each quarter :
|Date      |USGDP...B            |EKCGDP..A    
+----------+--------------------+---------------------+

|2002-08-15|10984.04            |1860.823             |

|2002-08-16|11061.433           |1991.025             |

|2002-08-17|11061.433           |1991.025             |

|2002-08-18|11061.433           |1991.025             |

|2002-08-19|11061.433           |1991.025             |

|2002-08-20|11061.433           |1991.025             |

|2002-08-21|11061.433           |1991.025             |

|2002-08-22|11061.433           |1991.025             |

|2002-08-23|11061.433           |1991.025             |

|2002-08-24|11061.433           |1991.025             |        

Thanks in advance,
Alison


  


 
datastream-apidsws-apidatastreameconomic-data
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
21 0 0 1

Hi @zoya faberov ,

Just to let you know that the client has found some old code between the API call and the moment they saved the call data on their Big Data space which is changing the frequency.

Therefore the issue is not our end.

Thanks for your help and suggestions,

Alison

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
31.7k 37 11 19

Hello @Alison Quick1 ,

When copying and pasting the request, I have noticed that some of the quotes in the request are not of the right type and are not applied, all quotes have to be of the correct type '. On my side the request does not even run "as is" in Jupyter, before I correct the quotes. In a different editor, it may still run, but not be applied. Could this be the issue?

Otherwise, the request returns the result as quarterly, for me as well, not daily.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
21 0 0 1

Hi Zoya, Thanks for your help. I found the same thing - on my side (in Jupyter) it didn't like the 0 in 09 and I ended up rewriting rather than copying and pasting. As the request actually returned data in the clients request, I would have thought that the mainframe was recognising the code.

I will send him my code and ask him to try that but I'm not sure it would make any difference. I will keep you posted!

Thanks,

Alison

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.