question

Upvotes
Accepted
66 3 4 7

How to use Datastream formula that exceeds 45 characters without creating Expression in DSWS

I'm trying to use REGB#(PCH#(CFM#(ASXAORD,VAL),1M),PCH#(CFM#(X,VAL),1M),60M) , but due to char limit, i had to build expression 'E3BT' from below in DSWS.

beta_DS = ds.get_data(tickers='<BHP.AX>', fields = ['E3BT'], kind=0)

beta_WS, err = ek.get_data(['BHP.AX'], [ 'TR.BetaFiveYear'])

print(beta_DS)

print(beta_WS)


Is there a way to use the formula without having to create an Expression?

#productdsws-api
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.

1 Answer

· Write an Answer
Upvotes
Accepted
76.8k 239 52 72

@bob.kim

It should be the limitation in the API when requesting static data.

However, the same formula works fine with timeseries data.

df = ds.get_data(tickers='<BHP.AX>',fields=['REGB#(PCH#(CFM#(ASXAORD,VAL),1M),PCH#(CFM#(X,VAL),1M),60M)'],kind=1,freq='M')
df

1697428166138.png

Please contact the Datastream Webservice support team directly via MyRefinitiv to verify this limiation.



1697428166138.png (13.0 KiB)
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.

Thanks Jira!

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.