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 190,372 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

  #61 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,663 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,356


Dudetooth View Post
This one is 97/2003 compatible.

Thanks. I'm guessing there is no easy way with an old version of Excel to automatically go get and unzip the required SPAN files?

Follow me on Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
19 thanks
GFIs1 1 DAX trade per day journal
16 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
  #62 (permalink)
 spj77 
Qld, Australia
 
Experience: Beginner
Platform: Excel/Hoadley/PC-SPAN
Broker: OX
Trading: Options
Posts: 28 since Mar 2012
Thanks Given: 6
Thanks Received: 44

This works fine for me in XL 2003:


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"

SaveWebFile "ftp://ftp.cmegroup.com/pub/span/data/cme/" & namecme, path & "\" & namecme
SaveWebFile "ftp://ftp.cmegroup.com/pub/span/data/nyb/" & namenyb, path & "\" & namenyb

Call UnZip(path & "\", path & "\" & namecme)
Call UnZip(path & "\", path & "\" & namenyb)

Kill path & "\" & namecme
Kill path & "\" & namenyb

Kill path & "\cme.s.pa2"
Kill path & "\nyb.s.pa2"
Name path & "\" & "cme." & dateit & ".s.pa2" As path & "\cme.s.pa2"
Name path & "\" & "nyb." & dateit & ".s.pa2" As path & "\nyb.s.pa2"

GetOut:
End Sub

Reply With Quote
  #63 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,663 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,356



spj77 View Post
This works fine for me in XL 2003:


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"

SaveWebFile "ftp://ftp.cmegroup.com/pub/span/data/cme/" & namecme, path & "\" & namecme
SaveWebFile "ftp://ftp.cmegroup.com/pub/span/data/nyb/" & namenyb, path & "\" & namenyb

Call UnZip(path & "\", path & "\" & namecme)
Call UnZip(path & "\", path & "\" & namenyb)

Kill path & "\" & namecme
Kill path & "\" & namenyb

Kill path & "\cme.s.pa2"
Kill path & "\nyb.s.pa2"
Name path & "\" & "cme." & dateit & ".s.pa2" As path & "\cme.s.pa2"
Name path & "\" & "nyb." & dateit & ".s.pa2" As path & "\nyb.s.pa2"

GetOut:
End Sub

Thanks
I will give this a try.

Follow me on Twitter Reply With Quote
  #64 (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

For new traders in this thread, when I get a chance I will make a post and put in the Quick Summary a step by step list of what you have to do to get Dudetooth's system running. It will give you a fast, free! calculator of SPAN margins.

You will need some batch files and the spreadsheet.

Started this thread Reply With Quote
  #65 (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
For NG you have this line
stk1 = stk1 * 1000

Other ones have 10 or 100 instead of 1000. Or some don't have that line at all. What determines which multiplier you use?

I glean option and futures quotes from Barchart's website, so all of those calculations are made to convert an option strike as it appears on Barchart's site to be compatible with what is seen in the risk arrays.

Reply With Quote
  #66 (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
Here's the code for silver to add to the macro for the spreadsheet in post #45.

Thanks for the code. I will get this into the next build for sure. I will also look to have DTE calculated and the download ability. I am also thinking I may have the simple spread calculation in it as well (and a 97 version for kevinkdog).

Is there anything else worth looking to add?

Reply With Quote
  #67 (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 the code. I will get this into the next build for sure. I will also look to have DTE calculated and the download ability. I am also thinking I may have the simple spread calculation in it as well (and a 97 version for kevinkdog).

Is there anything else worth looking to add?

Nothing I can think of right now.

You have been a HUGE help to many of us. Thank you.

Here is how I added my macro buttons. I was going to add them above your stuff but I didn't want to have to redo all the cell references in the macros. This is OK. But if you have a better idea that would be good.

If you don't want all of them on there that is OK. The Download Risk Arrays is the one that is needed with the date cell. I can add mine where needed later.



I left a row below them for titles of columns when I do ROI calculations and other things.

Started this thread Reply With Quote
Thanked by:
  #68 (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

Here's an update with some recommendations / upgrades built in.

1) Download file (there is an Excel 97/2003 version available) and unzip.

2) Open spreadsheet and follow the instructions on the Setup tab.

New features:
-Setup tab with instructions and ability to change default path
-Ability to download CME and NYB risk arrays (download, unzip, rename)
-DTE based on the date of the downloaded risk arrays
-7 new commodities programmed
-Spreads: simple 2-legged intra-commodity spreads can be calculated

I did some quick tests and everything seems to be working ... please let me know if you find any bugs.

Thanks to ron99 for helping with the new commodity programming.

****Updated: Minor fixes ... already.
I've got the SaveWebFile and Unzip macros in there (missed them first time around) and 97 version has TrailingMinusNumbers issue taken care of. Thanks ron99 and kevinkdog for the troubleshooting I missed.

Attached Files
Elite Membership required to download: Margin Without PC-SPANv2.zip
Elite Membership required to download: Margin Without PC-SPAN-97v2.zip
Reply With Quote
  #69 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,663 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,356

I tried the 97 version, and it seems to work well!

Thanks Dudetooth!


I have a handful of other instruments I want to add, and if/when I am successful I will post the code here (probably by Saturday)...

Follow me on Twitter Reply With Quote
  #70 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,663 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,356


This is a great tool, @Dudetooth ! Thanks for putting it together.


I was running some Lean Hog calcs, and the price seems to be wrong for some of them. Everything else looks OK. Can you check this? I don;t know if it is an error in the SPAN file, but the OEX margin calculator seems to give the right price.

Thanks



Follow me on Twitter 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