Function pv_prime_r

Source
pub fn pv_prime_r(rate: Decimal, n: Decimal, cash_flow: Decimal) -> Decimal
Expand description

PV’(r) - Derivative of the present value of a cash flow with respect to the rate.

§Arguments

  • rate - The discount rate per period
  • n - The nth period
  • cash_flow - The cash flow at period n

§Returns

  • The derivative of the present value (PV) with respect to the rate

Via the sum and difference property, this can be used for finding the derivative of an NPV calculation with respect to the rate.