tmval.rate_from_intdisc

growth.rate_from_intdisc(dex: Tuple[float, float], x0=array([0.001, 0.01109091, 0.02118182, 0.03127273, 0.04136364, 0.05145455, 0.06154545, 0.07163636, 0.08172727, 0.09181818, 0.10190909, 0.112, 0.12209091, 0.13218182, 0.14227273, 0.15236364, 0.16245455, 0.17254545, 0.18263636, 0.19272727, 0.20281818, 0.21290909, 0.223, 0.23309091, 0.24318182, 0.25327273, 0.26336364, 0.27345455, 0.28354545, 0.29363636, 0.30372727, 0.31381818, 0.32390909, 0.334, 0.34409091, 0.35418182, 0.36427273, 0.37436364, 0.38445455, 0.39454545, 0.40463636, 0.41472727, 0.42481818, 0.43490909, 0.445, 0.45509091, 0.46518182, 0.47527273, 0.48536364, 0.49545455, 0.50554545, 0.51563636, 0.52572727, 0.53581818, 0.54590909, 0.556, 0.56609091, 0.57618182, 0.58627273, 0.59636364, 0.60645455, 0.61654545, 0.62663636, 0.63672727, 0.64681818, 0.65690909, 0.667, 0.67709091, 0.68718182, 0.69727273, 0.70736364, 0.71745455, 0.72754545, 0.73763636, 0.74772727, 0.75781818, 0.76790909, 0.778, 0.78809091, 0.79818182, 0.80827273, 0.81836364, 0.82845455, 0.83854545, 0.84863636, 0.85872727, 0.86881818, 0.87890909, 0.889, 0.89909091, 0.90918182, 0.91927273, 0.92936364, 0.93945455, 0.94954545, 0.95963636, 0.96972727, 0.97981818, 0.98990909, 1.0]), precision=5) → list[source]

Given interest earned over a time period on an unknown investment amount, and discount earned over a time period, on that same amount,, solves for an annualized compound interest rate.

Parameters
  • iex (Tuple[float, float]) – The interest earned over a time interval.

  • dex (Tuple[float, float]) – The discount earned over a time interval.

  • x0 – A starting guess or list of guesses for Newton’s method, defaults to np.linspace(.001, 1, 100).

  • precision (int) – rounding precision used to remove duplicates from Newton’s method, defaults to 5.

Returns

a list of interest rates, if found.

Return type

list