diff options
| -rw-r--r-- | python/headers.py | 42 | ||||
| -rw-r--r-- | python/process_queue.py | 15 |
2 files changed, 57 insertions, 0 deletions
diff --git a/python/headers.py b/python/headers.py index 3038a45e..7e258b29 100644 --- a/python/headers.py +++ b/python/headers.py @@ -262,6 +262,48 @@ HEADERS = { "BrokerShortName", "ClientReference", ], + "repo": HEADERS_PRE + + [ + "Settlement Date", + "Broker", + "GlopeOp Security Identifier", + "CUSIP", + "ISIN", + "Sedol", + "Reserved", + "Reserved", + "Security Description", + "TransactionIndicator", + "CurrentFactor", + "Quantity", + "Price", + "Reserved", + "Reserved", + "Reserved", + "Currency", + "ExchangeRate", + "Comments", + "Reserved", + "ExpirationDate", + "Reserved", + "WeightedAmount", + "InterestCalcMethod", + "DirtyPrice", + "Haircut", + "RepoRate", + "OpenRepo", + "CallNotice", + "FaceAmount", + "AccruedInterest", + "Yield", + "CouponTo", + "DayCount", + "ClearingMode", + "SecurityType", + "BrokerShortName", + "ClientReference", + "DateTimeStamp", + ] } diff --git a/python/process_queue.py b/python/process_queue.py index 3f6b537e..a878feeb 100644 --- a/python/process_queue.py +++ b/python/process_queue.py @@ -331,6 +331,19 @@ def build_line(obj, trade_type="bond", fund="SERCGMAST"): "spot_rate": fx_rate, }, ) + elif trade_type == 'repo': + obj['Deal Type'] = 'RepoDeal' + obj['OpenRepo'] = 'Y' if obj['open_repo'] else 'N' + rename_keys( + obj, + { + "cashaccount": "Cash Account", + "weighted_amount": "WeightedAmount", + "repo_rate": "RepoRate", + "daycount": "DayCount", + "transaction_indicator": "TransactionIndicator" + } + ) return [obj.get(h, None) for h in get_headers(trade_type, fund)] @@ -627,6 +640,7 @@ def get_filepath( "wire": "CashFlowDeal", "spot": "SpotDeal", "capfloor": "TODO", + "repo": "RepoDeal" } trade_tag: str if isinstance(trade_type, tuple): @@ -776,6 +790,7 @@ if __name__ == "__main__": for trade_type in [ "cds", "swaption", + "repo", "future", "wire", "spot", |
