Skip to content
All library documents

Comparing Annualized CAGR Between Selected Dates and Instruments

Article TradingView scripts

Summary

This chart tool calculates the compound annual growth rate between two user-selected points in time. It locates the close of the bars corresponding to those timestamps, orders the points chronologically even if they were selected in reverse, and displays a line with a CAGR label. An optional symbol input adds a second instrument’s CAGR over the same period for a direct performance comparison.

The document frames CAGR as a notional annualized growth measure that assumes profits are reinvested. It can help compare growth across instruments, but it does not describe the path of returns or account for drawdowns and risk. The selected points must be at least one day apart, and timestamps can map differently across chart timeframes and instruments with different trading sessions. The script provides a measurement and visualization method, not a trading strategy or evidence that either instrument is attractive.

Key ideas

  • CAGR is calculated from closing prices at two selected times and annualizes the change between them.
  • The tool can compare the chart instrument’s CAGR with that of a second selected symbol.
  • The date inputs are sorted chronologically so reversed selection does not change the calculation interval.
  • At least one day must separate the selected timestamps for the annualized result to be accepted.
  • CAGR omits drawdowns and the return path, so it is not a measure of investment risk.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.