PC-SPAN (Page 5) - Options on Futures | futures.io
futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Traders Hideout > Options on Futures


PC-SPAN
Started:October 23rd, 2013 (09:36 AM) by ron99 Views / Replies:41,460 / 403
Last Reply:November 19th, 2016 (08:49 AM) Attachments:100

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike
     

Reply
 100  
 
Thread Tools Search this Thread

PC-SPAN

Old November 21st, 2013, 12:38 AM   #41 (permalink)
Market Wizard
OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,323 since Jul 2011
Thanks: 634 given, 3,903 received
Forum Reputation: Legendary

Scott, the spanit program does not load the arrays into the program for you to use PC-SPAN. You have to load them manually if you want to use the PC-SPAN program.

Reply With Quote
     
The following user says Thank You to ron99 for this post:
     

Old November 21st, 2013, 12:48 AM   #42 (permalink)
Elite Member
Qld, Australia
 
Futures Experience: Beginner
Platform: Excel/Hoadley/PC-SPAN
Broker/Data: OX
Favorite Futures: Options
 
Posts: 28 since Mar 2012
Thanks: 6 given, 39 received

Oh, now i see why in the spanscript file you need to:
- load datafiles
- load position files
Calc
- send summary output csv file
all in the one batch, as the data is not actually stored anywhere you need it to return the csv file output before the batch file completes.....makes perfect sense now i know that.

I was trying to seperate them into multiple tasks in different batch files thinking the data is stored in the program for the next step

Thanks!
Scott

Reply With Quote
     

Old November 21st, 2013, 01:08 AM   #43 (permalink)
Market Wizard
OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,323 since Jul 2011
Thanks: 634 given, 3,903 received
Forum Reputation: Legendary



spj77 View Post
Oh, now i see why in the spanscript file you need to:
- load datafiles
- load position files
Calc
- send summary output csv file
all in the one batch, as the data is not actually stored anywhere you need it to return the csv file output before the batch file completes.....makes perfect sense now i know that.

I was trying to seperate them into multiple tasks in different batch files thinking the data is stored in the program for the next step

Thanks!
Scott

With spanit you are using the program without having to open it. Thus saving a bunch of time.

Here is the manual for spanit.
http://www.cmegroup.com/confluence/display/pubspan/Script+Language+for+PC-SPAN+v.4.05+and+SPAN+Risk+Manager

Here is the manual for all of PC-SPAN
http://www.cmegroup.com/confluence/display/pubspan/SPAN+Overview

Reply With Quote
     
The following user says Thank You to ron99 for this post:
     

Old November 21st, 2013, 04:47 PM   #44 (permalink)
Market Wizard
OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,323 since Jul 2011
Thanks: 634 given, 3,903 received
Forum Reputation: Legendary

Warning.

The example spreadsheet in this CME Span Pos Converter pdf manual
http://www.cmegroup.com/clearing/risk-management/files/spanposconvutil.pdf

for ES shows using cc code (column J) ES. But that is not correct. You need to use cc code SP.

I emailed CME about this. We'll see if they do anything.

Reply With Quote
     

Old November 24th, 2013, 04:09 PM   #45 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 179 since Sep 2012
Thanks: 24 given, 198 received

Margin Calculation without PC-SPAN

Futures Edge on FIO
I've been working on a spreadsheet that can extract the risk, value and delta of an option from the CME risk arrays for some time. After ron99 found some discrepancies with a previous post about risk and margin it forced me to review the methods I was using, but it helped me to eventually come up with what I think is some better code. I found that the short option minimum and initial-to-maintenance ratio (two items I was missing) were in the risk arrays, so you have everything you need to calculate the SPAN initial/maintenance and the Total initial/maintenance margins (option value added to SPAN margins).

Just enter the option, the underlying, call or put, strike and net positions and the spreadsheet will extract/calculate the price of the option, the position value, option delta, position risk, short option minimum, and the SPAN and Total margins. I tested this out on a few portfolios to make sure that it was coming up the same numbers as PC-SPAN. I know ron99 said that his firms use the SPAN initial margin, but the firms I trade at use the Total initial margin, so I decided to included both the SPAN and Total margins in the spreadsheet.

I think an advantage that this may have is that it's a little simpler to get the numbers ... all that is needed is the spreadsheet and the risk arrays (no PC-SPAN or batch files).

Don't get me wrong, it has its limitations. It is only coded to work with 12 of the markets I trade, but could be expanded fairly easy. I think I can get it to do simple, two-legged spreads eventually, but for now it will calculate individual option positions. Another aspect it does not handle right now are the credits for offsetting positions, so if you are looking for entire portfolio margin calculation stick with PC-SPAN.

If anyone happens to take it for a spin, let me know if you find any issues ... I'm sure they are in there.

Happy Thanksgiving!

***A few additional notes if you give it a try, the option contract, underlying contract and strikes should stay in the format as shown in the spreadsheet. Short positions should be entered as negative numbers in the net column (e.g. -2). Also, the spreadsheet will be looking for the CME risk arrays labelled as cme.s.pa2 and nyb.s.pa2 in the C:\Span4\Data folder.

Attached Files
Register to download File Type: zip Margin without PC-SPAN.zip (33.5 KB, 72 views)

Last edited by Dudetooth; November 24th, 2013 at 05:31 PM. Reason: Forgot some details
Reply With Quote
     
The following 4 users say Thank You to Dudetooth for this post:
     

Old November 24th, 2013, 10:42 PM   #46 (permalink)
Market Wizard
OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,323 since Jul 2011
Thanks: 634 given, 3,903 received
Forum Reputation: Legendary

Dudetooth, that is great! The options I compared all matched PC-SPAN for margin.

I found out that you have to use capitalized letters for the symbols.

