Learn R Programming

fixedincome (version 0.0.5)

forwardrate: Create a ForwardRate object

Description

forwardrate() creates a ForwardRate object.

Usage

forwardrate(x, ...)

# S3 method for numeric forwardrate( x, terms, compounding, daycount, calendar, .copyfrom = NULL, refdate = NULL, ... )

# S3 method for SpotRateCurve forwardrate(x, t1 = NULL, t2 = NULL, ...)

Value

A ForwardRate object.

The arguments t1 and t2 define initial and final term used to extract a ForwardRate from a SpotRateCurve.

Arguments

x

a numeric or a SpotRateCurve object.

...

additional arguments.

terms

a numeric vector with positive values representing terms of the forward rates.

compounding

a character with the compouning name.

daycount

a character representing the daycount.

calendar

a calendar object.

.copyfrom

a SpotRate object that is used as reference to build the SpotRateCurve object.

refdate

the curve reference date.

t1

initial term

t2

final term