TradingView Indicator Free · Open source

Relative Fundamental Comparison

Compare a stock's key fundamental ratios, and its price correlation, with three other companies, right on the chart.

Published 22 July 2021 · Updated 30 July 2021

Relative Fundamental Comparison
Sun Pharma daily chart with a table comparing its market cap, earnings yield, P/E, forward P/E, PEG, P/B, P/S and price correlation with three other pharmaceutical companies

Before I trade a stock, I like to check its basic fundamentals, especially when I don’t know the company well. The quickest way to put the numbers in context is to compare them with the industry leaders.

This script does that comparison on the chart.

What it shows

A table comparing the stock on your chart with three other stocks you choose, across key fundamental ratios, including:

  • market capitalisation,
  • earnings yield,
  • P/E and forward P/E,
  • PEG,
  • P/B and P/S.

A correlation column shows how closely each stock’s price has moved with the stock on your chart. The default is the last 252 bars.

Good to know

The limit of three comparison stocks comes from a TradingView restriction on how much data a script can request.

Educational tool only, not investment advice. Statistics and backtests describe past data and do not predict future results.