its (version 1.0.3)

itsFin: Financial Functions for Irregular Time-Series Objects

Description

Financial functions for objects of class "its".

Usage

accrueIts(x,daysperyear=365)

Arguments

x
an object of class "its"
daysperyear
integer, representing days per year for accrual

Value

  • An object of class "its"

Details

accrueIts Accrues an annual rate stored in x, expressed as a decimal (not a percentage), based on the difference of the time-stamps. The accrued value is not cumulated, it is a per-period return.

See Also

ts, POSIXct, itsFile, itsLags itsJoin itsTimes itsSubset itsFin itsDisp itsInfo itsCumdif itsArith itsInterp

Examples

Run this code
a <- matrix(c(seq(by=24*60*60,length=20),1:20,41:60),nrow=20,ncol=3)
b <- as.its(a)
accrueIts(b[which(weekdayIts(b)),]/100,daysperyear=365)

Run the code above in your browser using DataLab