aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics')
-rw-r--r--python/analytics/tranche_basket.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/python/analytics/tranche_basket.py b/python/analytics/tranche_basket.py
index 1e41cec9..894a4545 100644
--- a/python/analytics/tranche_basket.py
+++ b/python/analytics/tranche_basket.py
@@ -534,9 +534,16 @@ class DualCorrTranche:
),
)
- def mark(self, **args):
- if "ref" in args:
- ref = args["ref"]
+ def mark(self, **kwargs):
+ if kwargs.pop("use_external", False):
+ try:
+ self.pv = get_external_nav(
+ dawn_engine, self._trade_id, self.value_date, "cds"
+ )
+ except ValueError as e:
+ warnings.warn(str(e))
+ if "ref" in kwargs:
+ ref = kwargs["ref"]
else:
if not self.index_type == "BS":
col_ref = "close_price" if self.index_type == "HY" else "close_spread"
@@ -554,7 +561,7 @@ class DualCorrTranche:
self.index_type,
self.series,
self.tenor,
- args.get("source", "MKIT"),
+ kwargs.get("source", "MKIT"),
),
)
try:
@@ -568,8 +575,8 @@ class DualCorrTranche:
except NameError:
pass
- if "skew" in args:
- self._skew = args["skew"]
+ if "skew" in kwargs:
+ self._skew = kwargs["skew"]
else:
d = self.value_date
i = 0