Skip to contents

Computes the present value of an n-period annuity certain with level payments of 1 per period.

Usage

annuity_certain(n, i, due = FALSE, m = 1, cont = FALSE)

Arguments

n

Number of payments or periods. May be scalar or vector.

i

Effective interest rate per period. May be scalar or vector.

due

If `TRUE`, annuity-due; otherwise annuity-immediate.

m

Payment frequency per period. `m = 1` means annual.

cont

If `TRUE`, use the continuous payment model.

Value

Numeric vector of present values.

Examples

annuity_certain(n = 10, i = 0.05)
#> [1] 7.721735
annuity_certain(n = c(5, 10), i = 0.05)
#> [1] 4.329477 7.721735
annuity_certain(n = 10, i = c(0.03, 0.05))
#> [1] 8.530203 7.721735
annuity_certain(n = 10, i = 0.05, due = TRUE)
#> [1] 8.107822
annuity_certain(n = 10, i = 0.05, cont = TRUE)
#> [1] 7.913209