Notebooks for financial economics. Keywords: IPython notebook pandas statistics GDP inflation CPI PCE Fed FRED Ferbus unemployment wage income debt Case-Shiller housing asset portfolio equities SPX bonds TIPS rates currency Eurozone euro yen FX USD EUR JPY XAU gold Brent WTI oil Holt-Winters time-series forecasting econometrics
The pre-Xmas decline of over 25% in Bitcoin price in less than 24 hours induced a backwardation in futures pricing relative to spot. Easy to imagine a trading strategy somewhat like a put, given the borrowing rate against such assets.
But is it hard to imagine a call option one-year out at $50,000 strike? Some institution paid close to a million dollars in premiums last Wednesday for notional 275 Bitcoins (source: LedgerX CEO Paul Chou). The usual Black-* models should avoided to price this option, for the stochastic process is extremely non-Gaussian (Levy).
Fed Funds forecast one-year out is 1.82% using forefunds('18h', '19h') so this implies two 25 bp rate hikes expected. The first presser by the new Fed chairman will be most interesting to see.
[Please see https://git.io/fedfunds for forecasting the Fed Funds rate using futures contracts on LIBOR.]
__init__.py
file. So, for example, start exploring in the nb
notebook directory which does not include that file.
gemrat()
computes the mean geometric annualized rate at +3.97% (volatility of 20.17% with kurtosis at nearly 15), data starting at 2008-01-01. The street talks of possible "melt-up" -- how would a blow-off phase and its expected duration be characterized statistically?
foreinfl()
to forecast Unified Inflation. The best documentation for this function is https://git.io/infl which shows how it was derived by interacting with data and plots. This single function distills the forecasting process derived in the notebook. It's further discussed in new Appendix 2.
>>> foreinfl() # Inflation forecast
_1 UTC 2018-04-09 16:59:04
[2.1506, '2018-02-01', 1.5708, 2.7909, 2.0900]
Unified Inflation forecast in one function: Up to February 2018 data points, the geometric mean rate is 1.57%, the optimized Holt-Winter method expects 2.79% over the next year, whereas the 10-y BEI break-even rate using Treasuries is 2.09%. Thus, averaging them out: 2.15% is our near-term forecast. Notebook https://git.io/infl gives an in-depth analysis of inflation.