diff options
Diffstat (limited to 'python/process_queue.py')
| -rw-r--r-- | python/process_queue.py | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/python/process_queue.py b/python/process_queue.py index 96daabf4..05554114 100644 --- a/python/process_queue.py +++ b/python/process_queue.py @@ -342,6 +342,40 @@ def build_line(obj, trade_type="bond", fund="SERCGMAST"): "transaction_indicator": "TransactionIndicator", }, ) + elif trade_type == "capfloor": + obj["Deal Type"] = "CapFloorDeal" + obj["PremiumDate"] = obj["value_date"] + obj["ClientReference"] = obj["comments"] + obj["PaymentBDC"] = obj["bdc_convention"] + obj["AccrualBDC"] = obj["bdc_convention"] + obj["MaturityBDC"] = "NONE" + obj["Cash Account"] = "SGNSCLMASW" + obj["TransactionIndicator"] = "Buy" if obj["buysell"] else "Sell" + # missing data : 'Adjusted', 'RollConvention', 'Calendar', 'Arrears', 'Collateralized', 'MaturityBDC' + rename_keys( + obj, + { + "comments": "Comments", + "floating_rate_index_desc": "FloatingRateIndex", + "cap_or_floor": "CapOrFloor", + "amount": "Notional", + "strike": "Strike", + "value_date": "ValueDate", + "expiration_date": "MaturityDate", + "premium_percent": "PremiumPercent", + "pricing_type": "PricingType", + "payment_frequency": "PaymentFrequency", + "fixing_frequency": "FixingFrequency", + "day_count_convention": "Basis", + "bdc_convention": "PaymentBDC", + "payment_mode": "PaymentMode", + "payment_at_beginning_or_end": "PaymentAtBeginningOrEnd", + "initial_margin_percentage": "InitialMarginPercentage", + "intial_margin_currency": "InitialMarginCurrency", + "reset_lag": "ResetLag", + "swap_type": "SwapType", + }, + ) return [obj.get(h, None) for h in get_headers(trade_type, fund)] @@ -638,7 +672,7 @@ def get_filepath( "future": "Future", "wire": "CashFlowDeal", "spot": "SpotDeal", - "capfloor": "TODO", + "capfloor": "CapFloor", "repo": "RepoDeal", } trade_tag: str |
