← back to projects

Market Trading Simulator

in progress
Sept 2026 – presentPython

This year, I began my personal finance journey. I was immediately bombarded with information about trading strategies, what kinds of portolio to open, the best ETFs to invest in, and more trading content. I wanted to know if the trading strategies people talk about online actually hold up. To do this, I built the infrastructure to test their strategies properly instead of taking anyone's word for it. That meant writing my own portfolio tracker, order logic, and P&L accounting before I could even get to the strategies themselves. This project is currently helping me figure out where to invest my own money for the future.

Portfolio tracking
Buy and sell logic with running position sizes, plus separate realized and unrealized profit/loss calculations at every step.
Walk-forward loop
Strategies are trained and tested on rolling windows of historical data, moving forward in time rather than testing on the whole dataset at once.
Look-ahead guard
A check that prevents a strategy from using data that would not have been available yet. This is the most common source of unrealistic backtest results.
Strategies tested
Momentum and mean-reversion, coded and run against historical price data.

Next, I am extending it into an agent-based market simulator with learning agents in PyTorch.