diff options
Diffstat (limited to 'python/strat_cash_realloc.py')
| -rw-r--r-- | python/strat_cash_realloc.py | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/python/strat_cash_realloc.py b/python/strat_cash_realloc.py index 0ef57cee..8a6d96b8 100644 --- a/python/strat_cash_realloc.py +++ b/python/strat_cash_realloc.py @@ -60,17 +60,20 @@ def generate_csv(date, conn): "dirty_strat": "Folder", }, ) - obj["Deal Type"] = "CashFlowDeal" - obj["Deal Id"] = dealid - obj["Action"] = "NEW" - obj["Client"] = "HEDGEMARK" - obj["Fund"] = "BOS_PAT_BOWDOIN" - obj["State"] = "Valid" - obj["Trade Date"] = date - obj["Settlement Date"] = date - obj["Transaction Type"] = "Transfer" - obj["Instrument Type"] = "Cashflow" - obj["Amount"] = -obj["endqty"] + data = { + "Deal Type": "CashFlowDeal", + "Deal Id": dealid, + "Action": "NEW", + "Client": "HEDGEMARK", + "Fund": "BOS_PAT_BOWDOIN", + "State": "Valid", + "Trade Date": date, + "Settlement Date": date, + "Transaction Type": "Transfer", + "Instrument Type": "Cashflow", + "Amount": -obj["endqty"], + } + obj.update(data) offset = obj.copy() # create second leg offset["Deal Id"] = obj["Deal Id"] + "_O" |
