Hi all,
I'm currently running some backtest and I was wondering myself how I could add new columns in the `Orders` report. As I think that is not possible at this moment a workaround woudl be add this extra information in the `tag` columns.
I'm interested into add the profit of each trade in the report but I haven't been able to implement it so far. One possible solution could be loop over all the trades in the `OnEndOfAlgorithm` and edit all the tags.
Could you indicate me what would be the correct way to export this kind of information?
Thank you
Dirk bothof
Interested in this as well, I guess you could keep a dataframe in memory in switch you could solve this. Alternative is downloading the orders and build a parser youself to get the goodies out. However, I do believe that this so generic that it might be a nice addition. Curious to what the QC people think of this!
Alexandre Catarino
Hi CarlosEspeleta ,
Once a backtest is finished, we can download its results, in json format, in the Overview tab.
In this file, we can find the ClosedTrades entry that is a list of serialized Trade objects. The Trade object has detailed information about each trade (fill-to-fill, first-in-first-out), including ProfitLoss, that has been closed during the backtest.
CarlosEspeleta
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!