rescale_discount_rate: Rescale Discount Rate

View source: R/transform.R

rescale_discount_rateR Documentation

Rescale Discount Rate

Description

Rescale a discount rate between two time frames.

Usage

rescale_discount_rate(x, from, to)

Arguments

x

Discount rate to rescale.

from

Original time period.

to

Final time period.

Details

Continuous discounting is assumed, i.e. when converting a long-term discount rate into a short-term rate, we assume that a partial gain from one short term is multiplicatively discounted in all following short terms. At the same time, we assume the short-term rate is time-invariant.

Value

Rate rescaled under the assumption of compound discounting.

Examples

  ## 1% monthly interest rate to annual
  rescale_discount_rate(0.01, 1, 12)
  ## 3% annual discount rate to (approximately) weekly 
  rescale_discount_rate(0.03, 52, 1)

heemod documentation built on May 29, 2024, 8:17 a.m.