aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics/basket_index.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics/basket_index.py')
-rw-r--r--python/analytics/basket_index.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/analytics/basket_index.py b/python/analytics/basket_index.py
index 2d84e564..ea61f186 100644
--- a/python/analytics/basket_index.py
+++ b/python/analytics/basket_index.py
@@ -1,6 +1,6 @@
from .index_data import get_index_quotes, get_singlenames_curves
from . import serenitas_engine
-from .utils import tenor_t
+from .utils import tenor_t, get_fx
from functools import partial
from pyisda.cdsone import upfront_charge, spread_from_upfront
from pyisda.credit_index import CreditIndex
@@ -89,6 +89,7 @@ class BasketIndex(CreditIndex):
self.currency = "EUR" if index_type in ["XO", "EU"] else "USD"
self.yc = get_curve(value_date, self.currency)
+ self._fx = get_fx(value_date, self.currency)
self.step_in_date = value_date + Day()
self.cash_settle_date = value_date + 3 * BDay()
self.tweaks = []
@@ -164,6 +165,7 @@ class BasketIndex(CreditIndex):
self.index_type, self.series, d, self._curve_tenors
)
self.yc = get_curve(d, self.currency)
+ self._fx = get_fx(d, self.currency)
self.step_in_date = d + Day()
self.cash_settle_date = d + 3 * BDay()
self.start_date = previous_twentieth(d) # or d + 1?