aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/risk/tranches.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/risk/tranches.py b/python/risk/tranches.py
index 55f4ce4d..fee7b539 100644
--- a/python/risk/tranches.py
+++ b/python/risk/tranches.py
@@ -83,7 +83,10 @@ def insert_tranche_portfolio(portf, conn):
# when there is less than one year left we computed the theta to maturity
logger.info(str(e))
theta = (
- trade.clean_pv / trade.notional
+ trade.clean_pv
+ / trade.notional
+ / trade.tranche_factor
+ / trade._index._fx
+ trade.tranche_running * 1e-4 * trade.duration
)
c.execute(