Expand description
The internal module which supports the solution struct for the Cashflow family of functions (e.g., payment).
Modules§
- future_
value_ annuity - Future value annuity calculations. Given a series of constant cashflows, a number of periods such as years, and a fixed interest rate, what is the value of the series at the final payment?
- net_
present_ value - Net Present Value calculations. Given cashflows (including the time-0 investment), periods, and fixed or varying discount rates, what is the net value of the series right now?
- nper
- Number of periods with payments (NPER). How many periods for an annuity cashflow to grow from a present value to a future value at a periodic rate?
- payment
- Payment calculations. What is the periodic payment needed for an amortized loan and how much of that is interest or principal?
- present_
value_ annuity - Present value annuity calculations. Given a series of constant cashflows, a number of periods such as years, and a fixed interest rate, what is the current value of the series right now?
Structs§
- Cashflow
Period - Cashflow
Series - Cashflow
Solution - A record of a cash flow calculation such as payment, net present value, or the present value or future value of an annuity.
- Nper
Solution - Solution struct for an NPER calculation.
- NpvPeriod
- NpvSeries
- NpvSolution
- The custom solution information of a NPV scenario. The struct values are immutable by the user of the library.
- Payment
Series - Payment
Solution
Enums§
- Cashflow
Variable - Payment
Timing - When a level payment (annuity installment) falls within each period.
Functions§
- future_
value_ annuity - Returns the future value of annuity (a series of constant cashflows) at a constant rate. Returns f64.
- future_
value_ annuity_ solution - Returns the future value of annuity (a series of constant cashflows) at a constant rate. Returns custom solution struct with additional information and functionality.
- net_
present_ value - Returns the net present value of a future series of constant cashflows and constant rate, subtracting the initial investment cost. Returns f64.
- net_
present_ value_ schedule - Returns the net present value of a schedule of rates and cashflows (can be varying), subtracting the initial investment cost. Returns f64.
- net_
present_ value_ schedule_ solution - Returns the net present value of a schedule of rates and cashflows (can be varying), subtracting the initial investment cost. Returns a custom solution struct with detailed information and additional functionality.
- net_
present_ value_ solution - Returns the net present value of a future series of constant cashflows and constant rate, subtracting the initial investment cost. Returns a solution struct with additional features..
- nper
- Returns the number of periods for an annuity (payments) to reach a future value.
- nper_
due - Number of periods when payments are due at the beginning of each period (Excel
type=1). - nper_
due_ solution nper_duewith a solution struct.- nper_
solution nperwith a solution struct (formula string + inputs).- payment
- Returns the payment needed at the end of every period for an amortized loan.
- payment_
solution - Calculates the payment needed for each period for an amortized loan and creates a struct showing the interest, the formula, and optionally the period-by-period values.
- present_
value_ annuity - Returns the present value of an annuity (series of constant cashflows) at a constant rate. Returns f64.
- present_
value_ annuity_ accumulator - present_
value_ annuity_ solution - Returns the present value of a future series of constant cashflows and constant rate. Returns custom solution type with additional information and functionality.