aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/reallocate_iam.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/python/reallocate_iam.py b/python/reallocate_iam.py
index af9dbed7..fa00e8f3 100644
--- a/python/reallocate_iam.py
+++ b/python/reallocate_iam.py
@@ -37,6 +37,7 @@ def gen_new_iam(fund, cob, conn):
def gen_new_iam_offsets(fund, cob, conn):
"""'Generates offsets if the sma has already updated these iam deals"""
+ _ignore = {"BOWDST": ("GS_FCM",)}
with conn.cursor() as c:
c.execute(
"SELECT broker, currency, fund, sum(start_money) AS start_money "
@@ -47,12 +48,13 @@ def gen_new_iam_offsets(fund, cob, conn):
),
)
for row in c:
- d = row._asdict() | {
- "is_offset": True,
- "folder": "M_CSH_CASH",
- "trade_date": cob,
- }
- yield IAMDeal.from_dict(**d)
+ if row.broker not in _ignore[fund]:
+ d = row._asdict() | {
+ "is_offset": True,
+ "folder": "M_CSH_CASH",
+ "trade_date": cob,
+ }
+ yield IAMDeal.from_dict(**d)
def gen_matured_iam(fund, cob, conn):