diff options
Diffstat (limited to 'python/process_queue.py')
| -rw-r--r-- | python/process_queue.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/process_queue.py b/python/process_queue.py index 81ddf650..51451f9d 100644 --- a/python/process_queue.py +++ b/python/process_queue.py @@ -952,6 +952,14 @@ def build_termination( ] if deal_type == "CreditDefaultSwapDeal": headers += ["TradeDate", "EffectiveDate", "FirstCouponDate"] + with conn.cursor() as c: + c.execute( + "SELECT (detach-attach)/(orig_detach-orig_attach) " + "FROM cds WHERE dealid=%s", + (dealid,), + ) + (tranche_factor,) = c.fetchone() + termination_amount *= tranche_factor else: headers += ["Reserved"] * 3 headers += ["FeePaymentDate", "SpecialInstructions"] |
