PERCENT_CHG function not working

I'm using the Percent_chg function in TR excel formula. It's working fine in excel, but it's not available in python. How can I solve this? Is there a workaround for this?

df, err = ek.get_data("AAL.V",
['TR.PriceClose.date','TR.PriceClose','TR.COMPANYSHARESOUTSTANDING','TR.COMPANYMARKETCAP','TR.TOTALRETURN1D','PERCENT_CHG(TR.PriceClose,lag=-1D)'
],{'Sdate':'2020-01-01','Edate':'2020-05-01','FRQ':'D','CURN':'USD','SORTA':'TR.PriceClose.date'})
df

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    @Patricia.Pascual, @chavalit-jintamalit
    PERCENT_CHG and other functions found under Parameters & Quick Functions in Formula Builder wizard in Eikon Excel can indeed be used with Eikon Data APIs.
    @Patricia.Pascual, I'm not sure what you mean when you say it's not available in Python. The exact expression you put on this thread works for me and returns the same data as the equivalent expression in Eikon Excel. What does it return for you?
    P.S. Make sure you use the latest version of EDAPI for Python library.

Answers