Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Refactor econ docstrings to numpydoc format #20

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions fecon236/econ/infl.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Python Module for import Date : 2018-06-17
# vim: set fileencoding=utf-8 ff=unix tw=78 ai syn=python : per PEP 0263
'''
_______________| infl.py :: Inflation module for fecon236
"""Inflation module for ``fecon236``

- "Unified" inflation is a sythesis of CPI, CPIc, PCE, PCEc.
- For derivation of ``foreinfl`` see fecon235/nb/fred-inflation.ipynb,
which is rendered as https://git.io/infl

- For derivation of foreinfl() see fecon235/nb/fred-inflation.ipynb,
which is rendered as https://git.io/infl
Notes
-----
For LATEST version, see https://git.io/fecon236

CHANGE LOG For LATEST version, see https://git.io/fecon236
2018-06-17 Spin-off foreinfl() from top.py.
'''
Change Log
----------

* 2018-06-17 Spin-off ``foreinfl`` from ``top.py``.

"""

from __future__ import absolute_import, print_function, division

Expand All @@ -23,15 +28,17 @@


def foreinfl(n=120, alpha=1.0, beta=0.3673):
'''Forecast Unified Inflation 1-year ahead per https://git.io/infl
which a rendering of fecon235/nb/fred-inflation.ipynb.
SUMMARY output: [Average, "infl-date", GMR, HW, BEI]
e.g. [2.2528, '2018-01-01', 1.5793, 3.0791, 2.1000]
where Average is the mean of three orthogonal methods:
GMR for geometric mean rate, HW for Holt-Winters time-series,
and BEI for Break-even Inflation from the Treasury bond market.
Default n denotes 120-month history, i.e. last 10 years.
'''
"""Forecast Unified Inflation 1-year ahead

per https://git.io/infl which a rendering of
fecon235/nb/fred-inflation.ipynb.

output: [Average, "infl-date", GMR, HW, BEI] e.g. [2.2528, '2018-01-01',
1.5793, 3.0791, 2.1000] where Average is the mean of three orthogonal
methods: GMR for geometric mean rate, HW for Holt-Winters time-series,
and BEI for Break-even Inflation from the Treasury bond market. Default n
denotes 120-month history, i.e. last 10 years.
"""
# Holt-Winters parameters alpha and beta are optimized
# from the 1960-2018 dataset, consisting of 697 monthly points.
# Each "way" is an orthogonal method, to be averaged into way[0].
Expand Down