From the December 01, 2006 issue of Futures Magazine • Subscribe!



CATEGORIES: Business finance


COST: $500.00

Margin requirements for options on equities are easily found with just a few clicks on a broker’s Web site. The margin needed for a trade is easy to calculate; you know what it’s going to be before you put the trade on. Margins for futures are based on the risk of the overall futures portfolio, which is not so easy to calculate. One method to compare one trade to another is by return on investment. That’s expected profit divided by cost. If you sell an option, the margin is the cost. With futures the cost is the amount of the increase in margin of the entire futures account. If you do not know how much the margin is, you can not figure the return on investment. To calculate the margin requires a program called PC-SPAN (Standard Portfolio Analysis of Risk), which was developed by the Chicago Mercantile Exchange (CME). Similar third-party programs also exist.

There are four main parts to SPAN: the organization master file, the risk parameter file, your positions and the calculated margin.

The organization master file, which contains program setup, currency and exchange information, is downloaded from the CME’s Web site or FTP site on the Internet. This file needs to be updated occasionally when there is an exchange or product change. The risk parameter files for CME or Chicago Board of Trade (CBOT) products are downloaded from the same sites. Risk parameter files for products on other exchanges are available through their sites. Risk files are updated five times a day at 10:30 a.m., 12:00 a.m., 3:15 p.m., 5:00 p.m. and 6:00 p.m. (CST). The program uses the three inputs—the organization master file, the risk parameter file and your positions — to generate a SPAN file (.spn). The calculated margin combined with all the parameter information are stored in this .spn file.


For manual operation you would download the latest organization master if you do not already have it and you would download the latest parameter file using your Internet browser. There is no facility in the program to directly fetch the latest risk parameter file. The CME site ( has each of the five daily releases for each trading day for the year plus the latest five files in zipped and unzipped format. You would then need to select the latest file and copy it to the span/data directory. The file is about six-megabytes so deciding to download the zipped or the unzipped file depends on the speed of your Internet connection.

Now you’re ready to start SPAN and load an existing .spn file. Only one .spn file can be loaded at a time. If loading fails you will get a message to see the log file, but a log file may not actually have been produced. Once loaded you will see a tree view with the day and the date of the risk files followed by “Settle Final,” regardless of whether you loaded the 10:30 a.m. file or the 6:00 p.m. file.

Under the risk file dates will be a branch called “Portfolios,” which will contain each account listed by clearing firm and account name you entered when you created the new portfolio. At this point you can drag the portfolio from under the old date to the new date. If there are no changes to the portfolio you can just click of the “+/-” button and you will get the margin requirements for the selected account. Quantity-only position changes can be done with only a few clicks. Adding new positions requires selecting the exchange, the product and the contract. Additionally for options, you have to select options and then the option series. And if you leave that screen to get the margin calculations, you will have to reselect everything again because the program does not retain any of your previous selections.


Automating the use of SPAN is essential if you have many accounts, positions or run many what-if situations. The program feels like it was developed in three different countries. The organization master file is a database, the risk parameter file is ASCII and the .spn files are XML. PC SPAN lets you make up an ASCII file of your accounts and their positions. The format for the file is found at There is a utility that runs a script file, which will produce a .spn file. To do this you must load the six-megabyte risk file, load the position file, calculate the margin requirements and save the new .spn file.

It’s best to do your development in a DOS window to see what’s happening, and never throw away your DOS book because the program’s error messages may be obscure and the general log generation is inconsistent. You also will need to review the documentation both in the program and at the above mention Web site to get the most of this product.

Here is a sample script file:

Load C:\Span4\Data\ccl.e.pa2

Load C:\Span4\Data\Positions.txt


Save C:\Span4\Data\Span.spn

LogSave C:\Span4\Bin\Log.txt

The documentation doesn’t mention, it but the utility to produce reports only works for systems running Windows XP. If you are not running Windows XP, the only other choice is to search the .spn to retrieve the margin numbers. This may not be the most efficient method because the file contains more than 700,000 lines plus any accounts and positions. There is no information in the program or the Web site on the .spn file structure. You could feel a little uncomfortable with this approach, but a large number of firms are probably getting their margin numbers this way.

The Securities and Exchange Commission is considering changing the margin requirement rules on stocks and stock options to a system based on the entire account as in futures.

You would expect a program written today would have a more efficient interface and better process methods than older programs. Equity option traders may be spending a lot more effort on getting the margin if it changes to a variable from the current fixed number.

Rod Baker is an independent trader who trades futures, stocks and options.

He has managed an engineering company for 25 years.

comments powered by Disqus
Check out Futures Magazine - Polls on LockerDome on LockerDome