Financials - Comparing CompaniesHello All
For a while I have been working on this indicator to compare financials of the companies and sort them accordingly. Finally I completed and published it. I preferred using new object type feature in Pine language™ and I hope it might be an example and helpful for the developers.
First of all, as we have limitation on security calls, the indicator can get and compare financials for 5 companies only. also Chart time frame must be 1Day or higher! ( I recommend 1Day time frame ). if not then the indicator stops and shows the error message: "Please set the time frame 1Day or higher" . More important than others: You should choose the companies from the same sector! Compare apples to apples :)
The Financials in the indicator:
Earnings Per Share
Price to Earnings Ratio
Price to Sales Ratio
Price to Book Ratio
Profit Margin
Dept to Equity
Current Ratio
Market Capitalization
Also more information shown for each stocks:
Closing Price, sets the color accordingly
2 Simple/Exponential moving average, you can set the length, also it checks if it is rising/falling and sets the color accordingly
Volume info
Average volume (20 days), you can set the period
Currency for each security
Lets see some features in it:
it sorts the companies according to the financials:
If you move the mouse onto any header then it shows explanation about the financial:
You can change location and text size:
You can set the type of Moving averages as SMA or EMA and you can also set the length for both . Headers for both are changed automatically by MA type and length
Colors for Closing price and MA cells are set automatically:
For new Objects in Pine language click here
P.S. You can use this indicator while analyzing the financials of the companies in same sector/industry. So please don't ask for the alerts :)
Enjoy!
Pricetoearnings
Rule Of 20 - Fair Value Estimation by Inflation & Earnings (TG)The Rule Of 20 is a heuristic calculation to find the fair value of an asset or market given its earnings and current inflation.
Its calculation is straightforward: the fair multiple of the price or price-to-earnings ratio of a stock should be 20 minus the rate of inflation.
In math terms: fair_price-to-earnings_ratio = (20 - inflation) ; fair_value = current_price * fair_price-to-earnings_ratio / real_price-to-earnings_ratio
For example, if a stock or index was trading on 11 times earnings and inflation was 2%, then the theory would be that the fair price-to-earnings ratio would be 20-2 = 18, which is much higher than the real price-to-earnings ratio of 11, and hence the asset would be undervalued.
Conversely, a market or company that was trading on 18 times price-to-earnings ration when inflation was 8% was seen as overvalued, because of the fair price-to-earnings ratio being 20-8=12, hence much lower than the real price-to-earnings ratio of 18.
We can then project the delta between the fair PE and real PE onto the asset's value to obtain the projected fair value, which may be a target of future value the asset may reach or hover around.
For example, as of 1st November 2022, SPX stood at 3871.97, with a PE ratio of 20.14 and an inflation in the US of 7.70. Using the Rule Of 20, we find that the fair PE ratio is 20-7.7=12.3, which is much lower than the current PE ratio of 20.14 by 39%! This may indicate a future possibility of a further downside risk by 39% from current valuation levels.
The origins of this rule are unknown, although the legendary US fund manager Peter Lynch is said to have been an active proponent when he was directing the Fidelity’s Magellan fund from 1977 to 1990.
For more infos about the Rule Of 20, reading this article is recommended: www.sharesmagazine.co.uk
This indicator implements the Rule Of 20 on any asset where the Financials are availble to TradingView, and also for the entire SP:SPX index as a way to assess the wider US stock market. Technically, the calculation is a bit different for the latter, as we cannot access earnings of SPX through Financials on TradingView, so we access it using the QUANDL:MULTPL/SP500_PE_RATIO_MONTH ticker instead.
By default are displayed:
current asset value in red
fair asset value according to the Rule Of 20 in white for SPX, or different shades of purple/maroon for other assets. Note that for SPX there is only one calculation, whereas for other assets there are multiple different ways to calculate earnings, so different fair values can be computed.
fair price-to-earnings ratio (PE ratio) in light grey.
real price-to-earnings ratio in darker grey.
This indicator can be used on SP:SPX ticker, and on most NASDAQ:* tickers, since they have Financials integrated in TradingView. Stocks tickers from other exchanges may not provide Financials data, so this indicator won't work then. If this happens, try to find the same ticker on NASDAQ instead.
Note that by default, only the US stock market is considered. If you want to consider stocks or assets in other regions of the world, please change the inflation ticker to a ticker that reflect the target region's inflation.
Also adding a table to ease interpretation was considered, but then the Timeframe MTF parameter would not work, and since the big advantage of this indicator is to allow for historical comparisons, the table was dropped.
Enjoy, and keep in mind that all models are wrong, but some are useful.
Trade safely!
TG
Financial MetricsGives a sneak peak into some of the important financial ratios described below:
1. P/E : price to earnings ratio (Green when P/E<15)
2. PEG: Price to earnings growth ratio (Green when PEG<1)
3. P/S: Price to sales ratio (Green when P/S<2)
4. EV/FCF: Enterprise Value to Free Cashflow ratio
5. OPM: Operating Profit Margin % (Green when OPM>15%)
6. D/E: Debt to equity ratio (Green when D/E<1)
7. ROE: Return on equity % (Green when ROE>15%)
8. Div_Yield: Dividend yield
Disclaimer: All the limits defined are based on the widely accepted general values, but are subjective to particular sector or group of stocks. For example IT stocks command higher valuation than cyclical stocks like metal. So Compare with other stocks of the same sector to reach any conclusion.