Completed: Days 1–17
- Python fundamentals
- NumPy
- Pandas
- Data manipulation
- Visualization
- Financial returns basics
Built:
- SMA crossover strategy
- Buy/Hold benchmark
- Position tracking
- Proper use of
shift(1) - Long-only framework
Key lesson:
- Position and signal are different concepts.
Added:
- Sharpe ratio
- Exposure
- Trade statistics
- Transaction costs
- Slippage
- Stop loss
- Take profit
- Position sizing experiments
Findings:
- TP often reduced performance.
- Stop loss improved robustness.
- Random strategy behaved as expected.
Created modular pipeline:
- load_data()
- calculate_indicators()
- generate_signals()
- run_backtest()
- calculate_metrics()
- plot_results()
Key lesson:
- Strategy != System
Assets tested:
- TSLA
- AAPL
- MSFT
- BTC-USD
Findings:
- SMA strategy generally underperformed Buy & Hold.
- BTC showed the strongest Sharpe.
- Correlation:
- BTC vs equities: low (~0.17)
- MSFT vs AAPL: high (~0.66)
Observed:
- Bullish regimes generally positive.
- Bearish regimes sometimes positive.
- Sideways regimes consistently weak.
Conclusion:
- Strategy appears regime-dependent.
- Sideways markets are the main weakness.
Using:
- SMA100 slope
- Volatility
- Price relative to SMA100
Regimes:
- Bullish
- Sideways
- Bearish
Goals:
- Validate classifier visually.
- Compare performance by regime.
- Test filtering sideways markets.
- Determine whether edge exists only in specific regimes.
Upcoming topics:
- Regime filters
- Walk-forward validation
- Parameter search
- Portfolio construction
- Multi-asset backtesting
- Factor research
- ML-based signals (later)
- Quant research infrastructure