Hi Optuma,
I am trying to write a script for calculating earnings per share (EPS) growth to use in a watchlist, however I have some uncertainty as to if I am getting the previous period EPS and if I am using the script caching [] function correctly.
It is my understanding that the "Earnings per Share - Fiscal Period" fundamental data in Optuma is for the fiscal 12 month period, the fiscal period can not be overridden, and is updated every six months as companies report. That is, the EPS data is for the trailing 12 month period and the data updates every 6 months.
On this understanding, I am using the following script to calculate EPS growth % for a one year period.
// Earnings per Share - Fiscal Period as updated every 6 month period
EPS=DATAFIELD(Month(PERIODAMOUNT=6), FEED=FD, FIELD=EPS);
// to calculate the most recent period EPS
EPS1=EPS[1];
// to calculate the EPS for the pervious 12 month period i.e. [1] is current period, [2] would be previous data update 6 months ago, [3] is 12 months ago
EPS3=EPS[3];
// to calculate EPS (Earnings per share) growth 1 yr (%)
EPSgrowth1yr%=(( (EPS1-EPS3)/EPS3)*100);
EPSgrowth1yr%
Appreciate any comments or corrections.
Kind regards,
Daniel