Skip to main content

VIX Utils

Fork of https://github.com/dougransom/vix_utils with equity data fetching support and modern pandas syntaxes to silence warnings.

Overview

vix_utils provides some tools for preparing data for analysing the VIX Futures and Cash Term structures.

The futures can also contain a 30 day continuous maturity weighting of front two months of vix futures.

VIX Futures Data downloaded from CBOE Futures Historical Data.

Vix Cash Data are downloaded from CBOE Historical Volatility Indexes.

There is an API for Python to load the data into Pandas DataFrames. If you do your analysis in Python, use the API.

Since there is no documentation yet, look at the examples in the src/vix_utils/examples folder. There is a Jupyter Notebook vix_utils.ipynb in that folder.

Important note for Juypter notebooks.
You must use async_get_vix_index_histories and async_load_vix_term_structure rather than get_vix_index_histories and load_vix_term_structure. There is an example Jupyter notebook "vix_utils use in Jupyter.ipynb" in the src/vix_utils/examples folder.

If you do your analysis in other tools such as R or excel, you can use the command line tool vixutil.

vixutil -h will give the help. The data are availble in record and wide formats. Just run it and look at the excel or csv output to see what they look like.

Installation

You will need a Python 3.11 or later instalation.

Install from the Python Packaging Index

Install using pip from The Python Package Index :

pip install vix_utils

If you want to run the samples, install like this: pip install vix_utils[examples]

The sample to load all the various data frames can be run as: 'vix_sample_load_data'

The sample to plot the history of futures and cash term structures: vix_sample_plots

To load the sample Jupyter notebook, run vix_sample_load_data to figure out where the examples folder is. Browse there with Jupyter and open a notebook.

Development

Clone from github repository.

pip install -e .[test,examples] will:

  • install vix_utils into your python environment, including any command line scripts.
  • install the necessary prequisites for running any tests in the test folder, and for running the programs in the src/vixutils/examples folder.

Testing

The tests directory contains a few tests. This project wasn't developed with Test Driven Development, unit tests have been added to isolate and fix defects.

However, new features and bug fixes should be developed with Test Driven Development practices when practical.

Examples

Source is in src/vix_utils/examples

## Data Notes
These dates appear to be missing from the CBOE Data.
At some point they need to be patched in if they exist.
```
[Timestamp('2006-11-10 00:00:00'), Timestamp('2007-01-03 00:00:00'), Timestamp('2021-04-02 00:00:00'), Timestamp('2021-12-24 00:00:00')]
```
There seem to be  a few dates where spot indexes are missing, you will have to workaround by using fill feature of Pandas datafame, or skip those days, in any analysis.

Metadata

Release files for vix_utils_tddschn 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vix_utils_tddschn 0.2.1
File Size Uploaded
vix_utils_tddschn-0.2.1.tar.gz 1.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for vix_utils_tddschn 0.2.1
File Interpreter ABI Platform
vix_utils_tddschn-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.5 MB

Release files / vix_utils_tddschn-0.2.1.tar.gz

Download URL vix_utils_tddschn-0.2.1.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
134e3f399bf386b6c6bc830227a4cf63b7ee6c7aaf7b5b64492464f74c98b7ee
BLAKE2b-256 checksum
How to use checksums
2c081d5ade810047ce59a2cb86350a8c8ed2bb2bc3c2f1bd04eee3e3bc990b71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / vix_utils_tddschn-0.2.1-py3-none-any.whl

Download URL vix_utils_tddschn-0.2.1-py3-none-any.whl
Size 1.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c203eeacdce2d4b5a4d05a6fb7dadb51f08bafbf601fbeeb6a26211e503b3110
BLAKE2b-256 checksum
How to use checksums
74fe61a5af615b71e1f71c6c7535a9233ca08f3dcb17c6bee436553e43234152
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page