Stock Trading Bot
An automated trading bot that reads market signals and executes trades on a set of rules I define.
// Challenges
Deciding the signal set, backtesting against historical data, and building in proper risk controls so the bot doesn't blow up the account on a bad day.
// Skills Used
// Current Status
Early development. Research phase and initial scaffolding. Working out which signals to act on and what platform to trade through.
Brief
A Python trading bot that monitors a set of market signals and executes trades according to rules I write. Personal project, designed to teach me real software architecture (not just scripts), real risk management, and how financial APIs actually work outside of a textbook.
Where I am
Early development. Researching which signals are worth acting on and which trading platform exposes a clean enough API to build against. Initial scaffolding is in Python with a focus on a few key pieces.
What I’m building toward
Signal layer. A set of small functions, one per signal, that each take market data and return a buy, sell, or hold recommendation with a confidence score. Moving averages, RSI, and a handful of basic technical indicators to start. The point is that signals are pluggable so I can add or remove them without rewriting the rest of the system.
Strategy layer. A higher-level component that takes the signal outputs and combines them into an actual decision. Different strategies can weight signals differently. Some are conservative, some are aggressive.
Backtesting harness. Before any real money goes anywhere near this bot, every strategy has to be backtested against years of historical data. The backtester runs the strategy against past prices and reports the realized return, the drawdown, and the win rate. If a strategy looks bad in backtest, it does not get to run live. Full stop.
Risk controls. Position sizing, stop losses, max daily loss limits, max position limits. The risk system is the thing that keeps a bad trading day from becoming a catastrophic one. This is the layer I am thinking about most carefully because the consequences of getting it wrong are real money.
Execution. Once a strategy clears backtesting, the bot can place real orders through a brokerage API. Probably paper-trading for a long time before any real money is at risk.
Skills being built
- Python at a system level. Not scripts. Modules, interfaces, testing. The bot will only be as good as the architecture under it.
- Financial APIs. REST APIs, rate limits, authentication, parsing market data feeds. Each broker exposes things differently.
- Backtesting methodology. A strategy that looks great in backtest can still fail live. Knowing how to design a backtest that does not lie to you is its own skill.
- Risk management as code. Translating risk rules into clean Python that actually enforces them.
- AI-assisted development with Claude Code. Same workflow I used on the Cup Pong Arduino firmware. Describe the goal, review the code, iterate.
Future updates
This page updates as the bot develops. When it ships its first backtest report, that report goes here. When it executes its first paper trade, that goes here too.