File: bkf_plot.py

package info (click to toggle)
statsmodels 0.14.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 49,848 kB
  • sloc: python: 253,316; f90: 612; sh: 560; javascript: 337; asm: 156; makefile: 132; ansic: 16; xml: 9
file content (9 lines) | stat: -rw-r--r-- 222 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

cycles = sm.tsa.filters.bkfilter(dta[['realinv']], 6, 24, 12)

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