Browse Source

fix indentations in ROI calculation

master
Adlai Chandrasekhar 8 years ago
parent
commit
22153180cf
  1. 3
      jmclient/jmclient/wallet_utils.py

3
jmclient/jmclient/wallet_utils.py

@ -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)')

Loading…
Cancel
Save