Provide VIX Cash and Futures Term Structure as Pandas dataframes
Project description
VIX Utils
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 thesrc/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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vix_utils-0.1.7.tar.gz
.
File metadata
- Download URL: vix_utils-0.1.7.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdc1274ffa164ad026427830bdf2f27afad5e7a8cea9d50f420373dcededc41b |
|
MD5 | 7800f43d71d35253a8c46a6982befe57 |
|
BLAKE2b-256 | 24cafa16a8f9a132c2be0a7162536587560964f7d564d5b4c3b069a9bde58add |
File details
Details for the file vix_utils-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: vix_utils-0.1.7-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e446a0269a754a2d272fb806e2392a360c6c490ab8aa0da8a80d8ec8546bc6dd |
|
MD5 | bf74c042289b812befb448221e00868a |
|
BLAKE2b-256 | 27ed03a0f89d29503517b7e5fa824f403d7e719eb0c4b3094cf981b6cf372779 |