avatarLuke Hardy

Summary

The website content presents an analysis of Bitcoin options data, focusing on the 30-day constant maturity implied volatility to predict future price movements and develop trading strategies.

Abstract

The article delves into the significance of options market activity, particularly implied volatility, as an indicator of future asset price movements, with a specific focus on Bitcoin options data. It outlines a project that includes loading Bitcoin implied volatility datasets, visualizing the 30-day constant maturity implied volatility, and exploring the correlation between implied volatility and future Bitcoin prices. The author provides Python code snippets to facilitate data analysis and visualization, emphasizing the potential of implied volatility as a tool for professional traders to make informed trading decisions. The article also discusses the construction of a trading strategy based on sharp moves in implied volatility and evaluates its performance using metrics such as the Sharpe ratio. Additionally, the author suggests further research into implied volatility premiums as potential trading signals and concludes by encouraging readers to engage with the Quant Factory community for more insights into algorithmic trading.

Opinions

  • The author believes that options data, especially implied volatility, is a crucial component for predicting asset price movements.
  • Professional traders can use low implied volatility as a signal to buy options and high implied volatility to sell options.
  • The article posits that sharp increases in implied volatility may precede significant price movements in Bitcoin, offering an opportunity to develop trading strategies.
  • The author suggests that the options market can provide valuable insights for traders and investors, beyond just the price of the underlying asset.
  • By analyzing the relationship between implied volatility and future returns, the author implies that traders can potentially enhance their trading performance.
  • The article encourages readers to explore and play with the provided data and code to refine trading strategies and signals.
  • The author provides a disclaimer that the information presented is for educational or entertainment purposes and not personal investment advice.

Options Data For Price Prediction with Python

Analysing options data, more specifically 30-day constant maturity implied volatility to predict future price movements.

Options market activity and sentiment can provide insights into investors’ and traders’ expectation regarding a particular financial asset (stock, ETF, crypto). Generally, higher volumes and increased open interest in options contracts can indicate elevated interest or speculation about the asset’s future price movements.

However, option Greek’s and Implied Volatility may be even more informative. In this article I am going to analyse specifically options’ implied volatility. It is a crucial component in options pricing, it represents the market’s expectations of an asset’s future price volatility. When the implied volatility increases, options prices tend to rise as well, reflecting the potential for larger price swings. 🤠 Thus, changes in implied volatility can directly affect future returns in the underlying asset!

While options data can have an impact on asset prices, it is just one factor among many that can influence the market. Therefore, it’s crucial to consider options data in conjunction with other relevant information to gain a comprehensive understanding.

In this article I am focusing on analysing Bitcoin Options Data from BTC Options Exchange and more specifically I would be looking at 30-day constant maturity options implied volatility. 🛫Let’s get into it!

“Options trading is like playing chess with money. You need strategy, foresight, and the ability to adapt to changing circumstances.”

Project Key Features

  • Load Bitcoin Implied Volatility Dataset.
  • Explore & Plot 30-Day Constant Maturity Implied Volatility.
  • Calculate Correlation Between Implied Volatility and Future Prices.
  • Create A Signal And Measure Future Returns.

Let’s get into it!

1. Load packages, load data.

I am providing a link to the data on the bottom of the article. We have here Constant Maturity 30-days and 60-days Implied Volatility as well the 30-days and 60-days Realised Volatility calculated from Bitcoin Price series.

import matplotlib.pyplot as plt
import datetime as dt
import yfinance as yf
import pandas as pd
import numpy as np
import os

data_folder = 'your-folder-path'

iv_rv_df = pd.read_csv(os.path.join(data_folder, 'btc_iv.csv'))

iv_rv_df
Image by Author
  • Download Bitcoin Daily Prices Data As well.
btc_price = yf.download(tickers='BTC-USD',
                        start=dt.date.today()-pd.DateOffset(180),
                        end=dt.date.today())

btc_price
Image by Author

2. Visualize The Bitcoin 30-Days Constant Maturity Implied Volatility.

fig, (ax1, ax2) = plt.subplots(2, figsize=(16,8), sharex=True)

fig.suptitle('BTC 30-day Constant Maturity Implied Volatility', fontsize=20)

ax1.plot(iv_rv_df['iv_30'][dt.date.today()-pd.DateOffset(180):])

ax2.plot(btc_price['Adj Close'], color='k')

plt.show()
Image By Author

So, let’s talk a little bit more about Implied Volatility and what it actually means as well, how we can potentially use it to make better trades and make more money!

Implied volatility refers to the estimated level of volatility or uncertainty of a financial instrument’s price in the future, as implied by the market’s option prices.

It is a measure used in options pricing models, such as the Black-Scholes model, to determine the value of an option contract.

Generally Pro Traders Would Do The Following:

  • When Implied Volatility is low, you always want to buy options, instead of selling. When option buyers get in control, option prices start to rise and then implied volatility start to rise and then Gama may start to rise, and then the underwriters/sellers (market-makers) would have to hedge their positions, so buy the underlying, so buying pressure.
  • When Implied Volatility is high, then you generally want to sell/underwrite options. An implied volatility spike, so option prices spike in both directions, can happen from both excessive fear or excessive optimism.
  • However, we can actually try to figure out if a sharp move in implied volatility of Bitcoin precedes some positive or negative momentum right? — That’s exactly what I am going to do now.

3. Measure The Effect Of A Sharp Move Upwards in Implied Volatility.

  • Here first I merge together the Bitcoin Prices dataframe and Implied Vol dataframe. Next I’ve calculated the forward 1-day return and then I’ve created a “buy” signal based on the idea of Implied Volatility day-over-day change/diff to be above a certain threshold (which for homework you can play around guys😉). Furthermore, I’ve extented the holding period to be 2-days after we receive a “buy” signal.
y = 'some_number_from_your_research'

final_df = iv_rv_df[['iv_30']].merge(btc_price,
                                     left_index=True,
                                     right_index=True)

final_df['forward_return'] = final_df['Adj Close'].pct_change().shift(-1)

final_df['signal'] = final_df['iv_chg'].apply(lambda x: 1 if x>y else np.nan)

final_df['signal'] = final_df['signal'].ffill(limit=1)
Image by Author

Sharpe Ratio of Strategy: 5.04

However, here we can even consider more ideas of how to extract potential signals:

One Idea Is To Calculate Implied Volatility Premium:

Conclusion

In this article, we explored how options market for bitcoin and other financial instruments can provide useful information about potential future movements. As well I’ve constructed a strategy using Bitcoin’s Implied Volatility data. Furthermore, we visualized the results and suggested even more potential indicators.

I hope this article is helpful! Let me know if you have any questions or if you would like further information on any of the topics covered.

A Message from QuantFactory:

Thank you for being part of our community! Before you go:

  • Master Algorithmic Trading with Python👉 here.
  • Join our Premium Discord Server👉 here.
  • Subscribe to our Exclusive Stocks Newsletter 👉 here.
  • If you liked the story feel free to clap 👏 and follow the author
  • For more stories from the Algorithmic Trading and Quantitative Analysis world you should follow the Quant Factory Publication

*Note that this article does not provide personal investment advice and I am not a qualified licensed investment advisor. All information found here is for entertainment or educational purposes only and should not be construed as personal investment advice.

Data Science
Options
Machine Learning
Python
Algorithmic Trading
Recommended from ReadMedium