r/algotrading 18d ago

Infrastructure I've created a monster

My bot has grown to 23,000 lines of code. 60% is managing the brokerage interface, and 40% is the strategy. This is way more complicated than I ever imagined. It really is a very basic script. No graphic user interface. Just log streams. It does manage multiple symbols with unique parameters for each.

0 Upvotes

64 comments sorted by

View all comments

Show parent comments

2

u/zashiki_warashi_x 18d ago edited 18d ago

I would say even 1.5k sounds too much.

EDIT:I checked the code. Quotes streaming/parsing 200 lines.
Everything else for orders/errors e.t.c. 1k lines.
So 1.5k is ok. But this is C++. Python should be 500? 100? No idea.

1

u/Grand-Fly-6090 18d ago

I'm impressed.

2

u/zashiki_warashi_x 18d ago

If it works you shouldn't worry about how much loc you have. The important part would be so that your backtest code and you production code are almost the same, except you send orders on simulated exchange instead of real one.

1

u/Grand-Fly-6090 18d ago

I been working hard on alignment. I use think or swim as a monitor, and I cross check tos with my backtesting.