aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/parse_baml_swaption.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/parse_baml_swaption.py b/python/parse_baml_swaption.py
index e491af91..86aad8f4 100644
--- a/python/parse_baml_swaption.py
+++ b/python/parse_baml_swaption.py
@@ -28,7 +28,7 @@ columns = [
em = ExchangeMessage()
-for msg in em.get_msgs(path=["AutoBook", "BAML Swaption"]):
+for msg in em.get_msgs(path=["AutoBook", "BAML Swaption"], count=2):
dfs = pd.read_html(msg.body)
trades = []
for df in dfs:
@@ -38,6 +38,8 @@ for msg in em.get_msgs(path=["AutoBook", "BAML Swaption"]):
continue
trades.append(trade)
trade = SwaptionDeal.from_baml_email(trade)
+ trade.stage()
+ trade.commit()
df = pd.DataFrame.from_dict(trades)
df.columns = df.columns.str.lower().str.replace(" ", "_")
additional_columns = ["collateral"] if "collateral" in df.columns else []