This is my first message. I am very confused.
I have been trying to establish a formula to get median 10 years price/earnings ratio. If anyone help ?
Thank you in advance. Regards, aLL_oFFs
This is my first message. I am very confused.
I have been trying to establish a formula to get median 10 years price/earnings ratio. If anyone help ?
Thank you in advance. Regards, aLL_oFFs
Here is a 1st approximation to start:
LoopMedian(âclose(CTR*252)/EPSExclXor(CTR,ANN,FALLBACK)â,10)
Apparently only EPS (not PE) offers an annual offset going back 10 years, so must divide it into closing price.
Iâd prefer an average (SMA) vs the close, but its offset can only go back 500 bars, about 2 years.
LoopMedian function iterates over formula for CTR going from 0 to 9 (years back).
Most years have 252 trading days, (e.g. 2017 is 251), so closing price will slip one day once in a while.
Try to stick to the predefined factors as much as possible to avoid problems. The approach below may not work in some cases. In this case PEExclXorTTM is a good candidate because itâs not affected by splits.
Try this:
Create a custom formula $PEHist defined as FHist(âPEExclXorTTMâ,CTR)
Next start a new screen to test and enter these rules
Ticker(âibmâ)
Showvar(@pemedian, LoopMedian(â$PEhistâ,3,0,52,TRUE,TRUE))
showvar(@pe0, PEExclXorTTM )
showvar(@pe1, FHist(âPEExclXorTTMâ,52) )
showvar(@pe2, FHist(âPEExclXorTTMâ,52*2) )
When you run this screen and set the report to be âScreen Factorsâ you will see in the column @pemedian IBMâs median PE for the past three yearly samples. Please see the documentation for FHist & LoopMedian
Let me know if you need more assistance
Thanks a lot
Hi Marco,
Sorry to bother you again. I just needed 10 years median PE and I put 10 take place 3 at the following formula you specified.
Showvar(@pemedian, LoopMedian(â$PEhistâ,10,0,52,TRUE,TRUE)
I just got the same result like 3 years. Is it possible to see 10 year Median pe ?
It changes for me in at least one case. The calculation of the median using the form that is in the @pemedian function stops when it encounters a meaningless PE, so itâs not going to change in every case.
I hate to contradict my boss, and do so with the utmost in respect and caution, but I wouldnât use his method. I would use sglinskiâs.
First, itâs simpler. Thereâs a lot to be said for that when Iâm not sure that the extra effort is rewarded here.
Question: How, exactly, is Steve Jobâs release of the iPhone 3GS in 2009 affecting the price of AAPL today?
Thatâs exactly what youâre doing when youâre looking at the P/E of 10 years ago in your formula. One can make a case that Appleâs brand was getting more valuable or that its innovation pace has waned, but both of those are analysis over time, and youâre not doing that. Youâre giving equal footing to the valuation of 10 years ago and of yesterday.
Remember that the markets are pricing stocks based on two things: Present total assets (the starting point) and projected growth of those assets through business operations. I get the idea of trying to test if a stock is expensive relative to historical valuation, but three years ago is already ancient history for this purpose. I personally wouldnât be looking back more than a year.
Finally, I think â and I could be wrong here â that the use of FHist is unnecessary in this case mathematically. If a company splits, the same ratio would be applied to numerator and denominator, so the PE should be more or less unaffected. Thatâs for a simple split, of course, but if a company does some more complicated M&A activity then the whole analysis goes out the window anyway. I would also note that we canât easily detect those situations from the data.
Actually, thinking about it, I would include a check to make sure that youâre using only positive EPS, though. Use this rule:
LoopMedian("Eval(EPSExclXor(CTR,ANN)>0,close(CTR*#year)/EPSExclXor(CTR,ANN),NA)",3)
Change the final three to any number between 1 and 10.
I would use this rule to test only over the last year:
LoopMedian("Eval(EPSExclXor(CTR/#year,TTM)>0,close(CTR)/EPSExclXor(CTR/#year,TTM),NA)",#year)
That takes the reading daily.
Hi pdmartino,
Thank you for your comments and formula. I agree with you companies can be different place when you compare 3-5 or 10 years. (New patents, acquiring companies at different sectors -it changes average pe, roe etc.)
I try to use median value to exclude negative earnings years and some unmeaningful peâs like 1500 or 3000 when the company make small yearly profit.
My point was ; Even best companies like AAPL, GS or BRKA can be valued less than their historical average (or median9 PE. Sometimes not good reasons. (General market decline, sector ruling changes (ex Coal Industry Or Pharma)
As you pointed out you can miss good fashionable companies with this screen because of their pe looks higher. On the other hand you might find best bargains in this basket like HOG, ESRX (last year) AYI, FDX, UPS (currently)
Once again thank you for your help RegardsâŚ