I ran this strategy based on custom data accessed via Google drive/Dropbox.
It is reading the data into Pandas frame and based on the logic, it is executing trades both long and short. However it seems like it is aborting at this Row Number: Symbol BE DateTime 9/1/2023 12:30:00 PM Open 15.33 High 15.33 Low ...
and is not fully processing remainder of the data. This was for symbol BE
THere's another link on the script for TSLA which seems to have executed successfully all the way. can someone point why it is aborting early?
I also have some code to liquidate if open positions exist. not sure that is firing properly..
Mia Alissi
Sources: Bybit Crypto Futures Regression Algorithm, Bybit Custom Data Crypto Regression Algorithm, Bybit Crypto Regression Algorithm, Consolidate Regression Algorithm, Register Indicator Regression Algorithm
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.
Suresh Venkat
Backtest of new code is generating same results..
Louis Szeto
Hi Suresh
The problem is coming from the scheduled event. On its current settings, it runs even on non-trading days (e.g. weekends) and non-trading hours (every hour of all 24 hours in a day). Thus, it quickly runs out of rows from the dataframe and fills with inaccurate data. I made some changes, but the best way is to actually stream the data instead of bulk downloading.
Also, there is a problem with the long/short flag. Since they are not mutually exclusive, you should set the short flag to False when setting the long flag to True, and vice versa.
Best
Louis
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.
Suresh Venkat
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!