internal_rate_of_return
Compute the discount rate at which a series of cashflows has a net present value of zero, using at least one negative and one positive cashflow.
Instructions
Internal Rate of Return: the per-period rate where NPV == 0.
Solved with Newton's method + a bisection fallback. Requires at least one negative and one positive cashflow.
Args: cashflows: List of >= 2 numbers, e.g. [-10000, 3000, 4200, 6800]. guess: Optional starting rate for Newton's method (decimal).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| guess | No | ||
| cashflows | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||