How might I create an indicator for peg? Thanks Mike
Size:
Color:
An example in pseudocode is found on this page:
YCharts Fundamental Data for Securities and Economic DataP/EG Ratio = (Close / "[yc] eps") / "[yc] eps_growth"
To get the PEG, you divide a price DataSeries (e.g. Bars.Close) by a
EPS FundamentalDataSeries and then by an annualized
EPS Growth FundamentalDataSeries. The items for YCharts are shown above; I don't know what they are for the Fidelity data. Assuming that you're a YCharts subscriber and have updated the fundamental data as per the User Guide, something like this should do (on-the-fly coding):
CODE:
Please log in to see this code.
Note that the PEG Ratio uses annualized EPS growth series. I'm not sure if the respective YCharts item is annual or quarterly but in the latter case you can annualize it with this overloaded call:
CODE:
Please log in to see this code.
i.e. instead take "FundamentalDataSeries("[yc] eps_growth", 4, 0)" to aggregate the last 4 quarters (and not to offset).
Size:
Color:
Thank you.
Size:
Color: