def test_balance_interpolate_future_rate(self): rates = [Rate(self.base_date + timedelta(70), 0.003)] output = UserAccount.balance_interpolate( 100, self.base_date, self.base_date + timedelta(60), rates) self.assertEqual(output, 100)
def balance(as_of): return UserAccount.balance_from_cashflows( cashflows, [Rate(self.dt, interest_daily)], as_of)