shiftIndex {cascsim}R Documentation

Shift monthly index with a new start date and replace the unknown index value with zero.

Description

Shift monthly index with a new start date and replace the unknown index value with zero.

Usage

shiftIndex(object, ...)

## S4 method for signature 'Index'
shiftIndex(object, newStartDate, endDate)

Arguments

object

Index Object

...

Additional function arguments

newStartDate

new start date

endDate

end date

Examples

xindex <- new("Index", indexID = "IDX1", tabulate = FALSE, annualizedRate = 0.03)
xindex<-setIndex(xindex)
xindex@monthlyIndex
shiftIndex(xindex,as.Date("2016-10-15"),as.Date("2018-10-15"))
shiftIndex(xindex,as.Date("2010-10-15"),as.Date("2013-10-15"))

[Package cascsim version 0.4 Index]