diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/process_queue.py | 3 | ||||
| -rw-r--r-- | python/task_server/insert_tranche_quotes.py | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/python/process_queue.py b/python/process_queue.py index c3afda15..31d01160 100644 --- a/python/process_queue.py +++ b/python/process_queue.py @@ -168,6 +168,9 @@ def build_line(obj, queue_name='bond_trades'): obj['Portfolio'] = 'MORTGAGE' obj['Transaction Indicator'] = "Buy" if obj.buysell else "Sell" obj['Delivery'] = 'S' + ## zero coupon bond + if obj['CUSIP'] != obj['GlopeOp Security Identifier']: + obk['CUSIP'] = None elif queue_name == 'swaption_trades': obj['Deal Type'] = 'SwaptionDeal' obj['Portfolio'] = 'OPTIONS' diff --git a/python/task_server/insert_tranche_quotes.py b/python/task_server/insert_tranche_quotes.py index 7531c32a..58a6e207 100644 --- a/python/task_server/insert_tranche_quotes.py +++ b/python/task_server/insert_tranche_quotes.py @@ -34,7 +34,7 @@ tenordict = {'3': '3yr', '5': '5yr', '7':'7yr', '10':'10yr'} runningdict1 = {0: 500, 3:100, 7:100, 15: 25}
runningdict2 = {0: 500, 3:500, 7:500, 10:100, 15:100, 30:100}
-def insert_quotes(year=2015, quote_dir=None):
+def insert_quotes(year=2016, quote_dir=None):
if not quote_dir:
root_dir = '/home/share/CorpCDOs'
quote_dir = os.path.join(root_dir, 'Tranche_data', 'Quotes')
@@ -97,7 +97,7 @@ def insert_quotes(year=2015, quote_dir=None): elif csvdict['Ticker'] == 'CDX-NAIG':
- if series>=26:
+ if series>=28:
continue
trancheupfrontbid = convert(csvdict['Upfront Bid'])
trancheupfrontask = convert(csvdict['Upfront Ask'])
@@ -105,7 +105,7 @@ def insert_quotes(year=2015, quote_dir=None): trancheupfrontmid = (trancheupfrontbid + trancheupfrontask)/2
except TypeError:
trancheupfrontmid = None
- if series==25:
+ if series>=25:
running = 100
else:
running = runningdict2[attach] if series<19 else runningdict1[attach]
@@ -138,7 +138,7 @@ def insert_quotes(year=2015, quote_dir=None): except TypeError:
trancherunning = None
trancheupfrontbid = trancheupfrontmid = trancheupfrontask = 0
- if series in [19, 21, 22, 24]:
+ if series in [19, 21, 22, 24, 26]:
if attach<=3:
trancherunningbid = trancherunningask = trancherunningmid = 500 if series==19 else 100
trancheupfrontbid = convert(csvdict['Upfront Bid'])
|
