Analyze the costs, volatility decay, and tracking difference of leveraged ETFs.
cd ~/Documents/etf-analyzer && uv run python analyze_etf.py <TICKER>Supported tickers: SSO, UPRO, TQQQ, QLD, SOXL, FNGU
cd ~/Documents/etf-analyzer
uv venv
uv pip install yfinance numpy pandas- Fetches 3 years of price data for the ETF, its proxy index, S&P 500, and ICE BIL
- Computes total returns, volatility decay, financing drag, fees, and unexplained drag
- Outputs results to stdout and saves CSV files in
output/
| File | Description |
|---|---|
output/<TICKER>_<YYYYMMDD>.csv |
Summary metrics: returns, drag components, volatility, risk-free rates |
output/<TICKER>_<YYYYMMDD>_pricing.csv |
Daily adjusted close prices for the 1-year analysis period |