aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/trade_dataclasses.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/python/trade_dataclasses.py b/python/trade_dataclasses.py
index 89a962a4..00acf690 100644
--- a/python/trade_dataclasses.py
+++ b/python/trade_dataclasses.py
@@ -390,11 +390,9 @@ class CDSDeal(
bbg_ticket_id: str = None
def __post_init__(self):
- start_protection = d + datetime.timedelta(days=1)
+ start_protection = self.trade_date + datetime.timedelta(days=1)
effective_date = previous_twentieth(prev_business_day(start_protection))
- self.effective_date = adjust_next_business_day(
- previous_twentieth(self.trade_date)
- )
+ self.effective_date = adjust_next_business_day(effective_date)
def to_markit(self):
obj = self.serialize("mtm")