Trade$im AI
TradeSim AI: The Ghost in the Trading Machine #devchallenge #hf26challenge #hacktoberfest #mlh This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built TradeSim AI is an AI-powered paper trading and strategy backtesting platform that lets retail

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼
#devchallenge #hf26challenge #hacktoberfest #mlh
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
TradeSim AI is an AI-powered paper trading and strategy backtesting platform that lets retail traders and finance students experiment with trading strategies using historical market data, without risking real money.
The idea behind Ghost in the Trading Machine is simple: what happens when an intelligent model becomes part of a system that makes decisions based on data, rules, and probabilities?
TradeSim AI combines traditional technical indicators, such as Simple Moving Averages (SMA) and the Relative Strength Index (RSI), with an open-weight language model that interprets the current market state and recommends a BUY, SELL, or HOLD action.
The trading engine handles the mechanics. The model provides another layer of decision-making. Together, they create a simulation where an AI's decisions can be observed, tested, and evaluated against changing market conditions.
No real money is involved. The goal isn't to build a machine that magically predicts the market, but to explore what happens when an AI becomes part of a financial decision-making system.
TradeSim AI currently runs locally, making it possible to experiment with simulated trades and observe portfolio performance.
GitHub repository: anupam99jain/paper-trader
The repository is the starting point for running the project and exploring its implementation.
TradeSim AI is built around a modular simulated trading engine with the following features:
The important part is that the AI doesn't execute real trades. Its recommendations are processed by the simulation engine, where their potential impact can be observed without financial risk.
The backend is written in Python, and the AI component uses Qwen 2.5 7B, an open-weight language model running locally through Ollama.
The trading workflow follows these steps:
This separation between the model and the trading engine is intentional. The model interprets the supplied context, while the engine manages portfolio state and simulated execution.
It also makes experimentation easier: different prompts, trading rules, indicators, or open-weight models can be tested without rebuilding the entire application.
The interesting question isn't whether the AI can produce a convincing trading recommendation. It's whether those recommendations hold up when evaluated across a longer simulation.
An AI system shouldn't have to be a black box locked behind a proprietary API.
Using an open-weight model through Ollama gives developers greater control over inference, makes local experimentation possible, and reduces dependence on metered, proprietary AI services. It also makes the model component easier to replace as new open models become available.
For TradeSim AI, that matters because strategy development is inherently iterative. You need to run experiments, compare decisions, adjust your approach, and test again.
Local inference makes that workflow more accessible to students and independent developers. It also offers a way to explore AI-assisted financial tools while keeping the processing environment under your control.
Open innovation makes the underlying components available for inspection and experimentation, rather than requiring developers to treat an AI service as an inaccessible dependency.
That's the kind of machine I wanted to build: one whose behavior can be studied, questioned, and improved.
The model's decision-making loop is integrated into the trading engine.
Rather than simply generating free-form market commentary, the model is asked to produce a trading action based on the supplied technical context. The engine then evaluates that action within the simulated trading workflow.
The repository contains the project code for exploring this interaction between the model and the trading system.
There's something fascinating about watching a machine turn a handful of market indicators into a decision.
A moving average crosses another. The RSI changes. A prompt is assembled, passed to a model running on your own machine, and a recommendation comes back: BUY, SELL, or HOLD.
For a moment, the trading engine feels like more than a collection of rules. There's an additional layer interpreting the signals, and you get to observe what happens when its judgment meets the mechanics of a simulation.
But that's also where the mystery ends and the real work begins.
An AI can sound confident and still make a poor decision. A promising trade can lose money. A strategy that performs well on one stretch of historical data can fail on another.
That's why TradeSim AI focuses on experimentation rather than promises. The point is not to trust the ghost blindly, but to inspect its decisions, measure the outcomes, and understand where it succeeds or fails.
The machine can make the decision. We still have to question it.
Simulated returns do not guarantee future performance in live markets.