DEV Community

Anupam Jain
Anupam Jain

Posted on AI-assisted

LLM Paper Trader

Hacktoberfest: Maintainer Spotlight

I Built a Small LLM-Powered Paper Trader for a Friend

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend.

What I Built

I built a small paper trading system for a friend who is interested in financial markets and wanted a way to experiment with trading ideas without putting real money at risk.

The idea was to combine some traditional technical indicators with an open-weight language model and see how it would perform as a simple decision-making layer.

The system fetches market data, calculates indicators, sends the current market state to the model, and gets a simple BUY, SELL, or HOLD decision. That decision is then executed using virtual money and the portfolio is tracked over time.

Everything is simulated, so there is no real money involved.

Demo

GitHub Repository

The project can be run locally and the trading loop prints the current market information, the model's decision, and the simulated portfolio state as it runs.

Code

The project is open source on GitHub:

https://github.com/anupam99jain/paper-trader

The code is written in Python and is split into the parts responsible for market data, technical indicators, the trading logic, and the LLM decision-making layer.

How I Built It

I built the project with Python and kept the architecture intentionally simple so that it would be easy to experiment with different indicators and models.

The trading loop gets the current market data and calculates technical indicators such as the 20-period SMA, 50-period SMA, and 14-period RSI.

The current market state is then passed to an open-weight language model. For the AI component, I used Qwen 2.5 7B.

The model is asked to return one of three decisions:

BUY

SELL

HOLD

The result is passed back to the paper trading engine, which performs the simulated trade and updates the portfolio.

This is a small project, but I liked the idea of making the AI component replaceable. I can change the model, change the indicators, or change the decision logic without having to redesign the whole system.

Why Does Open Innovation Matter?

For this project, using open-weight AI made experimentation much more interesting.

Instead of depending completely on a closed API, I can run an open model, change the prompts, swap models, and experiment with the system around it.

That matters because the goal of this project is not just to get a prediction from an AI model. I wanted to be able to understand the system, change individual parts, and see what happens.

Open innovation makes that kind of experimentation much more accessible.

My Agent Session

I used an AI coding agent during development and connected the workflow with DevRelay.

The agent helped me work through parts of the implementation, test ideas, and iterate on the project while I focused on the overall design and behavior.

Conclusion

Paper Trader is intentionally small.

I built it for a friend who wanted a simple way to explore trading ideas without risking actual money, and it also gave me a fun way to experiment with combining traditional market indicators and open-weight AI.

The project is available here:

https://github.com/anupam99jain/paper-trader

Thanks for checking it out, and happy Hacktoberfest!

Top comments (0)