Author's dialogue. Alexander Smirnov. - page 39

 
Mathemat:
What are we doing with a and b? There is a proven formula for LR - there are no straight line k-types. There are trivial mash-ups. Prival, I'm talking exactly about LR, let's deal with it first.

I apologise, I must have misunderstood. I'll double-check the parabola formulas. Then I'll take care of RMS, sorry, it seemed to me that LR is an intermediate stage and you and Candide have solved it (almost a week was not on the forum, other things distracted me).
 
Prival: Re-checking the parabola formulas.
Yeah, me too. You on your favorite mathdot, I'll use my Maple.
 
Mathemat:
What are we doing with a and b? There is a proven formula for LR - there are no straight line k-types. There are trivial mash-ups. Prival, I'm talking about LR, let's deal with it first.
I'm interested in LR with a, b and RMS :). And the fact that you get an algorithm faster than with dummies I did not expect, the more pleasant :). Although with SSR it will be, I think, still slower than with bags. But it's true - neither a, nor b, nor RMS. Parabola is not directly interesting for me now, it is clear only that everything will be much more cumbersome there.
 
Prival:
Yurixx:


I can give the relevant analytical calculations.


Here from here if it's not too much trouble, with new data coefficients A and B may change, I think, though I may be mistaken :-). For LR it seems to be solved, but for parabolic regression how ?


Of course, with new data coefficients A and B change. How else could they change? Window size, i.e. number of LR points, does not change. The window slides - the LR line changes.

For parabolic regression I did the same thing as for LR: I got compact formulas for all coefficients and sko. Therefore, for fast calculation of PR it is only necessary, as well as for LR, to update some sums and, unlike LR, 2 arrays. As a result, the algorithm is only slightly inferior to the LR algorithm in terms of speed. I think it can be done for any degree, although the size of finite formulas grows with increasing order, of course.

 
lna01:
Yurixx:


Very much I want to know what may be unnecessary in these formulas ? :-)

As for the "real expression", where do you think all these formulas come from? If you substitute the finite formulas derived from MOC for A and B into this "real expression", then you get the above expression for RMS. I can give the corresponding analytical calculations.

OK, I agree, not in these :)
By definition, recursion is calculation of the next value using the previous one? Then cumulative sums calculation is the most natural recursion.
The point is that my calculation by "real expression" gives some inconsistency with these formulas. Here are the results for N=5 and N=20. The lines were counted as LR + 3*SCO, for the white line the RMS was taken as sqrt((RMS^2)*N/(N-2)). Red line is according to my formula, white line is according to your formula. For N=20 the red line is almost invisible, we can assume that the results coincide with a good accuracy. But for N=5 the differences are quite noticeable.

I don't mind, let it be recursion too. In this form it is elementary and saves time. Recursion in programming is more familiar to me - when a program calls itself. MQL allows it, but restricts the order of nesting. So, this recursion, although it makes the program more compact, but it hardly saves any time.

I think I know the reason why you got an inaccuracy for small N. Obviously, you in the formulas for the rate and variance, divide by (N-1). I, on the other hand, used dividing the sum by N. In this case all the cross sums go away and the formulas are very compact.

 
Yurixx:

I, on the other hand, have used dividing the sum by N. In this case all the cross sums go away and the formulas are very compact.

This may be justified. The estimate is biased, but if you don't work with very short LRs, the accuracy is quite sufficient.
 
Prival:
ANG3110:
and the period would change, then we would get a regression, like a suit sewn exactly to size, under the trend.

If there is an indicator that has this property. Would it be possible to share. Although I understand that this is no longer something that is posted in the public domain, but if you suddenly decide to, yellow trousers and two ku at a meeting + your favorite drink at this time of day will try to get :-).

Z.I. We need a parabola, LR is not interested


I can send you one. You have given the address before but I do not remember where. I can help you again.

 
lna01:
I'm just interested in LR with a, b and RMS :). And the fact that the algorithm will be faster than with mashki I did not expect, the more pleasant :). Although with SSR it will be, I think, still slower than with bags. But it's true - neither a, nor b, nor RMS. I am not interested in parabola at the moment, it is clear only, that everything will be much more cumbersome there.

If you're interested, here's a linear regression indicator without cycles. Calculates the regression from a large number of bars, in a fraction of a second.
Files:
at_lr0.mq4  2 kb
 

ANG3110

Better of course Skype there look for privalov-sv, you can also mail privalov-sv @ mail.ru will try to sort out the spam and find there a pearl.

 
ANG3110:

Well, I can send it to you. You've given me the address before, but I can't remember where. Send it to me again.


And is it only for the dedicated members of this topic or others (I mean me) can join ... (to get a suit).
Thank you in advance.
Reason: