Hi,
Here is the Reversals 2 strategy kernel.
Reversals 2 uses a slightly more sophisticated approach than Beer Money and TMA2. The following assumptions are made. Some stocks are range-bound and are a suitable match for the algo. A rolling window will be maintained. The maxima and minima of the rolling window are particularly relevant and will be calculated and utilized. The lowest minima are more relevant than the highest minima. The highest maxima are more relevant than the lowest maxima. The maxima and minima that are more recent in time are more relevant. The more relevant maxima and minima are given a higher weight, and buy and sell prices are calculated through appropriate weighted averaging of the maxima and minima.
The main calculations have been componentized in the Reversal class so that you can readily utilize the Reversals 2 strategy kernel. I don't recommend trading the default stock as too many others will likely try the same. You can tweak the settings as well to make it your own. The algo is in second resolution as you can get higher gains, but I do most of my testing at minute resolution as that's faster. Just the strategy kernel with a single stock algo are being provided for free, screening for more suitable stocks and multi-stock algos are another endeavor.
Use at your own risk.
Regards,
Warren Harding
James Smith
Thanks for the contribution Warren. I have toyed with some other market making strategies that are based around this seminal paper:
https://arxiv.org/abs/1105.3115
Can I ask what is the theoretical basis for your algorithm? Is this your original strategy? At first glance the calculations involving minima and maxima sound like they could be considered linear regession problems. My instinct is that the weight parameters could probably be chosen by a suitablly trained model prior to execution. Have you considered how this could be elaborated?
Warren Harding
Hi James. This is my original strategy as best I know, if some-one else thought of it previously I'm unaware of it. It doesn't have much of a theoretical basis, at the time of writing it I just wanted some minimalistic strategies that I wanted to try in many situations to see if there were times when stocks fell into certain patterns. I hadn't considered using machine learning to choose the weights, you could.
Sadullah Dinç
Exiciting strategy to test Warren. Quick question, any idea how to find any other proper stocks for this strategy? I mean how did you come with "MLAB" after all.
Â
Warren Harding
Hi Sadullah.
I ranked by returns on a per stock basis. Quantconnect doesn't let you do this easily but you can recalculate returns from the trades log or integrate a simple backtester into the script. I used the latter approach. Note that there is an overfitting type problem with this approach, but enough trades have been put through that the results are intriguing.
Alessandro Grassi
Hi, someone has tried in a real account?
Sadullah Dinç
Oh, I see thanks Warren.
I have tried this on my Real account I am attaching the result. It was a total heart-attack. It made 10's of orders in 1 min and no idea what was the problem. Any ideas will be appreciated. Everything started good, on Friday night when the market was closed I was holding the position for Monday. After market opened it made 10's of orders filled. Here are some examples;
Â
Warren Harding
I'm not sure. One thing I noticed is that if you haved a limit order visible on the table some traders will manipulate the price. They can really take you for a ride when the limit orders are close to the price like this. You definitely have to watch the algo and turn it off right way if it's not behaving, especially at first.
Ak129301
Sadullah Dinç were you able to resolve this issue?
Warren Harding
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!