NinjaTrader 7 Miscellaneous - R Squared - Coefficient of Determination
futures io


Categories Help    

NinjaTrader 7 Miscellaneous
Downloads in this section are for NinjaTrader 7 and include files that don't fit into any other category (ie: Market Replay Data, Custom Bar Types)


Entries
R Squared - Coefficient of Determination
Optimization Type:
RSquared is the coefficient of determination.

The optimization performs simple linear regression of the equity curve by the least squares method to determine slope of a linear line. This linear regression line is then correlated with the equity curve by trade # to calculate r-squared. The closer to 1 the better the fit. I have wrote the code to only return result with positive net income.

I have pulled the following definition from Investopedia which provides a very good explanation.

What Does Coefficient of Determination Mean?
A measure used in statistical model analysis to assess how well a model explains and predicts future outcomes. It is indicative of the level of explained variability in the model. The coefficient, also commonly known as R-square, is used as a guideline to measure the accuracy of the model.

Investopedia explains Coefficient of Determination

One use of the coefficient of determination is to test the goodness of fit of the model. It is expressed as a value between zero and one. A value of one indicates a perfect fit, and therefore, a very reliable model for future forecasts. A value of zero, on the other hand, would indicate that the model fails to accurately model the dataset.

Copy file to directory ".../Ninja Trader 7/bin/custom/type/" and open up any indicator for editing and recompile. This optimization type will then show up in strategy analyzer.

Revision 0.12 - Uploaded 11/10/2011: Fixed error in calculation


Category NinjaTrader 7 Miscellaneous 
 
Suggest other entries I might like
Details: R Squared - Coefficient of Determination
Category: NinjaTrader 7 Miscellaneous 


November 9th, 2011
Size: 3.63 KB
Downloaded: 202 times
 

 
Category
 



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.