View source: R/compounding-class.R
compounding | R Documentation |
compound()
creates a Compounding
object in one of its subclasses:
Simple, Discrete, Continuous.
compounding(x = c("simple", "discrete", "continuous"))
x |
a character with the name of compounding regime:
|
A Compounding object can be instanciated with the compounding
function, passing a string with the name of one of the compounding regimes:
simple
, discrete
, continuous
.
A subclass of Compounding
object.
compounding("simple")
compounding("discrete")
compounding("continuous")
comp <- compounding("discrete")
compound(comp, 0.06, 2) # equals (1 + 0.06) ^ 2 = 1.1236
implied_rate(comp, 1.1236, 2) # equals 0.06
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.