Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
That'll do it. If no path is given it will default to the folder the batch file is in. I went back through my batch files and placed the full path in all of them just to be safe.
Wish the CME would hurry up and send me a user id and password so i can download SpanPosCov.exe...So frustrating, want to try the ideas you guys have given!
Hi Ron,
So if in PCSPAN each option is its own portfolio, would you use the risk reporter tool to extract them all out into one excel/csv file, or do you have another method?
Cheers
Scott
I did misspeak (thanks for catching that) ... it is the scan risk contribution that is listed, not the margin. The main thing is that it does not add in the Short Option Minimum (SOM). I loaded it up in PC-SPAN with 1 GCZ3 C1660 I get $61 for risk and $71 for IM. Digging through PC-SPAN results it looks like the SOM for GC added $55 to the $7 risk array (rounded to $61), plus the option value of $10 for the $71 total.
Unfortunately, the ScanRiskContr report doesn't reflect the SOM. That is done in the PBReq report, but in there the SOM is grouped by commodity so it won't be too helpful for multiple positions in the same market. Your method of using the spanit.exe with the position name in the firm column may be the best solution for calculating individual position margin that will include the SOM. Thanks for the idea.
The procedure would be to create the CSV spreasheet like post #12 with your contracts.
Run SPAN Position Converter Utility to create the .pos file.
Run the SPAN Script batch (spanit) created in post #6.
The output of SPAN Script would be a spreadsheet that looks like this (Column M is the IM)
Or if you run my FormatSPANMargins sub it would look like this (Column L is the IM) I delete column A and do a Text to Column procedure on the resulting Column A to extract the symbols from the rest of the info.
Column H is the current option value in dollar form. You just multiply this by -1 to get a positive number.
Column J is the MM.
The SPAN Risk under Initial Requirements is the IM. $61 in this case. That matches statements I get from the firms I trade at.
The Risk Initial amount on the statements is what I am looking to match. The Initial Margin number on some statements includes the value of the option. But that number is not used to determine margin calls and we don't use that to determine ROI.
I finally received the login credentials from the CME and have started to try and automate the PC-SPAN experience like you guys.
But i am hitting the second hurdle. I have copied your guys coding from earlier posts and the 'DownloadRiskArrayFiles" sub works fine; places the unzipped data files in the 'span4\data' folder ready for loading into SPAN. All good there.
I created a "SpanScriptLoadRiskArrayFiles.txt" file and saved it in Span4\Bin folder. It contains two lines:
Load C:\Span4\Data\cme.s.pa2
Load C:\Span4\Data\nyb.s.pa2
I created a "LoadRiskArrayFiles.bat" file and saved it in Span4\Bin folder. It contains:
C:\Span4\Bin\spanit.exe C:\Span4\Bin\SpanScriptLoadRiskArrayFiles.txt
When i run the macro, it opens up a dos window which contains "Batch Interface for PC-SPAN" and then says it is loading the files. The window then closes. The problem is when i then open PC-SPAN to see if files have been loaded it is empty in there.......... The data files themselves are fine as i loaded them manually in PC-SPAN and they populate as you would expect (and then exited without saving).
Any ideas what i am missing / doing wrong? I can't find any setting in the program where i need to enable batch processing...
My Code is attached:
-------------------------------------------------
Sub DownloadRiskArrayFiles()
On Error GoTo GetOut
Dim RetVal
Dim batchfile As String
Dim path As String
dateit = Range("SpanMacro!B2").Value 'Date in YYYYMMDD format
namecme = "cme." & dateit & ".s.pa2.zip"
namenyb = "nyb." & dateit & ".s.pa2.zip"
path = "C:\Span4\Data"