File: cff_plot.py

package info (click to toggle)
statsmodels 0.13.5%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 46,912 kB
  • sloc: python: 240,079; f90: 612; sh: 467; javascript: 337; asm: 156; makefile: 131; ansic: 16; xml: 9
file content (9 lines) | stat: -rw-r--r-- 233 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
from load_macrodata import dta
import matplotlib.pyplot as plt

import statsmodels.api as sm

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

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