How to eliminate border effects on Wavelet denoising?
How to eliminate border effects on Wavelet denoising?
Loading saved threads...
caub · External communityPost link
External question — Quantitative Finance Stack Exchange
Author: caub
Original post: https://quant.stackexchange.com/questions/9976
License: CC BY-SA 3.0 — https://creativecommons.org/licenses/by-sa/3.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
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)
(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
but not perfect, several time steps further.. (the end slope is not matching well):
I'm also reading Wavelet thresholding methods, because this idea of relying on a fixed number of coefficients (8) is maybe problematic
Quote
Report
user2763361 · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: user2763361
Original post: https://quant.stackexchange.com/a/9979
License: CC BY-SA 3.0 — https://creativecommons.org/licenses/by-sa/3.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
What you are after are causal wavelets, which is an approach to wavelet filtering that only takes in present and past data.
http://soliton.ae.gatech.edu/people/dcsl/papers/aiaa04.pdf
Quote
Report
Barnaby · External communityPost link
External answer — Quantitative Finance Stack Exchange
Author: Barnaby
Original post: https://quant.stackexchange.com/a/17416
License: CC BY-SA 3.0 — https://creativecommons.org/licenses/by-sa/3.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Your signal on the edges after denoising will be always altered by the boundary effect of the extension of the data which is incorporated in the reconstruction of the filter as per how wavelets are constructed (take pass and future data) the effect will be greater the longer the filter length you select as it implies more coeficients. Causal wavelets as mentioned by user2763361 will be sucesful on this however a significant amount of information will be lost as it will only account for pass history of the data.
Another point I wanted to make is that non stationary Wavelet denosing thresholding and similar and their mixed procedures are not very good at eliminating noise (they are brute force mechanisms). So the frequency location of your signal which will yield your signal will still be blurried.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Quantitative Finance Stack Exchange Author: user2763361 Source score (net votes, not local likes): 2 Original post: https://quant.stackexchange.com/a/9979 License: CC BY-SA 3.0 — https://creativecommons.org/licenses/by-sa/3.0/ Adaptation: HTML converted to plain text; contact email addresses removed. What you are after are causal wavelets, which is an approach to wavelet filtering that only takes in present and past data. http://soliton.ae.gatech.edu/people/dcsl/papers/aiaa04.pdf
Checking account access…