Backtest Report JSON to CSV

Back

Is there a way to get backtest result JSONs into csvs? I.e., take the PNL and generate a csv file. Currently, it seems that the best option would be to do this locally: 

https://www.quantconnect.com/forum/discussion/4459/extract-daily-p-amp-l-from-a-backtest/p1

Wondering if this useful tool would be added into the codebase at some point, reasons against it, or maybe if it already has been added?

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.


This will not likely be added to LEAN for a few reasons. The strongest of these is that the results are a complex/multi-dimensional object which does not condense well to a 2D table format. Opening and extracting the results are easy though so I'd recommend simply using the JSON files and parsing them as needed:

var result = Json.DeserializeObject<BacktestResult>(fileContents);
result.Charts["Strategy Equity"]["Equity"]

 

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