Thanks to all who attended the Meetup tonight, and thanks to Q for putting on the event. Connie's Pizza was great!
As promised at the meetup, here is an algo that makes trades. I wanted a little more time to rework the ML in the Bean Report before crafting a trading strategy, but here is something that at least attempts to replicate the strategy I was working towards in the notebook...which was to trade the large deltas in the predictions from the stacked model. I plan to update this in the future with something that trades in prior years, and can also be traded in the future.
Also, a disclaimer or sorts....the performance of this backtest is completely engineered. I just thought it would be nice to provide an algo with some basic trading logic.
A description of what it does:
1) Starts in January of 2014, and collects data for 1Q 14, 1Q 15, and 1Q 16.
2) In January of 2017 it continues to collect data, but also starts training the ML models. It makes predictions for May and July Beans
3) Starting in February it starts trading. If the signal delta is less than -0.12, it will short 10 lots of the may beans. if the delta is less than -0.06, it will short 2 lots. If greater than 0.012, it will go long 10 lots of the july beans. if greater than 0.06, it will go long 2 lots of the july beans.
I know the results look good, but remember that this was just a quick test. The sample size is way too small to have any confidence at this point. Hopefully it shows similar results in prior years, and more importantly...the future.