pub fn npv_prime_r<T: FloatLike>(rate: T, cash_flows: &[T]) -> TExpand description
NPV’(r) - Derivative of the net present value with respect to the rate.
§Arguments
rate- The discount rate per periodcash_flows- A slice of cash flows, where each cash flow is at a specific period
§Returns
- The derivative of the net present value (NPV) with respect to the rate
This function calculates the derivative of NPV.
Optimizations over summing pv_prime_r for each cash flow individually.