i'm 19, and I just built my first algorithmic trading backtester from scratch in Python.
I don't think I completed any online tutorials properly, but I started reading ML books on trading, focused on current algo traders' experiences, and got started.
My first version showed 800% annualized returns. I thought I was a genius. Turns out I had look-ahead bias in every single signal; the model was peeking at future prices to make today's decisions. Fixed it. Real results are way more boring. That's the point.
Here's what's actually inside it:
- 4 strategies: SMA Crossover (20/50-day), RSI Mean Reversion (14-period, 30/70 thresholds, built the EWM math myself), MACD (12, 26, 9) via histogram crossovers, and Bollinger Bands (20-period, ±2 std dev) with midline exits.
- The engine runs event-driven, bar-by-bar. Every signal is shifted 1 bar forward so the model only acts on what it actually knew at the time. 3 position sizing methods including Kelly Criterion. 5% stop-loss, 10% take-profit, 20% max per position. 0.1% commission 0.05% slippage baked into every trade.
- Output: 10 metrics: Sharpe, Sortino, Calmar, Max Drawdown, Win Rate, Profit Factor, printed in a color-coded terminal table. One CLI command runs all 4 strategies on any ticker and exports a comparison chart.
Just getting started. If you work in systematic trading or quant research, I'd love to learn from you.
Open to feedback, it was my first project, definitely not expecting it to be impressive, but I got my foot in the door!!
#MyFirstTweet #HelloX #AlgoTrading #QuantFinance #Python