aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/strat_cash_realloc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/strat_cash_realloc.py b/python/strat_cash_realloc.py
index f081de8b..e3319810 100644
--- a/python/strat_cash_realloc.py
+++ b/python/strat_cash_realloc.py
@@ -68,9 +68,9 @@ wire_headers = get_headers("wire", "BOWDST")
dawndb = dbconn("dawndb")
with dawndb.cursor() as c, dawndb.cursor() as d:
- date = datetime.date(2022, 5, 18)
+ date = datetime.date(2022, 5, 19)
c.execute(
- "SELECT endqty, port, strat, custacctname, invid, custodian, cp_code, pfm.folder AS dirty_strat FROM valuation_reports vr LEFT JOIN accounts2 ON custacctname=cash_account LEFT JOIN portfolio_folder_mapping pfm ON vr.strat::text=pfm.clean_folder WHERE periodenddate =%s AND vr.fund='BOWDST' AND invid IN ('USD','EUR') AND port NOT IN ('CASH', 'GFS_HELPER_BUSINESS_UNIT') and endqty !=0 and pfm.folder is not NULL;",
+ "SELECT vr.*, accounts2.custodian, accounts2.cp_code, pfm.folder AS dirty_strat FROM (SELECT sum(endqty) AS endqty, port, strat, custacctname, invid FROM valuation_reports v WHERE periodenddate ='2022-05-19' AND fund='BOWDST' AND invid IN ('USD', 'EUR') AND port NOT IN ('GFS_HELPER_BUSINESS_UNIT', 'CASH') GROUP BY (port, strat,custacctname, invid) HAVING sum(endqty) !=0) vr LEFT JOIN accounts2 ON custacctname=cash_account LEFT JOIN portfolio_folder_mapping pfm ON vr.strat::text=pfm.clean_folder where pfm.folder is not NULL;",
(date,),
)
trades = []