aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/calibrate_tranches_BC.py4
-rw-r--r--sql/serenitasdb.sql4
2 files changed, 7 insertions, 1 deletions
diff --git a/python/calibrate_tranches_BC.py b/python/calibrate_tranches_BC.py
index b72ebbcb..1c2f4130 100644
--- a/python/calibrate_tranches_BC.py
+++ b/python/calibrate_tranches_BC.py
@@ -208,6 +208,10 @@ if __name__ == "__main__":
df["corr_at_detach"] = tranche_index.rho[1:]
df["corr01"] = tranche_index.tranche_corr01()
del df["fwd_gamma"]
+ df["quote_price"] = (
+ 1 - tranche_index.tranche_quotes.quotes.values - tranche_index._accrued
+ )
+ df["calibrated_price"] = tranche_index.tranche_pvs().bond_price
data[d] = df
if data:
diff --git a/sql/serenitasdb.sql b/sql/serenitasdb.sql
index 67fd9e9d..96a9d8c0 100644
--- a/sql/serenitasdb.sql
+++ b/sql/serenitasdb.sql
@@ -771,7 +771,9 @@ CREATE TABLE tranche_risk(
corr01 float,
duration float,
spread float,
- expected_loss float);
+ expected_loss float,
+ quote_price float,
+ calibrated_price float);
GRANT ALL ON tranche_risk to serenitas_user;