Back

Feedback Backtest not working

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

Update Backtest








0

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.


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.

0

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.


Thanks , I will try that and will keep you updated , one question more where in the documentation I can find the symbols which trade on more than one exchange , i.e. double and triple listing of shares alongside which class of shares I can trade ? secondly jard referred me back to documentation to find more information about how I can turn minutly data especially for equities and FOREX in to hourly frequencies or secondly frequancies , I mean for example 60 min , 150 min ,.....etc and same goes for seconds i.e. 18 sec , 25 sec ....etc and lastly do I have the flexibility to define new trading technical indicators / models

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
0

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.

0

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.


here is the screeshot , I have got it has something to do with global naming , i mean iterating over symbols while already self.symbols already reserved / taken by the system-based library

[cid:7b5b4ebb-5065-495c-b04d-8227fe4b4358]



Best Regards
0

Can you attach a backtest? The image failed to show up. This will make it easier for us to debug the issue.

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed