vamc (version 0.1.0)

buildCurve: Bootstrap discount factors from a yield curve.

Description

Bootstrap discount factors from a yield curve.

Usage

buildCurve(swapRates, tenors, fixFreq, fixDCC, fltFreq, fltDCC, calendar,
  bdc, curveDate, numSetDay, yieldCurveDCC)

Arguments

swapRates

A vector of doubles of swap rates.

tenors

A vector of integers of corresponding tenors.

fixFreq

An integer of fixed leg frequency of payment in months.

fixDCC

A string of fixed leg day count convention from four options: "Thirty360", "ACT360", "ACT365", or "ACTACT".

fltFreq

An integer of floating leg frequency of payment in months.

fltDCC

A string of floating leg day count convention from four options: "Thirty360", "ACT360", "ACT365", or "ACTACT".

calendar

A string of the desired calendar convention.

bdc

A string of business day convention from two options: "General" or "NY".

curveDate

A string in the format of "YYYY-MM-DD" of yield curve date.

numSetDay

An integer of settlement days from yield curve date.

yieldCurveDCC

A string of yield curve day count convention from four options: "Thirty360", "ACT360", "ACT365", or "ACTACT".

Value

Outputs a data frame of strings of discount dates and doubles of discount factors.

Examples

Run this code
# NOT RUN {
rate <- c(0.69, 0.77, 0.88, 1.01, 1.14, 1.38, 1.66, 2.15) * 0.01
tenor <- c(1, 2, 3, 4, 5, 7, 10, 30)
fixFreq <- 6
fixDCC <- "Thirty360"
fltFreq <- 6
fltDCC <- "ACT360"
calendar <- "NY"
bdc <- "Modified_Foll"
curveDate <- "2016-02-08"
numSetDay <- 2
yieldCurveDCC <- "Thirty360"
buildCurve(rate, tenor, fixFreq, fixDCC, fltFreq, fltDCC, calendar, bdc,
           curveDate, numSetDay, yieldCurveDCC)
# }

Run the code above in your browser using DataLab