I can'nt anderstand the way liquidate works. I tried buing and liquidating at the same time and the list of orders seams very strange.
I think I am having a problome anderstanding the behavior of the Liquidate() function.
Thanks in advance.
QUANTCONNECT COMMUNITY
I can'nt anderstand the way liquidate works. I tried buing and liquidating at the same time and the list of orders seams very strange.
I think I am having a problome anderstanding the behavior of the Liquidate() function.
Thanks in advance.
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.
Rahul Chowdhury
Hi Miriam,
I highly recommend completing the boot camps. They are the best way to learn how Lean works. You can also use the documentation to learn more about trading and indicators.
Best
Rahul
Miriam F.
My concern is also how the rescue algorithm loses so much, maybe there is a way to reverse it? And the algorithm will be profitable
Thank you!!
Derek Melchin
Hi Miriam,
We can reverse the strategy by changing the algorithm's market long order inside HandleRenkoClose into a market short order
MarketOrder(pear,-5000);
Looking at the attached backtest which implements this change, we see the strategy still has a negative return. This is because of the fees incurred by placing over 10,000 trades throughout the backtest.
Best,
Derek Melchin
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.
Miriam F.
Thanks so much for your reply,
But the reason for the decline is not because of the fees,
Fees are zero and still have minus
Thank you
Â
Rahul Chowdhury
Hey Miriam,
The algorithm loses money because the algorithm loses more often than it wins. We can observe this in the overview tab of the backtest report. The rolling statistics section allows us to view the loss rate up to 4 significant digits. Here we can see that the average loss rate is greater than 0.5000. This is what produces the the net return of -0.139%.
Best
Rahul
Miriam F.
Why can't I see the answers ??
Miriam F.
Thank you Rahul!
If he loses, when we turn him around he should make a profit, why doesn't it work ???
Thank you very much
Miriam F.
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!