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?

Tagged:

Best Answer

  • @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.


Answers