Back

This backtest result is too large to be visualized in a web browser, please use this Link to download

Sorry this isn't about a particular strategy. When a backtest is "too large to be visualized in a web browser", what is the simplest way to process the downloaded Json file to get the results (sharpe, etc). The REST API? Looked like the QCStudioPlugin on GitHub might be the right thing to use, but I noticed it is obsolete.
Update Backtest








I am about to ask a stupid question, but I am curious about this too, having never dealt with the json files:

If you do a search for "Sharpe" in the Json file in some text editor (like Notepad++), does it not take you to the 'processed results' section of the json file? From the documentation it looks like the json output file consists of sections, one of which is the algorithm information (whether or not it is running, the project id, etc), another of which is the series of x-y data, and another of which is the processed data (Sharpes, annualized std devs, etc.)
0

ah, if so, then I can read the json file (it's too large to simply open and "search" with a text editor) with some python or even C#.
0

We couldn't display that much data so rather than just failing we decided to leave it open to the community :) If you're keen you could make a visualizer which displays the data for analysis in matlab or similar. You could also inject this data into the local desktop charting GUI.
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. anyway, following Stephen's advice I just downloaded the json file, which was 220 MB. got the Sharpe at the bottom. was a bit surprised how big the file is; it's trading 100 stocks but there are lots and lots of stat arb portfolios derived from the 100 stocks, 1 minute resolution, 1 year backtest.
0

by the way, what's the difference between the Sharpe in the "Trade Statistics" and the Sharpe in the "Portfolio Statistics"?


"M12_20151104": {
"TradeStatistics": {
"StartDateTime": "2015-02-17T14:35:00Z",
"EndDateTime": "2015-11-04T18:08:00Z",
"TotalNumberOfTrades": 394846,
"NumberOfWinningTrades": 119883,
"NumberOfLosingTrades": 274963,
"TotalProfitLoss": 3345763.65,
"TotalProfit": 13233507.73,
"TotalLoss": -9887744.08,
"LargestProfit": 82134.18,
"LargestLoss": -52655.00,
"AverageProfitLoss": 8.473591349538807535089629913,
"AverageProfit": 110.38685827014672639156510974,
"AverageLoss": -35.960271309230696493710062693,
"AverageTradeDuration": "17:26:03.4130000",
"AverageWinningTradeDuration": "1.04:43:11.7750000",
"AverageLosingTradeDuration": "12:30:50.0790000",
"MaxConsecutiveWinningTrades": 432,
"MaxConsecutiveLosingTrades": 1128,
"ProfitLossRatio": 3.0696892501423190484521437338,
"WinLossRatio": 0.435996843211632110502140288,
"WinRate": 0.3036196390491482755302067135,
"LossRate": 0.6963803609508517244697932865,
"AverageMAE": -86.03486880961184867011442445,
"AverageMFE": 115.11451226554150225657598122,
"LargestMAE": -142276.81,
"LargestMFE": 346143.78,
"MaximumClosedTradeDrawdown": -321999.69,
"MaximumIntraTradeDrawdown": -572538.33,
"ProfitLossStandardDeviation": 473.05669782083,
"ProfitLossDownsideDeviation": 267.861294172797,
"ProfitFactor": 1.3383748227027332204172501196,
"SharpeRatio": 0.0179124223133781233153104795,
"SortinoRatio": 0.0316342507629060580361855185,
"ProfitToMaxDrawdownRatio": 10.390580344968655094046829672,
"MaximumEndTradeDrawdown": -346143.78,
"AverageEndTradeDrawdown": -106.64092091600269472148635131,
"MaximumDrawdownDuration": "57.00:45:00",
"TotalFees": 448537.0
},
"PortfolioStatistics": {
"AverageWinRate": 0.0000066059043788996060557611,
"AverageLossRate": -0.000001045873626477047556611,
"ProfitLossRatio": 6.3161592487527720858481813626,
"WinRate": 0.2126986703796551541129568521,
"LossRate": 0.7873013296203448458870431479,
"Expectancy": 0.5561373444955313485732023101,
"CompoundingAnnualReturn": 0.24596088960037,
"Drawdown": 0.017,
"TotalNetProfit": 0.20352824663,
"SharpeRatio": 1.8252072577079662887420519352,
"Alpha": 0.1876167450427321655076988539,
"Beta": 0.0252493927454079,
"AnnualStandardDeviation": 0.103242213391559,
"AnnualVariance": 0.0106589546259881328,
"InformationRatio": 0.9065737988426274622668957399,
"TrackingError": 0.171961060101545,
"TreynorRatio": 7.4630878882574046020044116773
},
0

@Marc

PortfolioStatistics.SharpeRatio is annualized and is the ratio of AnnualizedPerformance to AnnualizedStandardDeviation (calculated using daily returns)

TradeStatistics.SharpeRatio is simply the ratio of AverageProfitLoss to ProfitLossStandardDeviation (calculated using trades)
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 Stefano.

by the way, when I tried to download some other backtest results I got this (I tried to download too late?):

This XML file does not appear to have any style information associated with it. The document tree is shown below.

AccessDenied
Request has expired
2016-05-04T16:53:58Z
2016-05-05T06:17:25Z
113B81FBBA40DE24

G7MgMAWUsE7rEkfHgvzJ+H0RjeLlDCvAtXXdFWy+P3blq4bH8qGUbs82azUTyP2HFqCBaOzZ4Sw=

0

nevermind, I closed the backtest then reopened and was able to download....
1

On another backtest, the following popped out:

"TotalPerformance": {

 

"PortfolioStatistics": {

"AverageWinRate": 0.0001810091159595681428710814,

"AverageLossRate": -0.00006255633201391102503542,

"ProfitLossRatio": 2.8935378743004955127604226843,

"WinRate": 0.7410780669144981412639405204,

"LossRate": 0.2589219330855018587360594796,

"Expectancy": 1.8854155213449954664267295988,

"CompoundingAnnualReturn": 0.549470042765186,

"Drawdown": 0.164,

"TotalNetProfit": 0.59601050762,

"SharpeRatio": 1.8082411511951073875973547271,

"Alpha": 0.4683423400262419205155246931,

"Beta": -0.0373557036174521,

"AnnualStandardDeviation": 0.26008345895375,

"AnnualVariance": 0.067643405621346744,

"InformationRatio": 1.6917951309870541112841434756,

"TrackingError": 0.308860423267392,

"TreynorRatio": -12.589606611120538135495412176

},

 

It is showing a drawdown of 16.4%.  on the other hand, when I extracted every single ProfitLoss Record and graphed it, it wasn't showing a drawdown of that size.  In fact the cumulative PL curve derived from the ProfitLoss was very smooth (looking more like 4+ sharpe level smooth).  any thoughts on this?

0

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