Dear All,
Is there a way I can collate the entry and exit results of a trading period in a dataframe and see the result after running the backtest?
QUANTCONNECT COMMUNITY
Dear All,
Is there a way I can collate the entry and exit results of a trading period in a dataframe and see the result after running the backtest?
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.
Louis Szeto
Hi Temitope
When you finished the backtest, you can download the orders from top right hand corner in Order tab. That will be a .csv file seperated by comma. Wish this helps.
Cheers
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.
Frank Giardina
Temitope
Are you trying to track the trades/orders within our backtest as you are running or just want the end result as Louis mentions above?
Frank
.ekz.
Temitope Omojola, how far? Bawoni.
A little more detail will help the community help you, but it sounds like you are looking to analyze your backtest results in a pandas dataframe.
Assuming that's correct, it's not clear what you mean by “entry and exit results”, do you mean you have different entries and exits, and you would like to compare performance? Or perhaps you just need to analyze your results in a dataframe. In which case, Louis's suggestion might work best: export as CSV and then load it back into python, perhaps in a research notebook.
Hope this helps. If not, feel free to add more detail, outlining your specific goals and challenges.
Temitope Omojola
Thanks everyone for the answer. Just like @.ekz. had stated, I need different entry and exit trading dates. However, just like @Louis Szeto suggested, I downloaded the file, but it's presently in JSON and not well-structured. I'll try to load it into Python to pull out what I need.
Temitope Omojola
.ekz. Did you just write Yoruba? Wow! 😊 We can connect. My email is momojola@aust.edu.ng
Temitope Omojola
@Frank Giardina: Yes.
Louis Szeto
Hi Temitope
If you would like to track order event within backtest, you could use OnOrderEvent(self, orderEvent). It will be called when orders are made.
And for the end of backtest result, it should be a csv file for orders, json file for insight and overall result. Make sure to download the right one, you can easily manipulate the csv file in excel for your analysis.
Cheers
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.
Rushi Shelat
Derek Melchin
Hi Rushi,
To unsubscribe, click the "Follow Discussion" button at the top of this thread.
Best,
Derek Melchin
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.
Temitope Omojola
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!