NexusFi: Find Your Edge


Home Menu

 





PC-SPAN


Discussion in Options

Updated
      Top Posters
    1. looks_one Dudetooth with 218 posts (213 thanks)
    2. looks_two ron99 with 116 posts (55 thanks)
    3. looks_3 CafeGrande with 30 posts (4 thanks)
    4. looks_4 BlueRoo with 24 posts (5 thanks)
      Best Posters
    1. looks_one Dudetooth with 1 thanks per post
    2. looks_two SMCJB with 1 thanks per post
    3. looks_3 ron99 with 0.5 thanks per post
    4. looks_4 BlueRoo with 0.2 thanks per post
    1. trending_up 191,325 views
    2. thumb_up 317 thanks given
    3. group 75 followers
    1. forum 610 posts
    2. attach_file 159 attachments




 
Search this Thread

PC-SPAN

  #141 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


mu2pilot View Post
Dudetooth, you mention speeding things up. I was under the impression that the file read access was the bottleneck in the calc process. Sequentially searching thru 500k lines of text is a slow process. I've looked at pulling the span files into a sql db and querying it to speed up the process and may do that at some point, but I've got other project to do before that.

mu2pilot

The search is the bottleneck from what I can tell ... I was hoping that anything I could extract from the risk arrays would help. The biggest gain so far was from forcing the spreadsheet to stop any calculations while running the macro. The only other thing I can think to try is to see if more data can be captured from each read through the risk arrays and cut the number read times.

If you ever do find a way to pull the risk arrays into a db please let me know ... I'm pretty weak with db, which is why I use Excel. When all you have is a hammer, all of your problems become nails.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quant vue
Trading Reviews and Vendors
What broker to use for trading palladium futures
Commodities
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
About a successful futures trader who didn´t know anyth …
Psychology and Money Management
ZombieSqueeze
Platforms and Indicators
 
  #142 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


kevinkdog View Post
/end of unpaid testimonial

Thanks ... for a limited time you can pre-order a special collector's edition ... act now and avoid future regret!

Seriously though, the way you were grabbing a ton of strikes and calculating them made me start to think about looking for a way to scan the risk arrays. I trying to get it so the spreadsheet may only need to making one pass through the risk array for each commodity, pulling the data for each option that meets a set criteria. I'll let you know if I have any luck.

Reply With Quote
  #143 (permalink)
 ron99 
Cleveland, OH
 
Experience: Advanced
Platform: QST
Broker: QST, DeCarley Trading, Gain
Trading: Options on Futures
Posts: 3,081 since Jul 2011
Thanks Given: 980
Thanks Received: 5,785



Dudetooth View Post
Thanks ... for a limited time you can pre-order a special collector's edition ... act now and avoid future regret!

Seriously though, the way you were grabbing a ton of strikes and calculating them made me start to think about looking for a way to scan the risk arrays. I trying to get it so the spreadsheet may only need to making one pass through the risk array for each commodity, pulling the data for each option that meets a set criteria. I'll let you know if I have any luck.

And to go further with this, would it be able to only pull certain commodities? I'm sure there a thousands of options that any of us will never use.

I know that on my ICE (nyb) softs spreadsheet page it calculates them extremely fast. It's the CME contracts that take so long because there are so many CME options.

Started this thread Reply With Quote
  #144 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


ron99 View Post
And to go further with this, would it be able to only pull certain commodities? I'm sure there a thousands of options that any of us will never use.

The idea would be to extract as much as possible from the risk arrays, making the code more modular. I think there will have to be at least some code in the macro for each commodity that you would want to find options for, but the less you need to define in the code the easier it should be to expand.

Reply With Quote
  #145 (permalink)
 mu2pilot 
Dallas, TX
 
Experience: Advanced
Platform: T4, Zaner360, TOS
Broker: DeCarley Trading
Trading: Options
Posts: 104 since Sep 2013
Thanks Given: 134
Thanks Received: 52


Dudetooth View Post
The search is the bottleneck from what I can tell ... I was hoping that anything I could extract from the risk arrays would help. The biggest gain so far was from forcing the spreadsheet to stop any calculations while running the macro. The only other thing I can think to try is to see if more data can be captured from each read through the risk arrays and cut the number read times.

