I've written trading bots in the past, but never built a way to compare them against past data consistently and accurately. When you can evaluate trading bots at the speed your computer can iterate through the data, you can iterate much more quickly.

What it does

I've written a backtesting framework that allows me to run any bot with any combination of parameters against any range of data (that I have). I also wrote code for collecting the price data and wrote an example trading bot that seems to make money!

Challenges I ran into

I plan on using this in the future, so I had to put some thought into database design and code design decisions.

What I learned

Change the order of reading and writing data to speed things up :)

Also, I learned how to compute streaming, 1 pass versions of standard deviation and other statistics

What's next for Lucra Machina

I'll integrate this into one of my other trading bot frameworks!

Built With

Share this project: