aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/quote_parsing/parse_emails.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/quote_parsing/parse_emails.py b/python/quote_parsing/parse_emails.py
index 09d3681a..ebda3101 100644
--- a/python/quote_parsing/parse_emails.py
+++ b/python/quote_parsing/parse_emails.py
@@ -22,7 +22,7 @@ def list_imm_dates(date):
def makedf(r, indextype, quote_source):
- if indextype == "IG":
+ if indextype == "IG" or indextype == "XO":
cols = [
"strike",
"rec_bid",
@@ -644,6 +644,7 @@ def parse_jpm(fh, index_desc):
"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]+)",
"EU": r"JPM iTrx Options: MAIN \(S34V1\) (?P<expiry>[\d]+-[\w]+-[\d]+) [*]{2} Fwd @(?P<fwdprice>[\d.]+), Delta @([\d]+)",
+ "XO": r"JPM iTrx Options: XOVER \(S34V\d\) (?P<expiry>[\d]+-[\w]+-[\d]+) [*]{2} Fwd @(?P<fwdspread>[\d.]+), Delta @([\d]+)",
}
pat = re.compile(regex[index_desc["index"]])
line = next(fh).strip()
@@ -699,7 +700,7 @@ eu_subject_citi = re.compile("")
eu_subject_cs = re.compile("")
eu_subject_bnp = re.compile("")
eu_subject_jpm = re.compile(
- r"JPM iTrx Options: ITRAXX.(\w+) S(\d+) 5Y \S+-\S+ \[ref ([\d.]*)\].*"
+ r"JPM iTrx Options: ITRAXX.(\w+) S(\d+) 5Y (?:V2&V1 )?\S+-\S+ \[ref ([\d.]*)\].*"
)
@@ -746,6 +747,7 @@ def parse_email(email: Path, date_received: datetime.date, conn):
else:
indextype, series, ref = m.groups()
indextype = "EU" if indextype == "MAIN" else indextype
+ indextype = "XO" if indextype == "XOVER" else indextype
ref = float(ref)
series = int(series)
cur_pos = fh.tell()