Giter Club home page Giter Club logo

mulmat's Introduction

mulmat: Futures, Expirations and Multipliers Database

Overview

"Mulmat" is a Python library that maps futures option codes to their corresponding underlyings and expiration date. Futures options and their underlying futures contracts have distinct expiration dates which cannot always be calculated in a straightforward manner (may be affected by holidays, and are irregular in some products, such as ags). For example, the option code /OZFX1 (options 5-Year T-Note treasuries) has an underlying of /ZFZ1 and an expiration of 10/22/2021 (of the option itself, not of the underlying contract).

"Mulmat" also provides a simple database of size multipliers for each product.

The local database of contracts is stored in this repository as a static file and updated regularly by the author running the script. See commit history for the latest updates. A script is included that can download a list of fresh contract data from the CME website and aggregate it in the existing database, in order to maintain data for expired contracts. Historical expirations will be accumulated. I started this database in August 2021; prior data is not available.

The Python library provides simple indexing into this library. The list of contracts updated in the local database by default are those commonly available in retail platforms, but the code supports any product. If you'd like to me to add more to the list, please send email.

Usage

Some retail platforms only provide futures options codes and one cannot thereafter determine the expiration date for that contract. This is intended to make it easy to do this mapping and maintain a database of it.

You lookup a name like this:

$ mulmat-lookup LOX1
{
  "Product Group": "Crude Oil",
  "Product": "Crude Oil Option",
  "Symbol": "LOX1",
  "Underlying": "CLX1",
  "First Trade": "11/20/2015",
  "Expiration": "10/15/2021 13:30",
  "Settle": "10/15/2021",
  "Clearing": "LO",
  "Globex": "LO",
  "Prs": "LO",
  "Floor": "LO",
  "Group": "LO",
  "Itc": "LO",
  "Exchange": "NYMEX",
  "Contract Type": "Option"
}

It also supports TOS-style expirations with the decade, e.g., LOX21 and a leading slash, e.g. /R3EX1. (This is relevant because it's really that particular platform which is not providing us with this information in the first place other than it being rendered in the UI which uses decades in the contract names.)

License

This project is under the Apache license.

Credits

Author: Martin Blais [email protected]

(Note: The project is named as such as a token of appreciation of Pete Mulmat, a futures expert previously at the CME and currently a commentator on futures markets and show host on the Tastytrade network.)

mulmat's People

Contributors

blais avatar def-mycroft avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.