aboutsummaryrefslogtreecommitdiffstats
path: root/python/yieldcurve.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/yieldcurve.py')
-rw-r--r--python/yieldcurve.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/yieldcurve.py b/python/yieldcurve.py
index 50588aa6..23f411a8 100644
--- a/python/yieldcurve.py
+++ b/python/yieldcurve.py
@@ -50,15 +50,15 @@ def YC(date = datetime.date.today(), MarkitData=None, futures = None):
futures = get_futures_data(date.date())
m = libor_market('USD(NY)')
quotes = [('ED',i+1, v) for i, v in enumerate(futures)]
- # if next_imm_date(date, 9) == pydate_to_qldate(date) + Period('2Yr'):
- # quotes.pop(8)
+ if next_imm_date(date, 9) == m.settle_date + Period('2Yr'):
+ quotes.pop(7)
quotes += [('SWAP', k, v) for k, v in MarkitData['swaps'].items()]
m.set_quotes(date, quotes)
- ts = m.bootstrap_term_structure(interpolator='linear')
+ ts = m.bootstrap_term_structure()
return ts
if __name__=="__main__":
- date = datetime.date(2013, 12, 23)
+ date = datetime.datetime(2014, 4, 29)
ts = YC(date)
cal = Calendar.from_name('USA')
p1 = Period('1Mo')