From 6985db61088c1a9a1ff0f5fe61f9232e1716f93d Mon Sep 17 00:00:00 2001 From: addisonlynch Date: Wed, 22 May 2019 13:51:28 -0400 Subject: [PATCH] Refactor infl.py docstrings to numpydoc format --- fecon236/econ/infl.py | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/fecon236/econ/infl.py b/fecon236/econ/infl.py index e0e4c85..ca6fd23 100644 --- a/fecon236/econ/infl.py +++ b/fecon236/econ/infl.py @@ -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 @@ -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].