OPEN-SOURCE SCRIPT
Multi-Asset: Complete Analysis

Description:
Comprehensive performance analysis tool for comparing multiple assets or custom weighted portfolios against benchmarks. Calculates Sharpe ratios across multiple timeframes (30d, 90d, 180d, 252d), total returns, CAGR, and normalized values starting from $100.
Key Features:
Build custom weighted portfolios (default: 50/30/20 allocation)
Compare against SPY, QQQ, and other benchmarks
Dynamic risk-free rate from ^IRX or manual input
Multi-period Sharpe ratio analysis to validate strategy consistency
Total return and annualized return (CAGR) metrics
All assets normalized to common start date for accurate comparison
Toggle individual assets on/off for cleaner chart viewing
Use Case:
Perfect for evaluating whether your custom portfolio allocation justifies its complexity versus simply buying SPY/QQQ. If your risk-adjusted returns (Sharpe) and absolute returns aren't beating the benchmarks, you're overcomplicating your strategy.
Ideal for: Portfolio managers, factor investors, and anyone building custom allocations who need proof their strategy actually works.
Comprehensive performance analysis tool for comparing multiple assets or custom weighted portfolios against benchmarks. Calculates Sharpe ratios across multiple timeframes (30d, 90d, 180d, 252d), total returns, CAGR, and normalized values starting from $100.
Key Features:
Build custom weighted portfolios (default: 50/30/20 allocation)
Compare against SPY, QQQ, and other benchmarks
Dynamic risk-free rate from ^IRX or manual input
Multi-period Sharpe ratio analysis to validate strategy consistency
Total return and annualized return (CAGR) metrics
All assets normalized to common start date for accurate comparison
Toggle individual assets on/off for cleaner chart viewing
Use Case:
Perfect for evaluating whether your custom portfolio allocation justifies its complexity versus simply buying SPY/QQQ. If your risk-adjusted returns (Sharpe) and absolute returns aren't beating the benchmarks, you're overcomplicating your strategy.
Ideal for: Portfolio managers, factor investors, and anyone building custom allocations who need proof their strategy actually works.
Script de código abierto
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Exención de responsabilidad
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Script de código abierto
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Exención de responsabilidad
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.