pub fn npv_prime2_r<T: FloatLike>(rate: T, cash_flows: &[T]) -> T
Expand description
NPV’’(r) - Second 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 second derivative of the net present value (NPV) with respect to the rate
This function calculates the second derivative of NPV.
Optimizations over summing pv_prime2_r
for each cash flow individually.