r/algorithmictrading • u/D-M-B-97 • Feb 23 '26
Novice Creating a bot/programme to use in multiple applications
Hi there, I'm not that new to trading but have been diving into algorithmic trading. I've started coding a programme to run on a VPS which hold a main body programme (data collection for live testing, continuous market watching for designated tickers, strategy evaluation and risk gating, audit data collection which will allow me to essentially backtest my data locally using AI as all of the decisions made by the trade management will be documented and will control risk and exposure for any and all strategies I want to test)
There also other things built into this but that's a brief summary. What I want to know is has anyone done anything similar, there are questions that come up all the time and I'm very new to this level of coding.
Eventually I'd like to have 1 server testing strategies continuously and another connected to prop firms and also my own capital via API's and evaluate the data sets it produces using AI. But id also like a community that I can reach out to with questions and maybe even help other people who want to do something similar.
This is my first post so sorry for waffle and poor explanations! 🙏
1
u/AV_py Feb 23 '26
Hi, yes I have created this kind of software for my personal use. I advise you to first create a proper plan.
Preplan your tech stack (im using custom written Python walkforward and cross validation tester which also has Monte carlo simulation, Im using PostgresDB for all the data from backtests, parquet files for candles data for most of timeframes, Redis, Celery workers with different types of ques some for backtesting some for indicators calculation and order executions and a hearbeat celery worker for cron tasks, my backend is FastAPI and React+Vite everything is running in Docker containers on multiple servers (dont run your heavy backtesting workers on same server which execute orders and calculates indicators)).
Once you know your techstack create your backtesting/WFO workflow, create some sort of custom scoring system to evaluate strategy performance - dont just decide that strategy is good by Max Return or it will fail in real time)
When you completed your plan for backtesting, plan how you going to get live candles data, accounts current status and execute orders (I use websockets, when I run new strat it downloads minimum amount candles needed for my strat stores them im Redis memory and subscribes to that specific ticket/timeframe websocket data from Broker/Exchange.
Then preplan how your celery workers are going to calculate all indicators, check for signals and execute orders on new candles and how order info will be stored in your DB.
Good luck to you!
1
u/AttitudeGrouchy33 Feb 24 '26
I've been down this rabbit hole. Started with backtesting frameworks, got great results, then watched it bleed in live markets. The gap between backtest and live is brutal.
What finally helped was separating my trading wallet entirely from holdings. Sounds obvious but it forced me to treat it like a business with defined capital, not "playing with house money."
Few things I'm still figuring out:
If you were designing this from scratch, what guardrails would you add?
1
u/Good_Luck_9209 Mar 13 '26
Seems like we might be on the same track n purpose. Im currently doing live forward test with the eventual goal to move my code to a vps so that i wont need to switch on my home pc.
But i only see the vps as an infra means. Even with that eventual goal where i can route my orders thru api over my broker, ib gateway for eg, i might still run my signals over my home pc so its a distributed system.
Meanwhile wkends are for backtest and optimisation...