In [1]:
%matplotlib inline
import numpy as np
import pandas as pd
from midas.weights import BetaWeights, ExpAlmonWeights
In [2]:
nlags=20
bw1 = BetaWeights(1., 5.)
bw2 = BetaWeights(1., 3.)
bw3 = BetaWeights(1.5, 5.)
pd.DataFrame({'w1': bw1.weights(nlags),
'w2': bw2.weights(nlags),
'w3': bw3.weights(nlags)}).plot()
Out[2]:
In [3]:
nlags=20
eaw1 = ExpAlmonWeights(0.01, -0.0025)
eaw2 = ExpAlmonWeights(0.01, -0.0099)
eaw3 = ExpAlmonWeights(0.099, -0.0099)
pd.DataFrame({'w1': eaw1.weights(nlags),
'w2': eaw2.weights(nlags),
'w3': eaw3.weights(nlags)}).plot()
Out[3]:
In [4]:
nlags=20
bw1 = BetaWeights(1., 5., 0.1)
bw2 = BetaWeights(1., 3., 0.1)
bw3 = BetaWeights(1.5, 5., 0.1)
pd.DataFrame({'w1': bw1.weights(nlags),
'w2': bw2.weights(nlags),
'w3': bw3.weights(nlags)}).plot()
Out[4]:
In [ ]: