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 COMMUNITY
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
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,
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.
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
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.
Ashraf Said
[cid:7b5b4ebb-5065-495c-b04d-8227fe4b4358]
Best Regards
Jack Simonson
Can you attach a backtest? The image failed to show up. This will make it easier for us to debug the issue.
Ashraf Said
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!