How do you use the Single Position button?

Can other commodities be added? Like HE (Hogs), CT, CO, DA (milk), HO, RB, SI.

Reply With Quote
     

Old November 25th, 2013, 07:03 AM   #47 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 179 since Sep 2012
Thanks: 24 given, 198 received


ron99 View Post
I found out that you have to use capitalized letters for the symbols.

Thanks for finding that. I suppose I could fix that by having the code make your text input upper case before running the search. I'll put it on the to-do list.


ron99 View Post
How do you use the Single Position button?

When you click on the Single Position button an input box will appear asking you to select an option. Click anywhere in the row of an option you want to look at and click OK. It runs the code for just that row/option. It should come in handy if you have just a couple of options to check our or if you add one to your list and don't want to run them all. I will eventually get that into my main spreadsheet so as I am looking at potential trades I can run the numbers for just the strikes that I may want to sell.


ron99 View Post
Can other commodities be added? Like HE (Hogs), CT, CO, DA (milk), HO, RB, SI.

Yes, it just takes a little reverse-engineering. I run a test portfolio in PC-SPAN so I can find the symbols and values and then dig through the risk arrays manually to make sure I get the search strings right. I can add these symbols to the to-do list if you'd like.

Reply With Quote
     
The following user says Thank You to Dudetooth for this post:
     

Old November 25th, 2013, 09:08 AM   #48 (permalink)
Market Wizard
OH
 
Futures Experience: Advanced
Platform: QST
Broker/Data: QST, DeCarley Trading, Gain
Favorite Futures: Options on Futures
 
Posts: 2,323 since Jul 2011
Thanks: 634 given, 3,903 received
Forum Reputation: Legendary

Yes I would like those symbols added if you could.

I am going to add the download disk array macro to this spreadsheet. So then all can be done from one spreadsheet.

There wouldn't be a problem adding that on this spreadsheet?

Reply With Quote
     

Old November 25th, 2013, 12:17 PM   #49 (permalink)
Elite Member
Steubenville Ohio
 
Futures Experience: Intermediate
Platform: OX, OEC, RJO
Favorite Futures: Options on Futures
 
Posts: 179 since Sep 2012
Thanks: 24 given, 198 received


ron99 View Post
There wouldn't be a problem adding that on this spreadsheet?

No, their shouldn't be any issues ... just check the cell references in the code to make sure they are looking in the right place and it should work fine. I'll look to add the download/unzip/rename function on the next version.

Reply With Quote
     
The following user says Thank You to Dudetooth for this post:
     

Old November 25th, 2013, 04:32 PM   #50 (permalink)
Elite Member
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,194 since Jul 2012
Thanks: 1,004 given, 3,965 received



Dudetooth View Post
I've been working on a spreadsheet that can extract the risk, value and delta of an option from the CME risk arrays for some time. After ron99 found some discrepancies with a previous post about risk and margin it forced me to review the methods I was using, but it helped me to eventually come up with what I think is some better code. I found that the short option minimum and initial-to-maintenance ratio (two items I was missing) were in the risk arrays, so you have everything you need to calculate the SPAN initial/maintenance and the Total initial/maintenance margins (option value added to SPAN margins).

Just enter the option, the underlying, call or put, strike and net positions and the spreadsheet will extract/calculate the price of the option, the position value, option delta, position risk, short option minimum, and the SPAN and Total margins. I tested this out on a few portfolios to make sure that it was coming up the same numbers as PC-SPAN. I know ron99 said that his firms use the SPAN initial margin, but the firms I trade at use the Total initial margin, so I decided to included both the SPAN and Total margins in the spreadsheet.

I think an advantage that this may have is that it's a little simpler to get the numbers ... all that is needed is the spreadsheet and the risk arrays (no PC-SPAN or batch files).

Don't get me wrong, it has its limitations. It is only coded to work with 12 of the markets I trade, but could be expanded fairly easy. I think I can get it to do simple, two-legged spreads eventually, but for now it will calculate individual option positions. Another aspect it does not handle right now are the credits for offsetting positions, so if you are looking for entire portfolio margin calculation stick with PC-SPAN.

If anyone happens to take it for a spin, let me know if you find any issues ... I'm sure they are in there.

Happy Thanksgiving!

***A few additional notes if you give it a try, the option contract, underlying contract and strikes should stay in the format as shown in the spreadsheet. Short positions should be entered as negative numbers in the net column (e.g. -2). Also, the spreadsheet will be looking for the CME risk arrays labelled as cme.s.pa2 and nyb.s.pa2 in the C:\Span4\Data folder.


Dude -
This looks awesome! Can you save a version in Excel 97 format? I am still way behind the times...

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
     

Reply



futures.io > Futures Trading, News, Charts and Platforms > Traders Hideout > Options on Futures > PC-SPAN

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

NinjaTrader 8: Features and Enhancements, Tips and Tricks

Dec 6
 

Al Brooks: Stop Losing when a Good Trade goes Bad, Correcting Mistakes

Elite only
 

Trading Technologies: Algo Design Lab hands-on

Dec 13
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Current PC Specs tderrick Tech Support 45 October 28th, 2012 04:40 PM
Any PC Gamers in here? forrestang Off-Topic 61 October 10th, 2012 03:37 PM
Virtual PC setup how? boze man Tech Support 5 September 8th, 2012 04:59 PM
I need PC help Boomer34 Tech Support 5 January 22nd, 2012 03:28 PM
PC Question NMTrader Off-Topic 0 July 12th, 2009 11:56 PM


All times are GMT -4. The time now is 12:36 PM.

Copyright © 2016 by futures.io. All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
 
no new posts

Page generated 2016-12-05 in 0.15 seconds with 20 queries on phoenix via your IP 54.205.150.215