Hi, QC Community!!! Need your help, create some simple algo, was amused when see 80% daily drawdown, Checked trades and real drawdown was not more 15% on this day. Seems very strange, maybe i did some novice mistake.
Looking forward to your thoughts and ideas,
Dance
Fred Painchaud
Hello Dance,
I won't venture too much into recommending strategies myself - I have no authority (certifications, etc) to do that at all.
From your stats, I do see a maximum drawdown of 93%. Your algorithm runs so per say, there is no error in it (in the code). But you have just demonstrated yourself that your algo, from 2020 onward, would not have been very profitable on the assets you select in your universe. Good thing you backtested first…
I would certainly analyze why there is such a catastrophic failure in the week of Jan 25th 2021. And less catastrophic but still significant failures in the four following weeks. You basically loose all the capital you gained over a year in a week or so. So essentially, your algo makes “mistakes” buying some assets that it then has to liquidate at loss, and that, over and over again, for sure, in that period.
Once you figure that, you will understand one way your algorithm can fail. And will most likely be in a position to abandon it for something else or correct it and backtest again.
Fred
Dance mint
Hi, Fred! I had the same idea - first of all i tried to understand what cause such catastrophic drawdown, so i looked through trades, and calculated myself - about 15%. That's why I decided ask for help.
So maximum drawdown happened when algo bought 176529 shares of POLA at $27.63, The low of 25 of January was 23.13.
So, it was impossible to get 80% drawdown in this day, 16.11% from entry point.
If there was no mistake in code there is some problem with QC backtester.
Fred Painchaud
Hi Dance,
Well, I am eyeballing here. Will check out the algo later for sure.
But, I don't understand where you get your 80% daily drawdown. On the graph, each bar is a week. And that long candle down for the week of the 25th of Jan, 2021, takes your capital from around 5M to maybe around 2M. So you loose about 60% ish only that week. And then, there are those four consecutive loosing weeks I was talking about right after. Which, eyeballing again, brings you down another 1M.
Is it possible that you mixed up day bars with week bars?
Cheers,
Fred
Vladimir
Dance,
Fred Painchaud is absolutely correct “that long candle down is for the week which start on 2021-01-25”.
If we highlight this candle, we will see the following picture.
The strategy main drawdown occurred on January 28, 2021 and January 29, 2021.
Here are the contributors
Dance mint
Hi, Vladimir! Thank you so much for your contribution, now it makes sense.
I suppose QC should change legends, because it wasn't so obvious for me that the change happened during the week not one day.
They could modify legends depending from the amount of candles inside “Weekly performance” or make it simple “Performance”.
Fred, Vladimir - thank you for your time and clarification
Dance mint
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!