Skip to content
Open
Show file tree
Hide file tree
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
30 changes: 20 additions & 10 deletions fecon236/rates/credit.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# Python Module for import Date : 2018-11-29
# vim: set fileencoding=utf-8 ff=unix tw=78 ai syn=python : per PEP 0263
'''
_______________| credit.py :: Credit risk module for fecon236
"""Credit risk module for fecon236

- For detailed derivation of Unified Credit Profile, creditprof(),
- For detailed derivation of Unified Credit Profile, `creditprof`,
see fecon235 notebook, https://git.io/creditprof

CHANGE LOG For LATEST version, see https://git.io/fecon236
2018-11-29 Add creditprof().
'''
Notes
-----
For LATEST version, see https://git.io/fecon236


Change Log
----------

* 2018-11-29 Add `creditprof`.

"""

from __future__ import absolute_import, print_function, division

Expand All @@ -19,10 +26,13 @@


def creditprof():
'''Credit profile derived from mortgage and corporate credit spreads.'''
# Derivation in fecon235/nb/fred-credit-spreads.ipynb
# See https://git.io/creditprof
# First, note the oldest start date common among all series herein:
"""Credit profile derived from mortgage and corporate credit spreads.

Derivation in fecon235/nb/fred-credit-spreads.ipynb
See https://git.io/creditprof
First, note the oldest start date common among all series herein:
"""

start = '1991-08-30'
# ----- MORTGAGE CREDIT SPREAD
# Freddie Mac 15-Year Fixed Rate Mortgage v. Treasury 10-year bond.
Expand Down
27 changes: 18 additions & 9 deletions fecon236/rates/fedfunds.py
Original file line number Diff line number Diff line change
@@ -1,15 +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
'''
_______________| fedfunds.py :: Fed Funds rate module for fecon236
"""Fed Funds rate module for fecon236

- For derivation of forefunds() which forecasts the Fed Funds rate,
- For derivation of `forefunds` which forecasts the Fed Funds rate,
see https://git.io/fedfunds

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


Change Log
----------

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

"""
from __future__ import absolute_import, print_function, division

from fecon236.util import system
Expand All @@ -19,9 +25,12 @@


def forefunds(nearby='16m', distant='17m'):
'''Forecast distant Fed Funds rate using Eurodollar futures.'''
# Derivation in fecon235/nb/qdl-libor-fed-funds.ipynb
# See https://git.io/fedfunds
"""Forecast distant Fed Funds rate using Eurodollar futures.

Derivation in fecon235/nb/qdl-libor-fed-funds.ipynb

See https://git.io/fedfunds
"""
ffer = get('DFF')
# ^Retrieve Fed Funds effective rate, daily since 1954.
ffer_ema = ema(ffer['1981':], 0.0645)
Expand Down