OperationalCF: OperationalCF Contract class definition

OperationalCFR Documentation

OperationalCF Contract class definition

Description

An operational cash flows contract represents any operational activity in monetary units within an organization.

Usage

OperationalCF(ContractID, pattern, args, ...)

Arguments

pattern

A function evaluating the pattern of generated cash flows.

args

The list of arguments used when evaluating the pattern

Examples

times = timeSequence(from="2014-01-01", by="3 months", length.out=9)
values = cumsum(c(1,rnorm(8,0.02,0.1)))
idx <- Index(label = "PriceIndex", data = values, charvec = times)

revenue <- function(idx, times) { 
  idx$Data[as.character(times),] * 1000
}
revenue(idx=idx, times=times)
OpCFs <- OperationalCF(
  ContractID="Ops001", Currency="CHF",
  pattern = revenue, 
  args = list( # the argument of the function
    idx = idx,  
   times = as.character(times)))


wbreymann/FEMS documentation built on Dec. 8, 2022, 9:43 a.m.