question

Upvotes
Accepted
5 3 3 5

Excluding holidays within ds.get_data call

start_date_qtr = '2021-03-31'

end_date = '2021-06-30'


Return_Series=ds.get_data (tickers='S&PCOMP', fields['PCH(X(RI),-1D)','RI'], start=start_date_qtr, end=end_date, kind=1)


I have the above time series call for Q2 (March 31, 2021-June 30, 2021) and I notice that April 2, 2021 comes up as having zero as return value and the same RI as April 1, 2021 (because April 2, 2021 was Good Friday and the market was closed).

How can i exclude holidays within the get_data call? Or do i have to take care of this with general python functions? Thanks.




datastream-apidsws-apidatastream
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.

Hello @jason.miller ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Upvotes
Accepted
79.2k 251 52 74

@jason.miller

I found the Non-trading days in Datastream article.

According to that article, the code looks like this:

Return_Series=ds.get_data (tickers='S&PCOMP', fields=['PCH#(X(RI#S),-1D)','RI#S'], start=start_date_qtr, end=end_date, kind=1)

However, it is better to contact the Refinitiv Datastream Web Service directly via MyRefinitiv to confirm it.

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
5 3 3 5

great thank you very much

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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