diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/process_queue.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/process_queue.py b/python/process_queue.py index defc156d..e3a85cc6 100644 --- a/python/process_queue.py +++ b/python/process_queue.py @@ -56,7 +56,6 @@ def bbg_process(cursor, session, trade): fields = ["MTG_FACTOR_SET_DT", "INT_ACC"] if not cursor.fetchone(): fields += ["MATURITY", "CRNCY", "NAME", "MTG_FACE_AMT"] - print('pomme') bbg_id = (trade['cusip'] or trade['isin']) + ' Mtge' bbg_type = 'Mtge' @@ -82,6 +81,10 @@ def bbg_process(cursor, session, trade): cursor.execute(sqlstr, (trade['identifier'], trade['cusip'], trade['isin'], bbg_data['NAME'], bbg_data['MTG_FACE_AMT'], bbg_data['MATURITY'], bbg_data['CRNCY'], bbg_type, trade['asset_class'])) + #mark it at buy price + if trade.buysell: + sqlstr = "INSERT INTO marks VALUES(%s, %s, %s)" + cursor.execute(sqlstr, (trade['trade_date'], trade['identifier'], trade['price'])) def generate_csv(l): output = StringIO() |
