Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

After reading a few references here to wavelets, I'm trying to denoise (or at least 'compress') a time-series of forex prices using a Daubechy04 wavelet (forward tranform, 8 most important (in absolute value) coeffients are kept among the 64 values, reverse-transform).

When a down or up trend is occuring, there is a border-effect since the first and last values differ, on the last point (and the first, but that doesn't matter, since it's possible to remove some of the first points).

The wavelet is in red, (in blue, a moving average)

enter image description here

(This happens also, with Discrete Fourier tranform, where I believe it's normal since they assume periodicity)

I tried to diff (b[i] = a[i+1]-a[i]) then undiff the series before the tranform: terrible results.

Another try with b[i] = a[i] - ((a[63]-a[0])/63*i + a[0]) (subtracting the line between the two extremities: better 'visual' result enter image description here
but not perfect, several time steps further.. (the end slope is not matching well): enter image description here

I'm also reading Wavelet thresholding methods, because this idea of relying on a fixed number of coefficients (8) is maybe problematic

share|improve this question

1 Answer 1

What you are after are causal wavelets, which is an approach to wavelet filtering that only takes in present and past data.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.