diff options
Diffstat (limited to 'python/collateral/baml_isda.py')
| -rw-r--r-- | python/collateral/baml_isda.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/python/collateral/baml_isda.py b/python/collateral/baml_isda.py index effc3c1c..938481fd 100644 --- a/python/collateral/baml_isda.py +++ b/python/collateral/baml_isda.py @@ -123,7 +123,7 @@ def load_excel(fname): rows = [] while s.cell(i, 0).ctype != xlrd.XL_CELL_DATE: content = s.cell(i, 0).value - if content.startswith('NOP'): + if content.startswith("NOP"): break if ( content == "" @@ -201,13 +201,6 @@ def collateral(d, dawn_trades, *, fund="Serenitas", **kwargs): df.columns = ["Strategy", "Amount", "Currency"] df.Amount *= -1 df.loc[df.Strategy == "M_CSH_CASH", "Strategy"] = "TCSH" - df = df.append( - { - "Strategy": "M_CSH_CASH", - "Amount": -collateral - df.Amount.sum(), - "Currency": "USD", - }, - ignore_index=True, - ) + df.loc[len(df.index)] = ["M_CSH_CASH", -collateral - df.Amount.sum(), "USD"] df["date"] = d return df.set_index("Strategy") |
