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.
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.
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.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
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 CME 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.
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.