Parse OCC Option Symbols Into Structured Contract Fields
Last updated: November 29, 2026
Quick Overview
Parse an OCC-style option symbol such as 'AAPL 261218C00195000' into root, expiry date, call or put, and strike price, rejecting malformed input with a clear error.
Point72
November 29, 20260
0
0 solved
Parse an OCC-style option symbol such as 'AAPL 261218C00195000' into root, expiry date, call or put, and strike price, rejecting malformed input with a clear error.
Options flow into Point72 systems from brokers and vendors in OCC symbology, and a parsing bug can silently book the wrong strike. The phone screen checks careful string handling: fixed-width fields parsed from the right, validation, and exact decimal handling of the strike.
What the Interviewer Expects
- Notice the last 15 characters are fixed width and parse from the right
- Strip padding from the variable-length root
- Convert YYMMDD into a real date and validate it
- Decode the 8-digit strike as thousandths without float error
- Raise informative errors on malformed input
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- How would you handle adjusted options whose root has a digit suffix like AAPL1?
- How would you parse a million symbols per second efficiently?
- Vendors send the same contract in different formats: how would you normalize them?
- How would you generate the OCC symbol back from the parsed fields?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
OCC symbols are a root of up to six characters (space padded in the canonical 21-character form, unpadded in many feeds), then a six-digit expiry YYMMDD, one character C or P, and an eight-digit strik...
High-Level Design
Parse from the right, because the last 15 characters are fixed width while the root varies. Split into root, date, type and strike, validate each, and convert. Use Decimal for the strike so 5912.5 is ...