tmval.compound_solver

tmval.growth.compound_solver(pv: Optional[float] = None, fv: Optional[float] = None, t: Optional[float] = None, gr: Union[float, tmval.rate.Rate, None] = None)[source]

Solves for a missing value in the case of compound interest supply 3/4 of: a present value, a future value an interest rate (either APY or APR), and a time. If using an APR interest rate, you need to supply a compounding frequency of m times per period, and you need to set the use_apr parameter to True.

Parameters
  • pv (float) – the present value, defaults to None.

  • fv (float) – the future value, defaults to None.

  • t (float) – the time, defaults to None.

Returns

either a present value, a future value, an interest rate, or a time, depending on which one is missing.

Return type

float