Investments | R Documentation |
This contract represents the financial side of a real investment. In consists of an initial negative cash flow, a write-off period and a final positive cash flow for the salvage value.
Investments(ContractID, pattern, args, ...)
pattern |
A function evaluating the pattern of generated investments. |
args |
The list of arguments used when evaluating the pattern |
The pattern
describes the value of the initial investment
and the write-off pattern as timeSeries
object. If the write-off
does not go down to zere the remaining value is interpreted as salvage value.
This is represented by a last event of type MD with a cash inflow of this
amount so that the EventSeries
ends with a nominal value of zero.
times = timeSequence(from="2014-01-01", by="3 months", length.out=9)
write.off <- function(times) {
timeSeries(seq(1000000, 0, length.out=9), times)
}
invest <- Investments(
ContractID = "Invest01", Currency = "CHF",
pattern = write.off,
args = list(times = times))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.