task_categories:tabular-classification task_categories:tabular-regression size_categories:1M<n<10M license:apache-2.0 NYSE options calls puts sp500 volatility implied volatility vix IV region:us
---
license: apache-2.0
task_categories:
- tabular-classification
- tabular-regression
tags:
- NYSE
- options
- calls
- puts
- sp500
- volatility
- implied volatility
- vix
- IV
pretty_name: USA options implied volatility features for machine learning
size_categories:
- 1M<n<10M
---

# Downloading the Options IV SP500 Dataset

This document will guide you through the steps to download the Options IV SP500 dataset from Hugging Face Datasets. This dataset includes data on the options of the S&P 500, including implied volatility.

To start, you'll need to install Hugging Face's `datasets` library if you haven't done so already. You can do this using the following pip command:

```python
!pip install datasets
```

Here's the Python code to load the Options IV SP500 dataset from Hugging Face Datasets and convert it into a pandas DataFrame:

```python
from datasets import load_dataset
import pandas as pd

id = "gauss314/options-IV-SP500"
data_iv = load_dataset(id)
df_iv = pd.DataFrame(data_iv['train'][:])
```



The dataset provided includes a variety of features and targets. In machine learning and predictive modeling, features are the input variables used to predict target variables, or the outcomes we're interested in predicting.

The features in this dataset encompass all of the data columns except for DITM_IV, ITM_IV, sITM_IV, ATM_IV, sOTM_IV, OTM_IV, and DOTM_IV. These features include data on traded contracts, open interest, the spread of strike prices, and the number of different expiration dates, among others. These features can be used to understand the characteristics of the security's options and their trading activity.

The target variables in this dataset are DITM_IV, ITM_IV, sITM_IV, ATM_IV, sOTM_IV, OTM_IV, and DOTM_IV. These represent implied volatilities for different categories of options, which are what we would be interested in predicting in a regression or classification model. Implied volatility is a key concept in options trading as it reflects the market's expectation of future volatility of the underlying security's price.

This dataset can also be used in dimensionality reduction machine learning models. These models aim to reduce the number of input variables in a dataset, while preserving as much of the relevant information as possible. 

This dataset has been shared specifically for the course "Applied Artificial Intelligence" at UCEMA. Students in this course can use this dataset to practice building and evaluating different types of predictive models, as well as working with real-world financial data. 






Features

- `symbol`: This represents the ticker symbol of the security, it is an unique series of letters representing a particular security listed on an exchange.

- `date`: The date of the recorded data.

- `strikes_spread`: The difference in strike prices for call and put options. Strike price is the set price at which an option contract can be bought or sold when it is exercised.

- `calls_contracts_traded`: The total number of call option contracts that have been traded.

- `puts_contracts_traded`: The total number of put option contracts that have been traded.

- `calls_open_interest`: The number of outstanding call contracts that haven't been exercised or allowed to expire.

- `puts_open_interest`: The number of outstanding put contracts that haven't been exercised or allowed to expire.

- `expirations_number`: The number of different expiration dates for the options.

- `contracts_number`: The total number of options contracts.

- `hv_20`, `hv_40`, `hv_60`, `hv_75`, `hv_90`, `hv_120`, `hv_180`, `hv_200`: These represent historical volatility values over different periods of trading days (20, 40, 60, 75, 90, 120, 180, 200). Historical volatility measures the price changes of a security and is used to predict future price volatility.

- VIX: The value of the VIX index for that day.

The VIX, also known as the Chicago Board Options Exchange's (CBOE) Volatility Index, is a real-time market index that represents the market's expectations for volatility over the coming 30 days. It is calculated from both calls and puts options prices and is commonly referred to as the "fear gauge" or "fear index" in the market, as it is used to gauge the market's anxiety or risk tolerance level.





Possible targets:

- `DITM_IV`, `ITM_IV`, `sITM_IV`, `ATM_IV`, `sOTM_IV`, `OTM_IV`, `DOTM_IV`: These are implied volatilities (IV) for different categories of options: Deep-In-The-Money (DITM), In-The-Money (ITM), Slightly-In-The-Money (sITM), At-The-Money (ATM), Slightly-Out-Of-The-Money (sOTM), Out-Of-The-Money (OTM), Deep-Out-Of-The-Money (DOTM). Implied volatility is a metric that captures the market's view of the likelihood of changes in a given security's price.