Part 2: Exploratory Data Analysis (EDA) & Preprocessing

Overview

Before diving into hypothesis testing, we need to clean, preprocess, and analyze our dataset. This post walks through the process of merging options and underlying asset data, labeling moneyness, and adding technical indicators.

Key Steps

  • Merging Underlying and Options Data: We align timestamps of underlying stock prices with options prices.
  • Calculating Moneyness: We categorize options as ITM (in-the-money), ATM (at-the-money), or OTM (out-of-the-money).
  • Adding Technical Indicators (illustrative purposes only, not used in final analysis):
    • Relative Strength Index (RSI)
    • Moving Averages (SMA, EMA)
    • Bollinger Bands (BB)
    • MACD (Moving Average Convergence Divergence)

Key Functions & Outputs

  • add_underlying_price_and_moneyness(): Ensures options prices are aligned with their corresponding underlying prices.
  • add_technical_indicators(): Computes popular technical indicators used in trading strategies.
  • Data is saved and prepared for hypothesis testing.

This stage provides an intuitive understanding of how options behave relative to the underlying asset, setting the stage for deeper analysis.

Sharing

Related Articles

  • All Post
  • Articles
  • Blog Post
  • General Business Automation
  • Portfolio
  • Stock Market & Finance