diff options
Diffstat (limited to 'python/markit/cds.py')
| -rw-r--r-- | python/markit/cds.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/markit/cds.py b/python/markit/cds.py index 29e1f623..5fbc2d3a 100644 --- a/python/markit/cds.py +++ b/python/markit/cds.py @@ -9,9 +9,11 @@ from pandas.tseries.offsets import BDay import pandas as pd
logger = logging.getLogger(__name__)
+
def convertToNone(v):
return v if v else None
+
def download_cds_data(payload):
r = requests.get('https://www.markit.com/export.jsp', params=payload)
f2 = open(os.path.join(os.environ['BASE_DIR'], "Tranche_data", "CDS",
@@ -26,8 +28,9 @@ def download_cds_data(payload): f1.close()
f2.close()
+
def download_composite_data(payload, historical=False):
- ## if historical, we want to maintain the invariant mtime(f)== payload['date'] + BDay(1)
+ # if historical, we want to maintain the invariant mtime(f)== payload['date'] + BDay(1)
if historical:
ts = (pd.Timestamp(payload['date']) + BDay(1)).timestamp()
for report in ['COMPOSITES', 'TRANCHE_COMPOSITES']:
|
