ustreasuries: US Treasury bond analysis

Description GitHub Wiki Vignettes Functions Installation Author(s) References Examples

Description

The ustreasuries package downloads daily Constant-Maturity Treasury (CMT) yields and provides visualizations & analytics that use that data including all the 'greeks' for derivative analysis.

GitHub Wiki

https://github.com/grfiv/ustreasuries/wiki

Vignettes

Functions

Installation

## Windows users STOP: see https://github.com/hadley/devtools

install.packages("devtools")

devtools::install_github("grfiv/ustreasuries", build_vignettes=TRUE)

## NOTE: If you get a 404 on installation, contact the author for the 'auth_token' parameter

(restart R)

Author(s)

George Fisher GeorgeRFisher@gmail.com

References

Back, K., A Course in Derivative Securities 2005 Springer Finance ISBN 9783540253734

Consiglio A. and Guirreri S.S. Simulating the Term Structure of Interest Rates with arbitrary marginals. International Journal of Risk Assessment and Management, 15(4), September 2011.

Hull, J., Options, Futures and Other Derivatives Seventh Edition 2008 Pearson/Prentice Hall ISBN 9780136015864

US Dept. of Treasury Daily Treasury Yield Curve Rates https://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield

US Federal Reserve Board Data Download Program http://www.federalreserve.gov/datadownload/Choose.aspx?rel=H15

Varma, J. jrvFinance v1.03 https://github.com/jrvarma/jrvFinance

Veronesi P., Fixed Income Securities 2010 John Wiley & Sons ISBN 9780470109106

Wall Street Journal Market Data Center http://online.wsj.com/mdc/public/page/mdc_bonds.html?mod=mdc_topnav_2_3010

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# example of US Treasury rate data download
# =========================================
all_data <- CMTrates()
tail(all_data)
# ==================================================
# last row displayed should be for last business day
# ==================================================

# example of option pricing
# =========================
# Hull 7th edition Ch 13 P 294
Stock     <- 42    # S_0
Exercise  <- 40    # K
Time      <- 0.50  # T
Interest  <- 0.10  # r
Yield     <- 0     # q
sigma     <- 0.20
ans <- EuroCall(Stock, Exercise, Time, Interest, Yield, sigma)
round(ans,2) # 4.76

grfiv/ustreasuries documentation built on May 17, 2019, 8:36 a.m.