aboutsummaryrefslogtreecommitdiffstats
path: root/python/analytics/tranche_basket.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/analytics/tranche_basket.py')
-rw-r--r--python/analytics/tranche_basket.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/python/analytics/tranche_basket.py b/python/analytics/tranche_basket.py
index 876abe67..d7fc66c8 100644
--- a/python/analytics/tranche_basket.py
+++ b/python/analytics/tranche_basket.py
@@ -215,10 +215,9 @@ class DualCorrTranche():
self.tranche_running * 1e-4 * days_accrued)
def __repr__(self):
- s = ["{}{} {} Tranche".format(self.index_type, self.series, self.tenor),
+ s = [f"{self.index_type}{self.series} {self.tenor} Tranche",
"",
- "{:<20}\t{:>15}".format("Value Date", ('{:%m/%d/%y}'.
- format(self.value_date))),
+ "{:<20}\t{:>15}".format("Value Date", f'{self.value_date:%m/%d/%y}'),
"{:<20}\t{:>15}".format("Direction", self.direction)]
rows = [["Notional", self.notional, "PV", self.pv *100],
["Attach", self.attach, "Detach", self.detach],