diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/reallocate_cash.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/reallocate_cash.py b/python/reallocate_cash.py index 90b4a06e..ffe4f514 100644 --- a/python/reallocate_cash.py +++ b/python/reallocate_cash.py @@ -102,7 +102,7 @@ def insert_iam_sql(conn, trade_date): totals = defaultdict(int) with conn.cursor() as c: strategy_allocation = ( - "SELECT broker, amount, strategy FROM (SELECT *, rank() " + "SELECT broker, amount, currency, strategy FROM (SELECT *, rank() " "OVER(PARTITION BY broker,fund ORDER BY date desc) FROM strategy_im si " "WHERE fund = 'BOWDST' AND date<=%s ORDER BY date DESC) test WHERE RANK=1;" ) @@ -116,7 +116,7 @@ def insert_iam_sql(conn, trade_date): _brokers[row.broker], None, row.amount, - "USD", + row.currency, False, ) ) |
