Optimisation! Share your experiences, please. - page 6

 


To give you an example ... EA chart over 7 years... ( profit 10 p) stop 300 but profit floats with the price even if in loss... Profit to drawdown ratio is about 25 for seven years... it's not much in principle... ...but somewhere around 200 p.a. can be taken out.
 
AndyGri:
That's great! I agree. The yield curve should be straight. Thanks for the idea. I want to do the same, but I'm afraid I don't have enough experience to program it :(
It cannot be straight (unless there was only 1 transaction in the history). In fact the yield curve is a broken line. That's why I figured out that for it the linear correlation coefficient should be calculated. The closer this coefficient is to 1 in absolute value, the more linear the yield curve is.

As for how to construct it, it would be easier if I do it and post it. The principle is universal and does not depend on trading system, because the curve is taken from trade history. The entire algorithm is laid down in the Expert Advisor's deinit() event and the results are written to the csv file during optimization. We only need to take this very file, sort out by linear correlation coefficient, i.e. find the largest value (the absolute value of the coefficient cannot exceed 1) and set the Expert Advisor with appropriate external parameters. The csv format can also be sorted in Exel.
 
Reshetov:
That's why I figured out that it requires a linear regression coefficient. The closer this coefficient is to 1 in absolute value, the more linear the yield curve is.
I would like (for those who studied arithmetic in parochial school) to understand what linear regression coefficient of 1 we are talking about? The linear regression equation is the straight line equation y=a*x+c. On the X-axis, I think, are numbers of deals (1,2,3.....N), on the Y-axis, we put the balance in the deposit currency (1000USD, 10000USD, 100000USD....., etc.). What formula is used to say that a=1, or does it tend to it? What is the normalisation principle used in this?
 
In fact, there are two parameters to consider here:
  • the steepness factor (parameter a in the equation y=a*x+c.) , let's call it MO , only those where MO>0 are of interest
  • The standard deviation of the linear regression , let's call it S, we are interested in those that are as close to zero as possible.
In the output file we get a two-dimensional array on which we look for these regions.
 
Rosh:
Actually there are two parameters to be considered:
  • the steepness coefficient (parameter a in the equation y=a*x+c.) , let's call it MO , only those where MO>0
  • the standard deviation from the linear regression , let's call it S , those as close to zero as possible are of interest
  • .

In the output we get a two-dimensional array that we use to look for these areas.

Not quite clear. Could you post a more detailed example?
We have a series of pairwise values of a and S for each of the optimization runs. We can plot these points on the graph by taking the axes of the two-dimensional graph as a and S data. I suppose we will get some smeared area of samples (alternatively, just some curvilinear curvature with extremums). So how can we get a coefficient equal to 1 if the axes are quite different? How does it come out? And what exactly can we tell from this curvature of results except that it has extrema? Extrema can be seen in the tester reports without making an additional chart - just press the button to sort the optimization results.
 
I didn't say anything about a factor of 1. I just described how I see it - using a linear regression approximation of the test results. I can only illustrate it with the figure from article 20. Arrays and technical indicators on them


 

The figure shows just the initial stage of your proposal (getting the values of a and S). That is, the figure shows the result of one run in the tester. It is not difficult to obtain parameters a - linear regression coefficient and RMS for this graph. Suppose we have 1000 such charts based on the optimization results. As a result, we have an array of values 1000x2, where the first index is the run number and the second index is the values of a and S respectively. Further, what can output of the obtained a and S values be shown on a two-dimensional graph along the axes, apart from extrema that may be several? I would just like to understand what you mean?

 
solandr:
Reshetov:
That's why I guessed that it requires a linear REGRESSION coefficient. The closer this coefficient is to 1 in absolute value, the more linear the yield curve is.
I would like (for those who studied arithmetic in parochial school) to understand what linear regression coefficient of 1 we are talking about? The linear regression equation is the straight line equation y=a*x+c. On the X-axis, as I understand it, are numbers of deals (1, 2,3.....N), on the Y-axis, we put the balance in the deposit currency (1000USD, 10000USD, 100000USD....., etc.). What formula is used to say that a=1, or tends to it? What is the normalisation principle used in this?
Sorry, we are talking about the linear correlation coefficient. I apologise for the misstatement.
 
Reshetov:
AndyGri:
Great! I agree. The yield curve should be straight. Thanks for the idea. I also want to do it, but I'm afraid I don't have enough experience to program it :(
In fact the yield curve is a polyline. That's why I guess we should calculate the linear correlation coefficient. The closer such a coefficient is to 1 in absolute value, the more linear the yield curve is.

As for how to construct it, it would be easier if I do it and post it. The principle is universal and does not depend on the trading system, because the curve is taken from the history of trades. The entire algorithm is laid down in the Expert Advisor's deinit() event and the results are written to the csv file during optimization. We only need to take this very file, sort out by linear correlation coefficient, i.e. find the largest value (the absolute value of the coefficient cannot exceed 1) and set the Expert Advisor with appropriate external parameters. The csv format can also be sorted in Exel.

I'd like that very much!!! :) I'm sick of analyzing optimization results with my eyes and selecting them by yield curve through Expert Advisor's run. It's too long... It's confusing forever...
 
nchnch:


To give you an example ... EA chart for 7 years... ( profit 10 p) stop 300 but the profit floats with the price even if in a loss.... ... Profit to drawdown ratio is about 25 over seven years... it's not much in principle... but about 200 p.a. can be earned.

Profit is floating, how is that? And how does it follow the price? They must be hiding something from me! :)
Reason: