aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/headers.py68
-rw-r--r--python/process_queue.py36
2 files changed, 101 insertions, 3 deletions
diff --git a/python/headers.py b/python/headers.py
index 7e258b29..cb17a123 100644
--- a/python/headers.py
+++ b/python/headers.py
@@ -262,7 +262,7 @@ HEADERS = {
"BrokerShortName",
"ClientReference",
],
- "repo": HEADERS_PRE
+ "repo": HEADERS_PRE
+ [
"Settlement Date",
"Broker",
@@ -303,7 +303,71 @@ HEADERS = {
"BrokerShortName",
"ClientReference",
"DateTimeStamp",
- ]
+ ],
+ "capfloor": HEADERS_PRE
+ + [
+ "Reserved",
+ "Reserved",
+ "FloatingRateIndex",
+ "FloatingRateIndexDescription",
+ "TransactionIndicator",
+ "Reserved",
+ "CapOrFloor",
+ "Notional",
+ "Strike",
+ "ValueDate",
+ "ExpirationDate",
+ "PremiumPercent",
+ "PremiumDate",
+ "PricingType",
+ "PaymentFrequency",
+ "FixingFrequency",
+ "DayCountConvention",
+ "PaymentBDC",
+ "Reserved",
+ "PaymentAtBeginningOrEnd",
+ "Commission",
+ "FirstCouponDate",
+ "InitialMargin",
+ "InitialMarginPercent",
+ "InitialMarginCurrency",
+ "Reserved",
+ "Reserved",
+ "Reserved",
+ "ResetLag",
+ "Adjusted",
+ "CashType",
+ "BinaryFixedAmount",
+ "BarrierPaymentAt",
+ "KnockPeriod",
+ "UpperBarrier",
+ "LowerBarrier",
+ "RebateUp",
+ "RebateDown",
+ "RebateSettlementLag",
+ "ClientReference",
+ "BrokerShortName",
+ "CptyReference",
+ "SwapType",
+ "ClearingFacility",
+ "CcpTradeRef",
+ "BlockId",
+ "BlockAmount",
+ "Netting Id",
+ "TradeDateTimeStamp",
+ "AccrualBDC",
+ "MaturityBDC",
+ "RollConvention",
+ "Calendar",
+ "Arrears",
+ "PaymentLag",
+ "Reserved1",
+ "InflationLag",
+ "InflationReference",
+ "SettlementCurrency",
+ "Collateralized",
+ "TradeDateFX",
+ ],
}
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