In [1]:
%matplotlib nbagg
%pylab


Using matplotlib backend: nbAgg
Populating the interactive namespace from numpy and matplotlib

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]:
[<matplotlib.lines.Line2D at 0x11dba8ba8>]