Stock Trading Agent
An algorithmic grid-trading bot for equities.
What It Does
I wanted to experiment with trading on volatility and so I built this, one of my first AI-assisted projects. It has a ton of features, the extensive backtesting capability being noteworthy. It can trade for real using the Alpaca API and it helped me test and consider a lot of trading strategies as well as learn a lot about how algorithmic trading works.
How it works
You give it a ticker and a date range, it replays the daily price history bar by bar and pretends to trade it, buying every big down day, selling on whatever exit rule you picked, then charts what your money would have done against just buying and holding the thing instead. It supports much more advanced grid-based trading strategies with a million parameters but in the end, nothing beats the market.
Built with
- Python/FastAPI backend wrapping the existing swing_v1 strategy engine, with a mark-to-market equity curve bolted on and a parity test pinning it to the original CLI so the two can't drift; daily bars come from Alpaca's IEX feed through a local parquet cache. The frontend is vanilla JS with hand-rolled SVG charts — no build step, no chart library.