aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/markit/rates.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/python/markit/rates.py b/python/markit/rates.py
index 386cea7e..700a9304 100644
--- a/python/markit/rates.py
+++ b/python/markit/rates.py
@@ -4,6 +4,7 @@ from io import BytesIO
import lz4
import os
import pandas as pd
+from pandas.tseries.offsets import BDay
from psycopg2 import sql
import requests
import xml.etree.ElementTree as ET
@@ -14,10 +15,8 @@ from pickle import dumps
def downloadMarkitIRData(download_date=datetime.date.today(),
currency="USD"):
conn = dbconn("serenitasdb")
- ## T+1 rates are published in the evening
- effective_date = download_date + datetime.timedelta(days=1)
basedir = os.path.join(os.environ['DATA_DIR'], "Yield Curves")
- filename = f"InterestRates_{currency}_{effective_date:%Y%m%d}"
+ filename = f"InterestRates_{currency}_{download_date:%Y%m%d}"
if not os.path.exists(os.path.join(basedir, filename + '.xml')):
r = requests.post(f'http://www.markit.com/news/{filename}.zip')
if "zip" in r.headers['content-type']: