|
This script below will download the latest and complete list of options data from The Options Clearing Corporation (TheOCC) website, it will also convert the downloaded file from plain text into excel format.
You can download and modify this script to suit to your own needs.
some of you might want to get the most latest and complete list of Options data, you can actually got it from TheOCC (The Options Clearing Corporation) website, it is a clearing organization of financial derivatives instruments and it will publish the latest options data on their website everyday.
The download the Options data manually from TheOCC website, open your browser and go to www.theocc.com, click on “Market Data” and then select “Position Limit Data”, the latest option data is published under “Daily Position Limit Reports” link.
Let’s take a look of the script:
To initiate Internet Explorer from Excel
Set oCCIE = New SHDocVw.InternetExplorer c = "http://www.theocc.com/market/poslimit/position_limit_reports.jsp" sPage = oCCIE.Document.body.InnerHTML
Search for string that is closer to the Option data
OCCString_1 = InStr(1, sPage, "Position Limit Change Report") OCCString_2 = InStr(OCCString_1, sPage, "CURRENT_POSITION_LIMIT_") OCCstart = InStrRev(sPage, "/", OCCString_2) + 1 OCCend = InStr(OCCString_2, sPage, "<")
Look for the latest Options Data date available
dOCC = Mid$(sPage, OCCstart, OCCend - OCCstart) OCCDate = Right(dOCC, 10)
Download it into a text file in to the C:\Temp folder
occXLS = "c:\Temp\OCC.TXT" occUrl = "http://www.theocc.com/poslimit/data/" & Left(dOCC, 35) occLocalFile = "c:\Temp\OCC.TXT" occLocalFileName = "OCC.TXT"
Login or Register to download this Excel Spreadsheet

Unfortunately the report published in the website is in the plain text format hence making difficult to perform any analysis, but the script will help you to convert the text delimited file into excel format. You can download the script to learn more about the method used to convert the file.
|