OPEN-SOURCE SCRIPT

Leveraged ETF Strategy Tester

298
A comprehensive backtesting tool for comparing three distinct leveraged ETF investment strategies with customizable parameters, visual indicators, and risk metrics.

Features:
  • Test three proven strategies side-by-side
  • Fully customizable parameters via settings
  • Visual buy signals color-coded by deployment tier
  • ATH tracking and drawdown bands
  • Monthly contribution support
  • Sharpe and Sortino ratios for risk assessment
  • Separate tables for statistics and strategy descriptions

Strategy 1: Stars (Lee Ekholm)
A rebalancing strategy that maintains a conservative 20% TQQQ / 80% SPY base allocation with an automatic risk-on mechanism during severe drawdowns.

How it works:
  • Annual rebalancing at 20/80 allocation
  • When TQQQ drops 40%+, shifts to 40% TQQQ at next rebalance
  • Skips rebalancing for 1 year after market bottoms
  • Resets to base allocation after TQQQ recovers to new ATH
  • Monthly contributions accumulate and deploy during rebalances
  • Best for: Long-term investors seeking systematic exposure increase during crashes

Strategy 2: BD Collins 80/20 DCA
A four-tier dollar-cost averaging strategy that deploys cash more aggressively as drawdowns deepen, automatically buying more during corrections.

How it works:
  • Accumulates monthly contributions as cash reserves
  • Deploys at quarterly intervals (customizable)
  • 4 deployment tiers based on drawdown from ATH:
  • 0-15%: Deploy 20% of cash
  • 15-25%: Deploy 40% of cash
  • 25-35%: Deploy 60% of cash
  • 35%+: Deploy 80% of cash
  • Best for: Investors wanting automated "buy the dip" behavior with increasing aggression

Strategy 3: Henrique Centieiro's Strategy (1/3 Cash)
A simplified three-tier approach with clear escalating deployment levels based on drawdown severity.

How it works:
  • Baseline: 20% deployment near ATH
  • 20% drop: 33% deployment (1/3)
  • 40% drop: 67% deployment (2/3)
  • 60% drop: 100% deployment (full cash)
  • Monthly contributions accumulate and deploy at chosen cadence
  • Best for: Investors preferring a simpler, more aggressive deployment schedule with clear trigger points


Color-Coded Buy Signals:
Strategy 1: Aqua (normal) | Orange (40% trigger active)
Strategy 2: Green (20%) | Yellow (40%) | Orange (60%) | Red (80%)
Strategy 3: Green (20-33%) | Orange (67%) | Red (100%)

Note: This indicator is for educational and backtesting purposes. Past performance does not guarantee future results. Leveraged ETFs carry significant risk and may not be suitable for all investors.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。