Implied Volatility with C++ and Python Pt. 1

Let's take a well deserved break from thinking about data and get to some code.

Implied Volatility in Words

Volatility is a critical component to pricing options. Unfortunately it is a latent (or unobserved) quantity. Options traders therefore need a way to understand what the market says about volatility. Traders will look at the market price of an option and use a pricing model to figure out what volatility must be input into the model to match the price observed in the market. Whatever that volatility ends up being is called the implied volatility. In other words, the volatility implied by market prices.

Continue reading

Options Data Sources Available

I'll be using end of day options data for the backtesting system. I will keep it general enough to use intraday options data in the future, which should be fairly easy using pandas, but it will not be the initial focus. Here I present a summary of some of the options data sources I've researched and used in the past. This is not an exhaustive list but covers the sources I've used in the past.
Continue reading

Backtesting Data Considerations

Now that we have a high level overview of backtesting, I'll discuss backtesting data considerations. We'll likely encounter data quality issues along the way and will need to identify and clean the data before use in the system. Below I discuss some of the issues and how I will solve them. In later posts I'll discuss data sources and data storage technologies. Finally, a potential data pipeline that automates the acquisition, cleaning and storing will be explored.
Continue reading

Backtesting Introduction

There are entire books and excellent blog posts dedicated to backtesting. I won't regurgitate the content from these resources, however I would like to add some context to this project. I will review some of the basics of backtesting touch on points that will become important as I build the options backtesting system.
Continue reading

Backtesting Options Trading Strategies

Backtesting a trading strategy is critical in trading. Countless blogs, books, and papers discuss the art of backtesting. Most of these focus on equity and futures markets using off-the-shelf software like Trade Station. There are an equal number of discussions on the trade-off between buying off-the-shelf software and writing your own. What seems to be less discussed is backtesting options trading strategies. There are of course notable exceptions but in large, there's not much.
Continue reading