|
|
|
|
@ -630,8 +630,7 @@ def wallet_fetch_history(wallet, options):
|
|
|
|
|
def f(r, deposits, deposit_times, now, final_balance): |
|
|
|
|
return np.sum(np.exp((now - deposit_times) / 60.0 / 60 / 24 / |
|
|
|
|
365)**r * deposits) - final_balance |
|
|
|
|
r = brentq(f, a=1, b=-1, args=(deposits, deposit_times, now, |
|
|
|
|
balance)) |
|
|
|
|
r = brentq(f, a=1, b=-1, args=(deposits, deposit_times, now, balance)) |
|
|
|
|
print('continuously compounded equivalent annual interest rate = ' + |
|
|
|
|
str(r * 100) + ' %') |
|
|
|
|
print('(as if yield generator was a bank account)') |
|
|
|
|
|