forwardrate: Create a ForwardRate object

View source: R/forwardrate-class.R

forwardrateR Documentation

Create a ForwardRate object

Description

forwardrate() creates a ForwardRate object.

Usage

forwardrate(x, ...)

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

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

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

Value

A ForwardRate object.

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


fixedincome documentation built on July 9, 2023, 7:28 p.m.