aboutsummaryrefslogtreecommitdiffstats
path: root/python/intex_scenarios.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/intex_scenarios.py')
-rw-r--r--python/intex_scenarios.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/intex_scenarios.py b/python/intex_scenarios.py
index 49fb7067..b059fe0c 100644
--- a/python/intex_scenarios.py
+++ b/python/intex_scenarios.py
@@ -39,7 +39,7 @@ conn = psycopg2.connect(database="ET",
host="192.168.1.108")
cursor = conn.cursor()
-workdate = date.today().strftime('%Y-%m-%d')
+# workdate = date.today().strftime('%Y-%m-%d')
collatdate = '2013-01-04'
def get_reinv_assets(dealname, date):
@@ -55,7 +55,8 @@ def get_reinv_assets(dealname, date):
d['REINV_TBA2'] = line['Fixed or Float']
return d
-for dealname in ["abcl071", "ammcclo5", "atr4cdo", "atr5cdo", "blumt3", "callid6", "goldl5", "limes", "oceant2", "symph4"]:
+# for dealname in ["abcl071", "ammcclo5", "atr4cdo", "atr5cdo", "blumt3", "callid6", "goldl5", "limes", "oceant2", "symph4"]:
+for dealname in ["abcl071"]:
cursor.execute('SELECT \"Reinv End Date\" from latest_clo_universe where dealname=%s', (dealname,))
reinvenddate = cursor.fetchone()[0]
if reinvenddate:
@@ -90,10 +91,11 @@ for dealname in ["abcl071", "ammcclo5", "atr4cdo", "atr5cdo", "blumt3", "callid6
if "DEAL_NAME" in line:
newline = "DEAL_NAME=" + dealname.upper()
fh2.write(newline)
+ continue
if pattern11.match(line):
line = re.sub(pattern11, r"\1{0}\2", line).format(dealname.upper()).rstrip()
if reinv_assets["REINV_TBA1"] == "Float":
- line = line + "COUP_SPR=2.5|AMORT=Bullet|USE_REINVEST_PIP=1|MAT_DATE=84|\n"
+ line = line + "COUP_SPR=3.45|AMORT=Bullet|USE_REINVEST_PIP=1|MAT_DATE=84|\n"
elif reinv_assets["REINV_TBA1"] == "Fixed":
line = line + "COUP_SPR=7|AMORT=Bullet|USE_REINVEST_PIP=1|MAT_DATE=84|\n"
fh2.write(line)
@@ -101,7 +103,7 @@ for dealname in ["abcl071", "ammcclo5", "atr4cdo", "atr5cdo", "blumt3", "callid6
if pattern12.match(line):
line = re.sub(pattern12, r"\1{0}\2", line).format(dealname.upper()).rstrip()
if reinv_assets["REINV_TBA2"] == "Float":
- line = line + "COUP_SPR=2.5|AMORT=Bullet|USE_REINVEST_PIP=1|MAT_DATE=84|\n"
+ line = line + "COUP_SPR=3.45|AMORT=Bullet|USE_REINVEST_PIP=1|MAT_DATE=84|\n"
elif reinv_assets["REINV_TBA2"] == "Fixed":
line = line + "COUP_SPR=7|AMORT=Bullet|USE_REINVEST_PIP=1|MAT_DATE=84|\n"
fh2.write(line)