aboutsummaryrefslogtreecommitdiffstats
path: root/python/quote_parsing
diff options
context:
space:
mode:
Diffstat (limited to 'python/quote_parsing')
-rw-r--r--python/quote_parsing/parse_emails.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/quote_parsing/parse_emails.py b/python/quote_parsing/parse_emails.py
index 926384c3..a16b6754 100644
--- a/python/quote_parsing/parse_emails.py
+++ b/python/quote_parsing/parse_emails.py
@@ -640,9 +640,11 @@ def parse_bnp(fh, index_desc):
def parse_jpm(fh, index_desc):
option_stack = {}
fwd_index = []
- pat = re.compile(
- r"JPM CDX Options: (IG|HY) [(]([\w\d]*)[)] (?P<expiry>[\d]+-[\w]+-[\d]+) [*]{2} Fwd @(?P<fwdspread>[\d.]+), Delta @([\d]+)"
- )
+ regex = {
+ "HY": r"JPM CDX Options: HY [(]([\w\d]*)[)] (?P<expiry>[\d]+-[\w]+-[\d]+) [*]{2} Fwd @(?P<fwdprice>[\d.]+), Delta @([\d]+)",
+ "IG": r"JPM CDX Options: IG [(]([\w\d]*)[)] (?P<expiry>[\d]+-[\w]+-[\d]+) [*]{2} Fwd @(?P<fwdspread>[\d.]+), Delta @([\d]+)",
+ }
+ pat = re.compile(regex[index_desc["index"]])
line = next(fh).strip()
while True:
if "**" in line: