In [1]:
%matplotlib nbagg
%pylab
In [2]:
import pandas_wrapper
import numpy as np
In [3]:
s = np.hstack([
np.arange(1, 100) + np.random.normal(0, 10, 99),
np.arange(100, 50, step=-1) + np.random.normal(0, 10, 50),
np.arange(300, 400) + np.random.normal(0, 10, 100),
])
In [4]:
fig, axs= subplots(2,1,sharex=True)
axs[0].plot(s)
tf = pandas_wrapper.l1tf(s, 0.5)
axs[0].plot(tf)
d1 = tf[1:] - tf[:-1]
d2 = d1[1:] - d1[:-1]
axs[1].plot(d2)
Out[4]: