1
$\begingroup$

I have been studying SG filters and i recently found another filter which seem to be commonly used in financial data smoothing which is the least-squares moving average, this filter is also called moving linear regression or time series forecast, here this filter is defined as :

The endpoint moving average (EPMA) establishes an average price by fitting a least squares straight line (see Linear Regression) through the past N days closing prices and taking the endpoint of the line (ie. the line as at the last day) as the average.

Which is similar to the SG filter in the sense that both locally fit a polynomial function using the method of least squares, however the SG filter appear smoother and more precise than the EPMA, so why are they appearing different ?

I might be wrong but my guess is that a 1st order SG filter using the coefficients show'n below :

enter image description here

will start convolution where N = 14 down to N = 0 while the EPMA will reverse the order of the convolution starting with N = 0 to N = 14, i don't know if i'am clear.

$\endgroup$
  • $\begingroup$ The impulse responses associated with so defined EPMA and SG-1 are not the same... ? How did you conclude that they were ? $\endgroup$ – Fat32 Jul 11 '19 at 21:20
  • $\begingroup$ @Fat32 Sorry, it wasn't a conclusion, it was based on my guess, since both fit a polynomial function to a signal i assumed that for my guess they would share the same impulse response, i will check the impulse responses then.. $\endgroup$ – alexgrover Jul 11 '19 at 22:28
  • 1
    $\begingroup$ In a previous question of yours, I have provided the impulse response of SG filters. And the impulse response of EPMA is provided in your link. You can check that they are different. So the question what's the difference is answered like they are different filters with different impulse responses ? Of course one could also wonder the effect of the difference in their smoothing, but that's a complex issue. Especially financial data analysis have various concerns hidden in their understanding of what's important and what's not... $\endgroup$ – Fat32 Jul 11 '19 at 23:34
  • 1
    $\begingroup$ @Fat32 I apologize, you are right and my guess was quite precipitated, after checking both filters their impulse responses are nothing alike, i used an epma and sg filter of both degree 2 and it appear that the sg filter return a set of coefficients who describe a full parabola while the epma look like an inversed parabola not fully symmetrical. $\endgroup$ – alexgrover Jul 12 '19 at 16:04
  • 1
    $\begingroup$ No need to apologize of course... ;-) $\endgroup$ – Fat32 Jul 12 '19 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.