Why A Cascading SMA Approximate A Gaussian Filter ?Introduction
The gaussian filter don't see many uses in technical analysis and financial data smoothing in general, however it possess really interesting properties and a really close relationship with the simple moving average.
The gaussian filter is a filter which possess a function approximately gaussian (bell shaped curve) as : impulse response, step response and frequency response. This characteristic is pretty cool actually, the gaussian function is always mysterious.
Now why do I talk about sma and estimation ? Well it is true, you can estimate a gaussian filter by applying an sma to another sma and so on such as : sma(...sma())
But why ? Just why is that so ? Well there are a lot of explanations, some of them involving the central limit theorem which would lead to a statistical explanation but I'll give a simpler explanation of this case by using signal processing.
Understanding Impulses Responses
The impulse response of a filter is the filter output using an impulse function as input or more simply : filter(impulse)
The impulse function is a simple function equal to 1 at a certain point in time, for example we can use : impulse = 1 if t = 10 else 0, where t = 1,2,3...inf
The impulse response of a filter tell us how to actually make the filter, for example :
a = filter(impulse)
b = sum(input*a) = filter(input)
This process is called convolution, and is simply the sum of the product of two functions, the input function and the kernel function, a kernel is just a way to say filter coefficients.
The Explanation
Now that you know that, let's explain why sma(...sma()) approximate a gaussian filter.
To do so let's take an impulse function and let's start applying an sma to it such as sma(impulse) (the sma period doesn't matter here)
Only one sma give a constant, let's use two sma's such as sma(sma(impulse))
This give us a triangular function, this is why sma(sma()) is often called triangular moving average, now let's repeat the process and add more sma's.
Do you see ? We are approximating a gaussian curve, if we do it many times the approximation will be even more correct.
Now let's recall :
The impulse response of a gaussian filter is a gaussian function f
The impulse response of many sma's give a function f' who approximate a gaussian function, therefore f ≈ f'
So sum(input*f') ≈ sum(input*f) and therefore sma(...sma(input)) ≈ gaussfilter(input)
Note : the process of applying a filter several time is called cascading
Conclusion
Simple isn't it ? The simple moving average is always fun to use and posses many properties, now you don't want to use such method because it's mega inefficient.
But maybe that you want to know about an efficient gaussian filter implementation ? I can work on it. Thanks for reading !
Gaussian
Gaussian Channel Turned Green, whatmagonna dooo???!!!Heya All, Archie here! Kudos if you got my "whatmagonna dooo???!!!" reference :D
I have good news and bad news for ya and I hope you are excited to hear all about it. Well, are you ready? here it comes...
Good news: Gaussian Channel on weekly Turned Green
Bad news: It does not mean anything what so ever!!!!..... and let me elaborate a bit about the whole thing.
1. The fact that some rare occurrence is taking place bears absolutely no relevance with future expectations. As you might have heard already, past performances by no means are predictors for future outcomes.
2. As a predictor of the bullish trend Gaussian Channel being green is a horrible indicator. For Pete's sake, it stayed green till October 2018..... If not the capitulation in BTC price it would have remained green, forever and ever.
3. I can just as easily select 2 rare EMAs that rarely come close to each other for example EMA 1000 and EMA 2000 on weekly and celebrate like a fool start of the new bull market cycle every time they golden cross and give a call to the wonderful artist and the father of the Fib Circles of death and capitulation every time these lines go to the death cross mode. My point here is that the fact that something turned green does not mean diddly squat.
4. Gaussian Channel is an unreliable indicator of start as well as finish and we should probably avoid giving it too much significance if anything at all.
Now take a look at the indicator that I have included in my chart. Volume Impact by Umul Ozkul . This oscillator looks at the price and volume combination along with major EMAS and gives a snapshot of where we are in terms of the market dynamics. As you can see when the signal line is above zero it shows great promise of prosperity and when it goes under Zero it indicates that the party is Freaki'n OVER! As you can see this signal line phenomenally predicted the start of the bull market and without delay has notified traders and investors that the party was over back in January 2018. It did not wait all the way to October 2018 to give us the bad news like Gaussian Channel.
Forgive me this unsolicited rant. I just felt like I had to address this hipe around BS one way or the other.
Anywhooo... Please stay safe people, and have a productive as well as a lucrative week.
Cheers
Archie