pub struct TvmPeriod { /* private fields */ }
Expand description
The value of an investment at the end of a given period, part of a Time Value of Money calculation.
This is either:
- Part of
TvmSolution
produced by callingrate_solution
,periods_solution
,present_value_solution
, orfuture_value_solution
. - Part of [
TvmSchedule
] produced by callingpresent_value_schedule
orfuture_value_schedule
.
Implementations§
Source§impl TvmPeriod
impl TvmPeriod
Sourcepub fn period(&self) -> u32
pub fn period(&self) -> u32
Returns the period number. The first real period is 1 but there’s also a period 0 which shows the starting conditions.
Sourcepub fn rate(&self) -> f64
pub fn rate(&self) -> f64
Returns the periodic rate for the current period. If the containing struct is a
TvmSolution
every period will have the same rate. If it’s a [TvmSchedule
] each period
may have a different rate.
Sourcepub fn value(&self) -> f64
pub fn value(&self) -> f64
Returns the value of the investment at the end of the current period.
Sourcepub fn formula(&self) -> &str
pub fn formula(&self) -> &str
Returns a text version of the formula used to calculate the value for the current period.
The formula includes the actual values rather than variable names. For the formula with
variables such as pv for present value call symbolic_formula
.
Sourcepub fn symbolic_formula(&self) -> &str
pub fn symbolic_formula(&self) -> &str
Returns a text version of the formula used to calculate the value for the current period.
The formula includes variables such as r for the rate. For the formula with actual values
rather than variables call formula
.