Skip to content

Instantly share code, notes, and snippets.

@canada4663
canada4663 / option_parser.py
Created January 19, 2014 16:39
Simple Method for Parsing Stock Option Symbols into Underlying, Expiration Date, Option Type, and Strike Price
def _parse_option(self,symbol):
#option_format = r'''
# ^([\D]{1,6})
# ([\d]{2})
# ([\d]{2})
# ([\d]{2})
# ([PC]{1})
# ([\d]{5})
# ([\d]{3})
# $'''