Spectral Dilation
Spectral Dilation
Spectral Dilation
com
SPECTRAL DILATION John Ehlers
ehlers@stockspotter.com
approximately 6 dB/Octave
• 1/F Noise is apparently
universal Spectral
Dilation
• Model shows two mandates
for Technical Analysis
1) We must stay several octaves
away from the Nyquist
Frequency due to Quantization
Noise
2) Indicators must compensate for
spectral dilation to get an
accurate frequency response
“Modelling Share Volume Traded in Financial Markets”
By V. Gontis
Lithuanian Journal of Physics, 2001, 41, No. 4-6, 551-555
StockSpotter.com
Quantization Noise John Ehlers
ehlers@stockspotter.com
• Highest possible frequency has two samples per cycle (Nyquist Frequency)
– 2 day period on daily bars
StockSpotter.com
OverSampling John Ehlers
ehlers@stockspotter.com
Since we must use simple filters in trading we have only a few poles
in the transfer response - BUT – the data are increasing at the rate
of 6 dB / Octave. The result is there is no real filtering.
StockSpotter.com
SMOOTHING FILTERS John Ehlers
ehlers@stockspotter.com
EMA (1 pole)
SMA
2 double zeros
StockSpotter.com
SuperSmoother Filter Code ehlers@stockspotter.com
John Ehlers
SuperSmoother Filter
© 2013 John F. Ehlers
a1 = expvalue(-1.414*3.14159 / 10);
b1 = 2*a1*Cosine(1.414*180 / 10);
c2 = b1;
c3 = -a1*a1;
c1 = 1 - c2 - c3;
Filt = c1*(Close + Close[1]) / 2 + c2*Filt[1] + c3*Filt[2];
One pole HighPass and SuperSmoother does not produce a zero mean
Roofing Filter
© 2013 John F. Ehlers
//Two Pole Highpass filter passes cyclic components whose periods are shorter than 48 bars
alpha1 = (Cosine(.707*360 / HPPeriod) + Sine (.707*360 / 48) - 1) / Cosine(.707*360 / 48);
HP = (1 - alpha1 / 2)*(1 - alpha1 / 2)*(Close - 2*Close[1] + Close[2]) + 2*(1 - alpha1)*HP[1] - (1 - alpha1)*(1 - alpha1)*HP[2];
//Smooth with a Super Smoother Filter
a1 = expvalue(-1.414*3.14159 / 10);
b1 = 2*a1*Cosine(1.414*180 / 10);
c2 = b1;
c3 = -a1*a1;
c1 = 1 - c2 - c3;
Filt = c1*(HP + HP[1]) / 2 + c2*Filt[1] + c3*Filt[2];
Conventional Stochastic