Adv_Fin_ML_Exercises icon indicating copy to clipboard operation
Adv_Fin_ML_Exercises copied to clipboard

FracDiff for -d values

Open jmelo11 opened this issue 6 years ago • 1 comments

While trying to apply the Franctionally differentiated logic to a time series i found that a negative value for d make the W series tend to infinity and the difference between weight very small. I belive that the idea of applying a negative value of d to the already FD series is to recover the original values. This can be achieve fixing the length of the W list. Im using the following setup:

def getWeights_FFD(d):
        # thres>0 drops insignificant weights
        w=[1.]
        for k in range(1,50):
            w_=-w[-1]/k*(d-k+1)
            w.append(w_)
        w=np.array(w[::-1]).reshape(-1,1)
        return w

Any comments on this approach?

jmelo11 avatar Oct 24 '18 17:10 jmelo11

this step create a fir filter, maybe it can recover the signal, but like any derivative to integral you lost part of "constant" value, i don't know if it will work, noramlly integral uses iir filters

rspadim avatar Mar 14 '19 23:03 rspadim