OPEN-SOURCE SCRIPT
Annual Performance Table

Annual Returns Table | Yearly Performance + Sharpe Ratio
A clean, customizable table displayed directly on your chart giving you an instant overview of any asset's yearly performance — stocks, ETFs, crypto, indices, commodities, forex.
What it shows
Annual return (%) for each complete year — incomplete years at the start of history are automatically excluded
Current year YTD performance (marked with *)
Sharpe Ratio per year (calculated from monthly returns, annualized ×√12)
A separate stats panel: Average annual return, Cumulative return, Global Sharpe Ratio, Total years of history
Key features
Works on Daily, Weekly, Monthly and Yearly timeframes
Automatic row wrapping when history is too long to fit on one line
Configurable: max years displayed, years per row, show/hide each row independently
Color coded: green for positive years, red for negative, gradient on Sharpe quality
Fully customizable colors
For informational purposes only. Not financial advice.
A clean, customizable table displayed directly on your chart giving you an instant overview of any asset's yearly performance — stocks, ETFs, crypto, indices, commodities, forex.
What it shows
Annual return (%) for each complete year — incomplete years at the start of history are automatically excluded
Current year YTD performance (marked with *)
Sharpe Ratio per year (calculated from monthly returns, annualized ×√12)
A separate stats panel: Average annual return, Cumulative return, Global Sharpe Ratio, Total years of history
Key features
Works on Daily, Weekly, Monthly and Yearly timeframes
Automatic row wrapping when history is too long to fit on one line
Configurable: max years displayed, years per row, show/hide each row independently
Color coded: green for positive years, red for negative, gradient on Sharpe quality
Fully customizable colors
For informational purposes only. Not financial advice.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。