aboutsummaryrefslogtreecommitdiffstats
path: root/python/cds_curve.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/cds_curve.py')
-rw-r--r--python/cds_curve.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/python/cds_curve.py b/python/cds_curve.py
index f22f43ea..74dcbd61 100644
--- a/python/cds_curve.py
+++ b/python/cds_curve.py
@@ -56,18 +56,18 @@ def build_curves(quotes, args):
return [build_curve(q, *args) for q in quotes if q is not None]
def get_singlenames_curves(index_type, series, trade_date):
- end_dates = roll_date(trade_date, [1, 2, 3, 4, 5, 7, 10])
- sn_quotes = get_singlenames_quotes("{}{}".format(index_type.lower(), series),
- trade_date.date())
- Settings().evaluation_date = Date.from_datetime(trade_date)
- yc = YC()
- jp_yc = ql_to_jp(yc)
- start_date = previous_twentieth(trade_date)
- step_in_date = trade_date + datetime.timedelta(days=1)
- value_date = pd.Timestamp(trade_date) + 3* BDay()
- args = (trade_date, jp_yc, start_date, step_in_date, value_date, end_dates)
- curves = build_curves_dist(sn_quotes, args)
- return curves, args
+ end_dates = roll_date(trade_date, [1, 2, 3, 4, 5, 7, 10])
+ sn_quotes = get_singlenames_quotes("{}{}".format(index_type.lower(), series),
+ trade_date.date())
+ Settings().evaluation_date = Date.from_datetime(trade_date)
+ yc = YC()
+ jp_yc = ql_to_jp(yc)
+ start_date = previous_twentieth(trade_date)
+ step_in_date = trade_date + datetime.timedelta(days=1)
+ value_date = pd.Timestamp(trade_date) + 3* BDay()
+ args = (trade_date, jp_yc, start_date, step_in_date, value_date, end_dates)
+ curves = build_curves_dist(sn_quotes, args)
+ return curves, args
def all_curves_pv(curves, today_date, jp_yc, start_date, step_in_date, value_date, maturities):
r = {}