diff options
| -rw-r--r-- | python/csv_headers/citco.py | 2 | ||||
| -rw-r--r-- | python/trade_dataclasses.py | 12 |
2 files changed, 10 insertions, 4 deletions
diff --git a/python/csv_headers/citco.py b/python/csv_headers/citco.py index 146e2cb5..b038fc5c 100644 --- a/python/csv_headers/citco.py +++ b/python/csv_headers/citco.py @@ -256,7 +256,7 @@ GIL = [ "Attribute 5-Value", "Attribute 5-Type", "(Blank)", - "Option Type", + "OptionType", "Strike Month", "Strike Price", "Expiration Date", diff --git a/python/trade_dataclasses.py b/python/trade_dataclasses.py index 06572e3e..84c812ee 100644 --- a/python/trade_dataclasses.py +++ b/python/trade_dataclasses.py @@ -1248,6 +1248,7 @@ class TrancheProduct( @dataclass class SwaptionProduct( + CitcoDeal, Deal, deal_type=DealType.SwaptionProduct, table_name="citco_swaption", @@ -1317,7 +1318,12 @@ class SwaptionProduct( obj = self.serialize("citco") obj["Command"] = "N" - obj["Coupon Rate"] = obj["Coupon Rate"] / 100 + obj["Active"] = "Y" + obj["Birth_date"] = obj["Birth_date"].strftime("%Y%m%d") + obj["Death_date"] = obj["Death_date"].strftime("%Y%m%d") + obj["Expiration Date"] = obj["Expiration Date"].strftime("%Y%m%d") + obj["Put/Call Flag"] = "C" if obj["callput"] else "P" + obj["Option Type"] = "Vanilla European" return obj @@ -1412,6 +1418,6 @@ class IRSProduct( obj["Command"] = "N" obj["Active"] = "Y" if obj["Active"] else "N" obj["Principal Exch TypeID"] = 1 - obj["Birth_date"] = obj["Birth_date"].replace("-", "") - obj["Death_date"] = obj["Death_date"].replace("-", "") + obj["Birth_date"] = obj["Birth_date"].strftime("%Y%m%d") + obj["Death_date"] = obj["Death_date"].strftime("%Y%m%d") return obj |
