Liquidating portfolio at a total draw-down of 6% and re-entering the market 1 month later

Back

Hello everyone,

I need help implementing this simple strategy. I want to implement the following:

1. If the portfolio has a drawdown of 6% or more, then liquidate.

2. If the portfolio has been liquidated, then enter the market again 1 month later.

 

I have tried everything I could but I can't figure out this one. Any help would be highly appreciated!

 

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.


Hey there! Welcome to QC! Since you've completed all the Boot Camps I had a stab at it for you =) So we can improve the documentation and Boot Camps, which part of this algorithm did you struggle with? 

Unfortunately, the algorithm still has a 16% drawdown due to three consecutive failed re-investments:

677_1586392877.jpg

1

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.


Thank you!

I think the Boot Camps have been very helpful! I'm relatively new to programming and to QuantConnect's API, so my main issue so far has been translating trading ideas into programming. Even when these trading ideas seem simple in theory I have a hard time implementing them into code. I have many ideas that I want to test in historical data so I will try my best to understand and learn programming and QC's API as much as possible.

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