Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Often, I found that I'd rather modify the NT strategy analyzer optimizer type rather than my strategy that I developed. This is one such strategy optimizer type that I wrote. It is similar to the linear rsquared trendline function in MS excel. This optimization will maximize the linearity of the equity curve.
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 provided an updated attachment that removes some redundant code.
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 variablity 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.
Thanks for sharing this. I was looking for something like this on the Ninja board and Bertrand suggested I look at this. I would like to optimize based on the profit curve being as close as possible to a straight line. I assume that is what your download in the previous post with R2 does -- correct? What is the difference with the next download? Does it still look at the equity curve or only at Sharp and Net Profit?
Such a newby question, but how do I incorporate this into my optimisation? Currently I can only see the 'default' and 'Genetic', and the default options for 'optimize on'.
Be great to be able to incorporate this into some of my strategies!
Thanks!
Edit: I just had the option show up in 'optimize on' list. Awesome, thank you.