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)
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.
Can you help answer these questions from other members on NexusFi?
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.
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.
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.
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.
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals, U308 and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,059 since Dec 2013
Thanks Given: 4,410
Thanks Received: 10,226
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.
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.
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals, U308 and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,059 since Dec 2013
Thanks Given: 4,410
Thanks Received: 10,226
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.