Show HN: A simple way to get options prices for free
strategic-options.com
strategic-options.com
Also note that Yahoo's data is somewhat unreliable [0, 2].
Unfortunately options data is just hard to get access to due to the agreements forced on providers by the exchanges. If you want to build a trading system on it without an institutional budget, the best options I've found so far are QuantConnect [3], which has paid for it and lets you build your system on their platform and OptionWorks [4], which you can pay $150 for and download all the data. You should be able to get a live feed from your broker after that. If you want it for academic research, many universities and colleges have access to much higher quality data.
This should be fine for personal use though.
[0]: https://meumobi.github.io/stocks%20apis/2016/03/13/get-realt...
[1]: https://policies.yahoo.com/us/en/yahoo/terms/product-atos/ap...
[2]: https://seekingalpha.com/instablog/6052771-kevin-wrotenbery/...
I would not recommend to use the Yahoo or Google apis to get option prices. Some of the bid/ask prices are completly wrong and some expiration dates are missing. I created an option scanner as a side project and found about this bad data quality the hard way.
iVolatility told me it would be ~$1000 for EOD chains + IV & Greeks since 1990 - just for SPX. CBOE is partners with iVolatility so I imagine their data is decent, but I can't bring myself to drop that much on it for a simple personal project.
Since CBOE is the exchange itself, I'd assume the quality of the data is at least the same as iVolatility, if not better.
Ditto for TDAmeritrade but their forums are not very active. http://apiforums.tdameritrade.com/
For stocks (not options), they took it to the next level, and you can stream price/volume data in psuedo realtime. I think you can also pull EOD data on stocks (not options) going back pretty far.
https://developers.tradeking.com/documentation/market-option...
You may be thinking of simply stock prices or stock fundamentals (income, expenditures, that kind of stuff) but you may also be thinking of other things like sentiment or analyst opinions. There's a huge range of things you can look at. Options prices are certainly one kind of stock data though, they give valuable information like implied volatility (how much the market at a particular time expects the stock to move in a particular period in the then future).
If you're interested in stock data, Quandl (http://quandl.com) has a broad selection of the different kinds available (though you don't have to purchase there) and Quantopian (https://quantopian.com/) has some examples of how to use it.
To be clear though, options are not stocks.
A stock is a share of ownership of a company. You buy it, you sell it, that's it.
An option is a contract between you and another party that gives you the right but not the obligation to buy or sell a stock at a particular price for a certain amount of time.
Practical examples:
- I buy 10 AAPL stock at $100. I now own $1000 worth of Apple. AAPL's stock price rises to $110. I now own $1100 of AAPL stock, which I can sell and make $100.
- I buy a contract that gives me the right to purchase AAPL (an AAPL call option) for $100 (the "strike price" is $100) which expires in 30 days. This right is limited to 100 AAPL shares and I pay $500 for it. For the next 30 days, regardless the price of AAPL stock, I can buy 100 AAPL for $100 each. If the price of AAPL drops, I lose the $500 I paid for the rights. If the price of AAPL rises to the $110 from earlier, I can either buy 100 shares of AAPL for $100 and sell them immediately for $110, making $1000 - $500 (for the contract) = $500, or I can simply sell the rights to someone else and make the profit more cleanly.
This isn't meant to be an exhaustive course on how each security works, just an illustration of exactly how different they are, yet affect each other.
https://github.com/eliangcs/pystock-data
Edit: I just noticed the owner has decided to stop maintaining the repo just a few days ago. But you can reproduce it using the tools they used.
They have a certain value, and therefore prices, but are different from actually owning the underlying stock.
RStudio + quantmod is a good playground
[1]: http://www.financial-hacker.com/algorithmic-options-trading/
A better approach might be to use some kind of avg volatility surface with VIX as a baseline, but even that leaves you with no sentiment.
For some strategies this might work well enough (e.g. a flat volatility surface implies a lot of 50/50 probabilities), but for any advanced historical analysis (which seems to be the scope of this post), you really need to have the price/IV of evry individual option.
```r
require(quantmod)
OPTS <- getOptionChain("AAPL", NULL)
OPTS
```
Python, Julia, etc have likely similar functions and other packages for Option and Trading analyses