I'm trying to factor in margins in my backtesting system. I haven't had any issues with with futures because the information is easy to find, but I'm struggling to figure out how I should handle options, spreads, and other portfolio SPAN situations. I'm aware of the basic SPAN margining system, but my understanding is that I must shell out ~500 to CME to get PC-Scan, which is a utility to decode their span files and calculate portfolio SPAN requirements to get the exact numbers. I wanted to implement a calculation in C# or Python or something that I could call on the run as needed, not a desktop application, so I'm not sure that PC-Scan really fits my needs, but I'll shell out if necessary. My question is if anyone has any way to approximate conservatively the SPAN requirements sans the actual risk parameters and data from CME? Something like simulated VaR perhaps? Also, if they don't just use SPAN, where can I find info on future option margin requirements. Thanks.
If you can implement even a back of the napkin real time calc for PC Span, Please discuss it! Otherwise, there's the margin API at the CME. http://www.cmegroup.com/confluence/display/EPICSANDBOX/Margin+Service+API+-+Developer+Guide
The back of the napkin calculation is really what I'm going for. I'd be happy to share if I get one. I'll check out this API. I had no idea it existed. Thanks a lot. If I had some live trading data where the SPAN result and portfolio is recorded, it might be a lot easier to get an approximation of SPAN margin. If anyone wants to pitch in that sort of data from after Oct. 26, I'd be happy to share my results in finding an approximation. Shoot me a PM if so.
Also interesting is the Option Exercise API. Real time option exercise+settlement is not likely but not an impossibility. Otherwise, what would keep a mm from immediately exercising(with simultaneous futures offset) as soon as an ITM option was sold at a tick premium over intrinisic. Now that would be a fast return of capital and an incredibly efficient market!
CME Core will calculate SPAN margin. It is free. http://www.cmegroup.com/clearing/cme-core-cme-clearing-online-risk-engine.html
Thanks for pointing that out. I assume this is real-time? Are you (or anyone) aware of anything that can be used for historical SPAN calculations? Thanks.
Does your organization use the margin API by any chance for getting the SPAN requirements for a hypothetical historical portfolio in backtests? I'm just looking at it now and still trying to decide if this will work for my needs. Thanks.