aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/analytics/index.py2
-rw-r--r--python/analytics/option.py5
-rw-r--r--python/analytics/portfolio.py2
3 files changed, 4 insertions, 5 deletions
diff --git a/python/analytics/index.py b/python/analytics/index.py
index 02d2d878..98f399de 100644
--- a/python/analytics/index.py
+++ b/python/analytics/index.py
@@ -266,7 +266,7 @@ class Index(object):
# self._yc = ql_to_jp(self._ql_yc)
helpers = rate_helpers(self.currency, evaluation_date=self.value_date)
for rh in helpers:
- rh.quote += 1e-4
+ rh.quote.value += 1e-4
ql_yc = YC(helpers)
self._yc = ql_to_jp(ql_yc)
self._update() # to force recomputation
diff --git a/python/analytics/option.py b/python/analytics/option.py
index 4617cdc7..12875221 100644
--- a/python/analytics/option.py
+++ b/python/analytics/option.py
@@ -453,7 +453,7 @@ class QuoteSurface():
"JOIN swaption_ref_quotes USING (ref_id)" \
"WHERE quotedate::date = %s AND index= %s AND series = %s " \
"AND quote_source != 'SG' " \
- "ORDER BY quotedate DESC",
+ "ORDER BY quotedate",
_engine,
parse_dates=['quotedate', 'expiry'],
params=(value_date, index_type.upper(), series))
@@ -570,8 +570,7 @@ class ModelBasedVolSurface(VolSurface):
"""returns list of vol surfaces"""
l = super().list(source)
if option_type is None:
- return list(chain((e + ("payer",) for e in l),
- (e + ("receiver",) for e in l)))
+ return list(chain(*([(e + ("payer",)), (e + ("receiver",))] for e in l)))
else:
return [e + (option_type,) for e in l]
diff --git a/python/analytics/portfolio.py b/python/analytics/portfolio.py
index 43d9b5e7..ad09b09e 100644
--- a/python/analytics/portfolio.py
+++ b/python/analytics/portfolio.py
@@ -72,7 +72,7 @@ class Portfolio:
index.value_date = d
if len(self.indices) == 0:
for swaption in self.swaptions:
- self.swaption.value_date = d
+ swaption.index.value_date = d
self._value_date = d
def mark(self, source_list=[], option_type=None, model="black", surface_id=None):