aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/quote_parsing/parse_emails.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/python/quote_parsing/parse_emails.py b/python/quote_parsing/parse_emails.py
index 982fa4c7..02d0ee94 100644
--- a/python/quote_parsing/parse_emails.py
+++ b/python/quote_parsing/parse_emails.py
@@ -499,12 +499,19 @@ def parse_cs(fh, indextype, series, quotedate):
if m:
if indextype == "IG":
ref, fwdspread, expiry, fwdbpv = m.groups()
+ expiry = pd.to_datetime(expiry, format="%d-%b-%y")
+ d.update(
+ {
+ "ref": ref,
+ "expiry": expiry,
+ "fwdspread": fwd,
+ "fwdbpv": fwdbpv,
+ }
+ )
else:
ref, fwdprice, expiry = m.groups()
- expiry = pd.to_datetime(expiry, format="%d-%b-%y")
- d.update({"ref": ref, "expiry": expiry, "fwd": fwd})
- if indextype == "IG":
- d.update({"fwd_dv01": fwd_dv01})
+ expiry = pd.to_datetime(expiry, format="%d-%b-%y")
+ d.update({"ref": ref, "expiry": expiry, "fwdprice": fwd})
fwd_index.append(d.copy())
option_stack[expiry] = parse_cs_block(fh, indextype)
else: