compound: Compounding and Discounting

View source: R/principal.R

compoundR Documentation

Compounding and Discounting

Description

compounds some initial invest A for some time steps n using the interest rate r

Usage

compound(
  A = NULL,
  r = NULL,
  n = NULL,
  interval = 1L,
  simple = T,
  continuous = F
)

Arguments

A

initial amount

r

interest rate (in percent)

n

compounding steps, or compounding time horizon. For example, a yearly compounding would be n = 1, with an interval of interval = 1. Wheras a bi-yearly compounding over 1 year would be n = 1, interval = 2;

interval

the compounding interval (integer number) dividing the compounding steps n. Default 1L

simple

Use linear (default) or exponential compounding

continuous

should we use continuous compounding

Value

returns the compounded volume

Author(s)

christian bitter


christianbitter/cbFinance documentation built on Sept. 28, 2024, 4:54 p.m.