Skip to contents

This function computes the present value factor for a given interest rate and time period.

Usage

get_pv(rate, t)

Arguments

rate

Numeric. The interest rate per period as a decimal (e.g., 0.05 for 5%).

t

Numeric. The time period for which the present value factor is calculated.

Value

Numeric. The present value factor, which is the discount factor (1 + rate)^(-t)

Details

The present value factor is used to discount future cash flows to their present value.

Examples

# Calculate the present value factor for a 5% interest rate over 3 periods
get_pv(rate = 0.05, t = 3)
#> [1] 0.8638376

# Calculate the present value factor for a 10% interest rate over 1 period
get_pv(rate = 0.10, t = 1)
#> [1] 0.9090909