2

Can you recommend a brokerage or stand-alone (paid or free) options back testing tool. I want to be able to easily test a strategy against historical option prices. Probably for most strategies I wouldn't need anything more than day's option open, high, low and close (of the bid/ask prices, not of actual trades, as these don't happen every day of course for various strike prices). However for one or two strategies, it would also be nice to get intra-day prices.

If you have any thoughts/comments on what to look for in a tool -- what makes something good for back testing a strategy (i.e. how do you "input" the strategy), I'd be grateful. Please note I'm a software engineer and so not adverse to writing "scripts", etc., if that's an advantageous way to do it over other mechanisms. This question is really a "I don't know what I don't know question", so please feel free to give advice and insights into what to look for, what you've found to be good, and why.

3

Power Options is one such example of what you seek, not cheap, but one good trade will recover a year's fee.

There's a lot you can do with the stock price alone as most options pricing will follow Black Scholes.

Keep in mind, this is a niche, these questions, while interesting to me, generate little response here.

  • Thanks for the tool ref Joe. Where else might I post this question? – Ray K Jan 16 '12 at 4:39
1

As JoeTaxpayer says, there's a lot you can do with just the stock price.

Exploring that a bit:

Stock prices are a combination of market sentiment and company fundamentals. Options are just a layer on top of that. As such, options are mostly formulaic, which is why you have a hard time finding historical option data -- it's just not that "interesting", technically. "Mostly" because there are known issues with the assumptions the Black-Scholes formula makes. It's pretty good, and importantly, the market relies on it to determine fair option pricing.

Option prices are determined by:

  1. Relationship of stock price to strike. Both distance and "moneyness".

  2. Time to expiration.

  3. Dividends. Since dividend payments reduce the intrinsic value of a company, the prospect of dividend payments during the life of a call option depresses the price of the option, as all else equal, without the payments, the stock would be more likely to end up in the money. Reverse the logic for puts.

  4. Volatility.

  5. Interest rates. But this effect is so tiny, it's safe to ignore.

#4, Volatility, is the biggie. Everything else is known. That's why option trading is often considered "volatility trading". There are many ways to skin this cat, but the result is that by using quoted historical values for the stock price, and the dividend payments, and if you like, interest rates, you can very closely determine what the price of the option would have been. "Very closely" depending on your volatility assumption.

You could calculate then-historical volatility for each time period, by figuring the average price swing (in either direction) for say the past year (year before the date in question, so you'd do this each day, walking forward).

Read up on it, and try various volatility approaches, and see if your results are within a reasonable range.

Re the Black-Scholes formula, There's a free spreadsheet downloadable from http://optiontradingtips.com. You might find it useful to grab the concept for coding it up yourself. It's VBA, but you can certainly use that info to translate in your language of choice. Or, if you prefer to read Perl, CPAN has a good module, with full source, of course. I find this approach easier than reading a calculus formula, but I'm a better developer than math-geek :)

  • Thanks a lot for your answer Joe. Interesting. This will probably work for an application I need, and it's much easier than getting option pricing history (daily stock history is free thanks to Yahoo and others). I write software primarily in Java or a newer language called Groovy (with its neighbor/associate Grails for web development). Any specific thoughts or advice here? – Ray K Jan 20 '12 at 17:54
  • Sorry, I've no experience with those languages. Perl for me (and C++, but not recently). If your language communities have a repository like perl's CPAN, you want to look for "Black-Scholes". Or, code up this formula directly: en.wikipedia.org/wiki/Black%E2%80%93Scholes . – joe Jan 26 '12 at 10:07
  • Seems to me like calculating historical volatility would be useless for some strategies, because often times a single options chain will have wildly varying implied volatilities at a given point in time. Additionally, an options chart would ideally convey more information than a normal stock chart, namely, the spread, as this can play a much bigger part in the options market on whether a strategy is above break-even or not. – Michael Jul 23 '15 at 21:13
1

Based on my experience with OpenQuant, which is a development platform for automated trading strategies (and therefore can be easily be used for backtesting your personal strategy), I can give a little insight into what you might look for in such a platform.

  1. OpenQuant is a coding environment, which reads data feeds from a variety of sources (more on that in the second point), and runs the code for your strategy on that data and gives you the results. The data could be imported from a live data feed or from historical data, either through numerous API's, CSV/Excel, etc. You can write your own strategies using the custom C# libraries included with the software, which spares you from implementing your own code for technical indicators, basic statistical functions, etc.

  2. Getting the data is another issue. You could use joe's strategy and calculate option prices yourself, although you need to exercise caution when doing this to test a strategy. However, there is no substitute for backtesting a strategy on real data. Markets change over time, and depending on how far back you're interested in testing your strategy, you may run into problems. The reason there is no substitute for using real data is that attempting to replicate the data may fail in some circumstances, and you need a method of verifying that the data you're generating is correct and realistic. Calculating a few values, comparing them to the real values, and calibrating accordingly is a good idea, but you have to decide for yourself how many checks you want to do. More is better, but it may not be enough to realistically test your strategy.

Disclaimer: Lest you interpret my post as a shameless plug for the OpenQuant platform, I'll state that I found the interface awful (it looked vaguely like Office 2000 but ten years too late) and the documentation woefully incomplete. I last used the software in 2010, so it may have improved in the intervening years, but your mileage may vary. I only use it as an example to give some insight into what you might look for in a backtesting platform. When you actually begin trading, a different platform is likely in order.

That being said, it responded fairly quickly and the learning curve wasn't too steep. The platform wasn't too expensive at the time (about $700 for a license with no data feeds, I think) but I was happy that the cost wasn't coming out of my pocket. It's only gotten more expensive and I'm not sure it's worth it.

  • Alas, when I saw the word "Open" I was expecting something like Open Street Maps, which is both free (libre) and non-proprietary... – Michael Jul 23 '15 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.