From 6a0970b72d31e349a718d89e804b5a214e65e36e Mon Sep 17 00:00:00 2001 From: Dean Malmgren Date: Tue, 15 Dec 2015 11:19:41 -0600 Subject: [PATCH] resetting the ytd tax draw after January payment. related to #33 --- a_model/datascope.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/a_model/datascope.py b/a_model/datascope.py index 3abf118..5aceb1a 100644 --- a/a_model/datascope.py +++ b/a_model/datascope.py @@ -249,6 +249,8 @@ def _simulate_single_universe_monthly_cash(self, universe, n_months): if quarterly_tax > 0: cash -= quarterly_tax ytd_tax_draws += quarterly_tax + if date.month == 1: + ytd_tax_draws = 0.0 # pay expenses and put that $$$ in the bank. bonus calculation has # to happen here to have access to the amount of cash in the bank