HI ALL ,
would you kindly help with the below , am not getting the bcktest results , I have compiled and went fine , but for backtest it is not working ? your input is highly appreciated
best regards
Don't have an account? Join QuantConnect Today
QuantConnect Community Discussions
QUANTCONNECT COMMUNITY
LEAN is the open-source algorithmic trading engine powering QuantConnect. Founded in 2012 LEAN has been built by a global community of 180+ engineers and powers more than 300+ hedge funds today.
Join QuantConnect's Discord server for real-time support, where a vibrant community of traders and developers awaits to help you with any of your QuantConnect needs.
The Open-Quant League is a quarterly competition between universities and investment clubs for the best-performing strategy. The previous quarter's code is open-sourced, and competitors must adapt to survive.
User seeks help for backtest not working on QuantConnect platform.
Continue ReadingRefer to our Research Guidelines for high quality research posts.
Create an account on QuantConnect for the latest community delivered to your inbox.
Sign Up Today
|
|
|||||||
|
|
||||||||
|
Feedback Backtest not working
Ashraf Said | January 2020
HI ALL ,
would you kindly help with the below , am not getting the bcktest results , I have compiled and went fine , but for backtest it is not working ? your input is highly appreciated
best regards
QuantConnectâ„¢ 2025. All Rights Reserved
Jack Simonson
Hi Ashraf,
In Python algorithms, the file that gets run is main.py. Since most of your code appears to be in the file main_01.py, please try renaming it to main.py and renaming the current main.py file to another name. Otherwise, you can copy-and-paste your code in main_01.py to main.py and it should run, assuming it all compiles.
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.
Ashraf Said
within the python script .i.e. main.py before compiling it ? if so shall I use class , or def ?
your answer is highly appreciated
Best Regards
ashraf
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.
Jack Simonson
Hi Ashraf,
The current format of your code is fine -- that is, using the QCAlgorithm class. This is what builds the algorithm that gets run. You can find a lot of good examples of algorithm code structure here. The code in main.py will compile so long as all references, imports, etc. are valid, but some invalid Python operations won't be caught until runtime (i.e. invalid dictionary indexing, just as an example).
You should use Consolidators to build OHLC bars from Minute data into different frequencies. There are some good examples in the link that should provide guidance on how to use them.
Yes, you can create and use your own Indicators if we don't already provide them in our Indicator collection. You can find a helpful discussion on how to do this here.
Some of these topics are covered in our Boot Camp tutorials. I would highly recommend working through these as they cover a lot of the basic material/API and make for a great introduction to our platform. Otherwise, search or post in the community forum and we'll do our best to help out.
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.
Ashraf Said
[cid:7b5b4ebb-5065-495c-b04d-8227fe4b4358]
Best Regards
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.
Jack Simonson
Can you attach a backtest? The image failed to show up. This will make it easier for us to debug the issue.
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!