Basic framework that I use for stoploss, take profit and data

Back

Hi,

I created this framework for the following reasons:

- I need hidden SL and TP (to avoid MM manipulations)
- When a new ticker is added to the universe I want to have its full rolling window ready to use.
- It's much cleaner to separate the data/trading/strategy into different files and classes.
- Very easy to create a strategy without taking care of all the other stuff.

LMK if you see any bugs or you have suggestions for improvements.

 

Update Backtest








 
0

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.


Well done! Admittedly I also find myself reusing a lot of the same code and have recently taken a particular liking to the libraries feature as a result (maybe a good idea would be to introduce a custom snippets menu into the cloud IDE to make these easy to access without importing a whole new file).

I think some good additions could include other execution strategies like (M)VWAP, trailing stop (limits), or other replications of those seen in

https://www.interactivebrokers.ca/en/index.php?f=4985

 

0

Actually, this framework can be modified to work with the QC framework and the execution part will come "for free"

0

Hi Gil,

Thanks for sharing with the community.

Note that when implementing TP/SL orders with the framework design, we violate the separation of concerns design principle. Refer to this related thread.

Best,
Derek Melchin

0

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.


This is awesome. Appreciate you sharing.

0

Update Backtest





0

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.


Loading...

This discussion is closed