cff_plot.py 233 字节
Newer Older
1 2 3 4 5 6 7 8 9
import statsmodels.api as sm

from load_macrodata import dta

cf_cycles, cf_trend = sm.tsa.filters.cffilter(dta[["infl", "unemp"]])

import matplotlib.pyplot as plt
fig, ax = plt.subplots()
cf_cycles.plot(ax=ax, style=['r--', 'b-'])