If you ever do find a way to pull the risk arrays into a db please let me know ... I'm pretty weak with db, which is why I use Excel. When all you have is a hammer, all of your problems become nails.

Well, not to swell your head too big, you have done a yeomans job on this spreadsheet. I've been all through the code and the risk files and it was not an easy task that you have accomplished. Many thanks. I can't make any promises that I can make it better, but if I do, I will certainly share it here.

Reply With Quote
  #146 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,463 since Jun 2009
Thanks Given: 33,239
Thanks Received: 101,662

I suggest using Quick Summary post #2 to keep track of the most recent version (link to it), or if you upload it to the Downloads section, then each time you make a new version if you'll just make a post in this thread saying so I will send out the automatic download update emails which alerts anyone who has previously downloaded the file of the new version.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #147 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,388
Thanks Received: 10,207

Amazing thread guys, and an excellent resource.

Most of the discussion seems to be focused on extracting information from risk arrays. Has anybody looked at all on generating and loading position or portfolio files?

My broker sends me a .dat file each evening with my positions in it that I can load into SPAN and duplicate their margin calculations. What I want to be able to do is generate some hypothetical portfolio's and load them into SPAN. Deciphering the data in the dat file was actually a lot easier than I expected (copy of the .dat file. copy of my position and this [AUTOLINK]CME[/AUTOLINK] link). Where I've become stuck is in saving/creating new dat files that I can then import into SPAN. I've never created dat files before and the format/spacing of the file itself is causing me problems.

Any suggestions?

Reply With Quote
  #148 (permalink)
 Dudetooth 
Steubenville Ohio
 
Experience: Intermediate
Platform: OX, OEC, RJO
Trading: Options on Futures
Posts: 266 since Sep 2012
Thanks Given: 30
Thanks Received: 274


SMCJB View Post
Amazing thread guys, and an excellent resource.

Most of the discussion seems to be focused on extracting information from risk arrays. Has anybody looked at all on generating and loading position or portfolio files?

My broker sends me a .dat file each evening with my positions in it that I can load into SPAN and duplicate their margin calculations. What I want to be able to do is generate some hypothetical portfolio's and load them into SPAN. Deciphering the data in the dat file was actually a lot easier than I expected (copy of the .dat file. copy of my position and this [AUTOLINK]CME[/AUTOLINK] link). Where I've become stuck is in saving/creating new dat files that I can then import into SPAN. I've never created dat files before and the format/spacing of the file itself is causing me problems.

Any suggestions?

I haven't played with any .dat files in conjunction with PC-SPAN ... I'm not even seeing where you can create a .dat file within PC-SPAN (maybe I'm missing something). From the description on the CME link it looks like it might just be a file with text similar to the pa2 files. If that is the case, then it should be easy to manipulate. If you can provide a .dat file I will take a look at it and see what I can come up with.

Reply With Quote
  #149 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,388
Thanks Received: 10,207


Dudetooth View Post
I haven't played with any .dat files in conjunction with PC-SPAN ... I'm not even seeing where you can create a .dat file within PC-SPAN (maybe I'm missing something). From the description on the CME link it looks like it might just be a file with text similar to the pa2 files. If that is the case, then it should be easy to manipulate. If you can provide a .dat file I will take a look at it and see what I can come up with.

I'm receiving the .dat files directly from my FCM. I like you though can not find anything on CME SPAN site that even mentions .dat files but I can confirm these do load and work properly. I've also been able to decode them easily but not create new ones.

As it happens the answer to my question appears to be to use the SPAN Position Converter Utility available directly from CME. I've already 'saved' some dummy portfolio's out of SPAN to check the format and it all looks very logical. Thanks to @Dudetooth for this.

If anybody is searching/reading and interested in position/portfolio, @Dudetooth in message #12 and @ron99 in message #14 give examples of using the SPAN Position Converter Utility to convert excel/CSV files to SPAN xml files.

Reply With Quote
  #150 (permalink)
Mo111
Detroit MI/USA
 
Posts: 21 since Jan 2014
Thanks Given: 12
Thanks Received: 10


Great excel sheet @Dudetooth!!! Its already saved me hours!

What do the SOM and Risk columns mean?

Also, is the Price in the sheet the ask price or the bid price for the contract?

Reply With Quote




Last Updated on September 23, 2021


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts