OPEN-SOURCE SCRIPT
ETF Leverage Verification

Do leveraged ETFs really return what they promise?
Do they return the exact 2x or 3x? Or a slightly different multiple?
How much do they deviate from the promised leverage multiples?
Do these deviations impact investors in a positive or negative manner?
These are the questions that I want to answer with this indicator.
The ETF Leverage Verification indicator challenges the conventional understanding of leveraged ETFs by measuring how they actually perform versus their theoretical targets.
Instead of assuming leveraged ETFs perfectly track their target multiple, this indicator quantifies the real-world behavior by comparing the expected returns versus the actual results on every trading day.
Key Features
How to Use the Indicator
Understanding the Results
Green markers: Days when the ETF outperformed its expected multiple
Red markers: Days when the ETF underperformed its expected multiple
Data Table:
Positive Deviations: Count of days with better-than-expected performance
Negative Deviations: Count of days with worse-than-expected performance
Avg Deviation: Average magnitude of deviation from expected returns
Frequency Skew: Difference between beneficial deviations in down vs. up markets
Impact: Overall assessment of pattern benefit to investors
Summary Label:
Percentage of positive deviations in up and down markets
Total sample size for statistical significance
Key Patterns to Look For
Positive Deviation in Negative Days:
This occurs when a leveraged ETF falls less than expected during market declines. For example, if SPX falls 1% and a 2x ETF falls only 1.8% (instead of the expected 2%), this creates a +0.2% deviation. This pattern is beneficial as it provides downside protection.
Negative Deviation in Positive Days:
This happens when a leveraged ETF rises less than expected during market advances. For example, if SPX rises 1% and a 2x ETF rises only 1.9% (instead of the expected 2%), this creates a -0.1% deviation. This pattern reduces upside performance.
Frequency Skew:
The most critical metric that measures how much more frequently beneficial deviations occur in down markets compared to up markets. A higher positive skew indicates a stronger asymmetric pattern that helps long-term performance.
Mathematical Background
The indicator computes the deviation between expected and actual performance:
Deviation = Actual Return - Expected Return
Where:
Expected Return = Base Asset Return × Leverage Factor
The deviation is then categorized into four possible outcomes:
In short, more positive deviations are good for investors.
Please feel free to criticize. I'm happy to improve the indicator.
Do they return the exact 2x or 3x? Or a slightly different multiple?
How much do they deviate from the promised leverage multiples?
Do these deviations impact investors in a positive or negative manner?
These are the questions that I want to answer with this indicator.
The ETF Leverage Verification indicator challenges the conventional understanding of leveraged ETFs by measuring how they actually perform versus their theoretical targets.
Instead of assuming leveraged ETFs perfectly track their target multiple, this indicator quantifies the real-world behavior by comparing the expected returns versus the actual results on every trading day.
Key Features
- Measures actual versus expected performance of leveraged ETFs
- Tracks deviation patterns across thousands of trading days
- Identifies asymmetric behavior in up versus down markets
- Quantifies beneficial "cushioning effect" during market declines
- Provides statistical summary of performance patterns
- Works with any leverage factor (2x, 3x, -1x, etc.)
- Compatible with all leveraged ETFs (equity, bond, commodity, volatility)
How to Use the Indicator
- Enter the Expected Leverage Factor (default: 2.0)
- Select the Base Asset (underlying index, e.g., SPX)
- Select the Leveraged Asset (leveraged ETF, e.g., SSO)
Understanding the Results
Green markers: Days when the ETF outperformed its expected multiple
Red markers: Days when the ETF underperformed its expected multiple
Data Table:
Positive Deviations: Count of days with better-than-expected performance
Negative Deviations: Count of days with worse-than-expected performance
Avg Deviation: Average magnitude of deviation from expected returns
Frequency Skew: Difference between beneficial deviations in down vs. up markets
Impact: Overall assessment of pattern benefit to investors
Summary Label:
Percentage of positive deviations in up and down markets
Total sample size for statistical significance
Key Patterns to Look For
Positive Deviation in Negative Days:
This occurs when a leveraged ETF falls less than expected during market declines. For example, if SPX falls 1% and a 2x ETF falls only 1.8% (instead of the expected 2%), this creates a +0.2% deviation. This pattern is beneficial as it provides downside protection.
Negative Deviation in Positive Days:
This happens when a leveraged ETF rises less than expected during market advances. For example, if SPX rises 1% and a 2x ETF rises only 1.9% (instead of the expected 2%), this creates a -0.1% deviation. This pattern reduces upside performance.
Frequency Skew:
The most critical metric that measures how much more frequently beneficial deviations occur in down markets compared to up markets. A higher positive skew indicates a stronger asymmetric pattern that helps long-term performance.
Mathematical Background
The indicator computes the deviation between expected and actual performance:
Deviation = Actual Return - Expected Return
Where:
Expected Return = Base Asset Return × Leverage Factor
The deviation is then categorized into four possible outcomes:
- Positive deviation on positive market days
- Negative deviation on positive market days
- Positive deviation on negative market days
- Negative deviation on negative market days
In short, more positive deviations are good for investors.
Please feel free to criticize. I'm happy to improve the indicator.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。