shiftIndex-methods: Shift monthly index with a new start date and replace the...

Description Usage Arguments Examples

Description

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

Usage

1
2
3
4
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

1
2
3
4
5
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"))

cascsim documentation built on Jan. 13, 2020, 5:07 p.m.