Skip to main content

CME Group DataMine Python Package

Project description

CME Datamine

Build Status

Overview

CME Datamine is offered via a self-service cloud solution, where you can access more than 450 terabytes of historical data almost instantaneously, using some of the most flexible data delivery methods available. Extensively back-test strategies using real benchmark markets that date back as far as the 1970s, to help you gauge profitability and risk.

This python package will support your rapid analysis by supplying a basic framework for direct iteration with CME Datamine cloud system to accomplish the following tasks.

  1. Load your data item catalog which you have subscribed
  2. Download your data items to your local machines from the cloud
  3. Specific data items automatically structured into a Pandas dataframe from your local copy. This includes correct typing and other generic routines to support your analysis needs.
  4. Examples of working with this data in Pandas via a collection of Ipyhon Notebook files.

Installation

Conda

The easiest way to install this package is to do so in a Python environment created with Anaconda or its minimalist alternative Miniconda. Once this environment is installed and activated, simply run this command:

conda install -c cme_group datamine

PyPi

Installation from PyPi

pip install datamine

From source

To install from source, clone this repository and execute

pip install .

If you wish to install the package in writable mode for development, do

pip install -e .

Example usage

The following sections quickly outline some of the simple methods to access CME Datamine data. For interactive use, we recommend the use of a Jupyter notebook or the JupyterLab platform.

Load My Data Catalog Items

myDatamine = dm.DatamineCon(username='YOUR_CME_APP_ID', password='YOUR_CME_APP_PASSWORD', path='./data/')
#Get My Datamine Data Catalog
myDatamine.get_catalog(limit=1000)
# Review one of the data catalog items as supplied in dict format.  
myDatamine.data_catalog.popitem()

Download Specific Data Products

You can request specific data products. Current data products supported are as follows. When requesting your data, you must specify the dataset tag or leave it blank will request all items in your catalog.

CME Data Products

Data Set Name Data Type dataset Tag
CME Time and Sales Price TICK
CME Market Depth MBO Price MBO
CME CF Crypto Currency Index CRYPTOCURRENCY
BrokerTec Top of Book Price NEXBROKERTECTOB
BrokerTec Depth of Book Price NEXBROKERTECDOB
BrokerTec Full Book Price NEXBROKERTECFOB
Eris PAI Market Analytics ERIS
SSTL INT Settlements Price STL

Third Party Data

Data Set Name Data Type dataset Tag
TellusLabs Alternative - Ags TELLUSLABS
Orbital Insight Alternative - Energy ORBITALINSIGHT
Bantix Technologies Market Analytics - Options BANTIX
RS Metrics Alternative - Metals RSMETRICS
1 Qbit Market Analytics 1QBIT

A complete list of data products can be reviewed on CME Datamine

Example request for specific Data Sets using the dataset tag.

myDatamine.get_catalog(dataset='CRYPTOCURRENCY', limit=1000)
myDatamine.get_catalog(dataset='TICK', limit=1000)
myDatamine.get_catalog(dataset='TELLUSLABS', limit=1000)
myDatamine.get_catalog(dataset='RSMETRICS', limit=1000)

Use Bitcoin Information in Analysis

The following example can be found in the Load Datamine Data Locally Example Notebook

myDatamine.get_catalog(dataset='CRYPTOCURRENCY', limit=1000)
myDatamine.crypto_load()

#plot second interval index values for Bitcoin
indexValue = myDatamine.crypto_DF.loc[myDatamine.crypto_DF['symbol'] =='BRTI','mdEntryPx'].plot(figsize=[15,5]);
plt.title('Historical Bitcoin Intraday Reference Rate')
plt.xlabel('Date')
plt.ylabel('USD/BTC')
plt.style.use('fivethirtyeight')
plt.show()

Bitcoin RT Index Plot Example

Questions and Comments?

Please use the Issues feature.

Notice

The information herein has been complied by CME Group for general informational and education purposes only and does not constitute trading advice or the solicitation of purchases or sale of futures, options, or swaps. The views in this video reflect solely those of the author and not necessarily those of CME Group or its affiliated institutions. All examples discussed are hypothetical situations, used for explanation purposes only, and should not be considered investment advice of the results of actual market experience. Although every attempt has been made to ensure the accuracy of the information herein, CME Group and its affiliates assume no responsibility for any errors or omissions. All data is sourced by CME Group unless otherwise stated. All matters pertaining to rules and specification herein are made subject to and are superseded by official CME, CBOT, NYMEX, and COMEX rules. Current rules should be consulted in all cases concerning contact specifications.

CME Group, the Globe Logo, CME, Globex, E-Mini, CME Direct, CME Datamine and Chicago Mercantile Exchange are trademarks of Chicago Mercantile Exchange Inc. CBOT is a trademark of the Board of Trade of the City of Chicago, Inc. NYMEX is a trademark of New York Mercantile Exchange, Inc. COMEX is a trademark of Commodity Exchange, Inc. All other trademarks are the property of their respective owners.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datamine-0.21.post2.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datamine-0.21.post2-py2.py3-none-any.whl (27.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file datamine-0.21.post2.tar.gz.

File metadata

  • Download URL: datamine-0.21.post2.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for datamine-0.21.post2.tar.gz
Algorithm Hash digest
SHA256 d06d82e9b9ac4a8df7055e2a432e6870a46ff766fb6747f50b6e020a20c86452
MD5 f888de6d71ac4ac2e9cc578a4e4f300f
BLAKE2b-256 5b1383b3477e29563cdb5d804e3802b5d76823460ab851537e2e043d2d9a20a2

See more details on using hashes here.

File details

Details for the file datamine-0.21.post2-py2.py3-none-any.whl.

File metadata

  • Download URL: datamine-0.21.post2-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for datamine-0.21.post2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7864e9c0f9a7eb6ac6e38e54ccc3184820345a383f79ae692292e3c8ada71a32
MD5 85aac8f9f5009b0e743b36ba0a4846cf
BLAKE2b-256 92dbd7a4567ed0bcc72d8f088ec40b107104375a73436a1490e57758a64b3b04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page