Skip to main content

epr

Function epr 

Source
pub fn epr(
    epr: f64,
    compounding_periods_in_year: u32,
) -> FinanceResult<ConvertRateSolution>
Expand description

Helper function to convert a periodic interest rate (EPR) to all rate conversions.

Note: an EPR of 0.99 with a large number of periods can create decimal inaccuracies due to floating point representation. The epr conversion method is tested and guaranteed accurate up to 780 periods between rates -0.034 and 0.989; rates outside this range may incur tiny floating-point drift.

ยงErrors

Returns FinanceError if periods are zero, rate is non-finite, or epr <= -1.0.