How can I load the options data given the new format introduced today. 10/23/14?

Yahoo just broke all of my option programs, dozens of them!

I used to load raw options pages into perl and parsed them.

Today, 10/23/14, Yahoo introduced a new format for its option pages. There is no data on the loaded page right now, just javascript that loads things on the fly.

Browser (Firefox) processes that and the source viewed in the browser render all the data, but I have no way to get this in perl.

Is there some perl module that will simulate everything a browser does and pass the rendered page for analysis?

I could get data from CBOE, but it requires manual data entry into their website and I want to do it from perl.

One good thing about Yahoo is that I can address individual expiration date pages via a URL, but CBOE and others just return .aspx pages based on manual interaction. All URLs look the same.

Other Yahoo pages, such as inventory history, provide downloadable CSV files with URLs. Is there a way to get data about such parameters?

Or is there any other site I could use?

0


source to share


2 answers


I was able to successfully execute the spreadsheet formula below from google spreadsheet to output the parameter data to my spreadsheet (in the formula below "Naked Put! A2" = TUP and "Naked Put! C2 = 1/17/2015 that corresponds to the option chain for Tupperware for January 2015):

=importXML("http://finance.yahoo.com/q/op?s="&UPPER('Naked Put'!A2)&"&date="&datevalue('Naked Put'!C2)*86400-date(1970,1,1)*86400,"//tr")

      



The result is a table with rows for each strike price and columns filled in: Jam price, contract name, last price, rate, request, volume, etc.

The problem you are seeing may be because the new settings page is different from the old settings page. For example, options data is now stored in the html table construct.

0


source


The new format is a table-based integer representation of a date. An integer number is the number of seconds since January 3, 1970. To convert the option date (e.g. November 22, 2014) to the new integer format, use the following formula (excel based): =date(2014,11,22)*86400 - date(1970,1,3)*86400



-1


source







All Articles