question

Upvotes
Accepted
5 2 1 4

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.

Upvotes
Accepted
47.2k 109 44 60

@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 2 1 4

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.