its (version 0.1.1)

its-fin: 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, its-file, its-lags its-join its-times its-subset its-fin its-disp its-info its-cumdif its-arith

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