aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/collateral/ms.py5
-rw-r--r--python/monthend_interest_recon.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/python/collateral/ms.py b/python/collateral/ms.py
index 127199ac..fb9e6fe0 100644
--- a/python/collateral/ms.py
+++ b/python/collateral/ms.py
@@ -78,6 +78,9 @@ def collateral(d, dawn_trades, *, fund="Serenitas", **kwargs):
df.loc[df.Strategy == "TCSH", "Amount"] -= fx_ia
except UnboundLocalError:
pass
- df.loc[len(df.index)] = ["M_CSH_CASH", -collat - df.Amount.sum(), "USD"]
+ if df.loc[df.Strategy == "M_CSH_CASH", "Amount"].empty:
+ df.loc[len(df.index)] = ["M_CSH_CASH", -collat - df.Amount.sum(), "USD"]
+ else:
+ df.loc[df.Strategy == "M_CSH_CASH", "Amount"] -= collat + df.Amount.sum()
df["date"] = d
return df.set_index("Strategy")
diff --git a/python/monthend_interest_recon.py b/python/monthend_interest_recon.py
index 48733ecf..0c39a0a8 100644
--- a/python/monthend_interest_recon.py
+++ b/python/monthend_interest_recon.py
@@ -72,7 +72,7 @@ def get_BNP(g):
def get_CITI(path):
df = pd.read_excel(path)
for row in df.itertuples():
- if "Net Interest Due To CP" in row:
+ if "Net Interest Due To CP" in row or "Net Interest Due to Citi" in row:
return -row._6