Skip to content

clement-cvll/SPY-implied-vol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPY Implied Volatility Analysis

This project fetches and analyzes options data for the SPDR S&P 500 ETF (SPY) to visualize implied volatility surfaces and option prices.

Description

The goal of this project is to provide a visual representation of the implied volatility "smile" or "skew" for SPY options. It generates interactive 3D surface plots for implied volatility across different strike prices and expirations, as well as scatter plots showing the relationship between option prices, strikes, and time to maturity.

The analysis is done separately for call and put options. The resulting interactive plots are saved as HTML files in the src/ directory.

Visualizations

This project generates the following interactive plots:

  • Implied Volatility Surface (3D): A 3D surface plot showing implied volatility as a function of strike price and days to expiration. This helps in visualizing the volatility smile and term structure.
  • Option Price Scatter (3D): A 3D scatter plot showing the last price of options as a function of strike price and days to expiration.

How to Use

  1. Clone the repository:

    git clone https://github.com/your-username/SPY-implied-vol.git
    cd SPY-implied-vol
  2. Install dependencies: You will need to have R installed. Run the following command in the R console to install the necessary packages.

    # Likely packages used, please verify from your R script
    install.packages(c("plotly", "quantmod", "tidyverse", "janitor", "akima"))
  3. Run the analysis: Run the R markdown notebook implied_volatility.R to create the 4 visualizations.

  4. View the output: The generated interactive HTML plots can be found in the src/ directory. Open them in any web browser.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

About

Implied volatility surface visualization for SPY options

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages