Machine Learning Classification of Price Extrema Based on Market Microstructure Features. A Case Study of S&amp;P500 E-mini Futures. Reproducibility Package.
Creators: name: Sokolovsky, Artur
name: Arnaboldi, Luca
Publisher: name: Zenodo
Year: 2020
Subjects: algorithmic finance
machine learning
algorithmic trading

description: Mini S&amp;P Automated Trading Platform - Sample Files <br> The study introduces an automated trading system for S&amp;P500 E-mini futures (ES) based on state-of-the-art machine learning.<br> Concretely: we extract a set of scenarios from the tick market data to train the model and further use the predictions to model trading. We define the scenarios from the local extrema of the price action. Price extrema is a commonly traded pattern, however, to the best of our knowledge, there is no study presenting a pipeline for automated classification and profitability evaluation.<br> Our study is filling this gap by presenting a broad evaluation of the approach showing the resulting mean annual Sharpe ratio of 6.32 for the period of 33 months.<br> However, we do not take into account order execution queues, which of course affect the result in the live-trading setting. The obtained performance results give us confidence that this approach is worthwhile. In this code repository you will find sample models and datasets to see our model analysis pipeline. <br> Functionality The system is capable of performing a number of facial analysis tasks: * Model Analysis<br> * Analysis of model performance for different rebounds and contracts * Feature Importance<br> * Analysis of the impact of the features on the model performance using SHAP<br> * Firstly Grouped by the overall impact of each feature for all models<br> * And by feature analysis for contract of choice <br> Dependencies All code was tested using python 3.8.2 on a fresh install, use `python -m pip install -r requirements.txt` to install all dependencies. * Data Processing<br> * Pandas<br> * numpy<br> * Plotting<br> * matplotlib<br> * seaborn<br> * Model training<br> * Catboost<br> * Feature Analysis<br> * shap (if using python3.7 there is an issue with deps use --no-deps to circumvent)<br> * Running code<br> * jupyter (need to relog to update executable path) <br> Repository content * Original trained models are available in the `models` folder (unpack) * Classification dataset samples are available for each contract in the `datasets` folder (unpack) * Statistics for the model performance are available for your convenience in json format in the `fit_stats` folder (unpack) * Analysis of the feature performance is available in the `shaps` folder (unpack) To link these results to those of the publication please look at the `feature_names_association.json` file (unpack) to see which features correspond to those described in the paper· Running the code All code for visualising the models performances is available in the `sample analysis.ipynb` notebook. To run type jupyter notebook in the command line and navigate to `localhost:8888` in your browser. Citation If you use any of the resources provided on this page in any of your publications we ask you cite the paper : "Machine Learning Classification of Price Extrema Based on Market Microstructure Features. A Case Study of S&amp;P500 E-mini Futures." (https://arxiv.org/abs/2009.09993) <br> Final remarks Full dataset samples cannot be disclosed as it it infringes CME Copyright, but any of the code provided can then be applied to the data you may have available. License Attribution 4.0 International (CC BY 4.0)