Git Product home page Git Product logo

drl_for_active_high_frequency_trading's Introduction

DRL for active HFT

We propose an open-source version of the code for the first end-to-end Deep Reinforcement Learning based framework for active high-frequency trading.

Authors

  • Antonio Briola
  • Jeremy Turiel
  • Riccardo Marcaccioli
  • Alvaro Cauderan
  • Tomaso Aste

Code author

  • Alvaro Cauderan

Reference paper

DRL for Active HFT

Description

We train DRL agents to trade one unit of Intel Corporation stocks by employing the Proximal Policy Optimization algorithm. The training is performed on three contiguous months of high-frequency Limit Order Book data. In order to maximize the signal-to-noise ratio in the training data, we compose the latter by only selecting training samples with the largest price changes. The test is then carried out on the following month of data. Hyperparameters are tuned using the Sequential Model Based Optimization technique. We consider three different state characterizations, which differ in the LOB-based meta-features they include. Agents learn trading strategies able to produce stable positive returns in spite of the highly stochastic and non-stationary environment, which is remarkable itself. Analyzing the agents’ performances on the test data, we argue that the agents are able to create a dynamic representation of the underlying environment highlighting the occasional regularities present in the data and exploiting them to create long-term profitable trading strategies.

Data description

We use data from the INTEL stock from the LOBSTER database. Unfortunately, we are not able to share them as they are proprietary data.

Nonetheless, if you are able to acquire it through appropriate means, here is how it should be structured in the code:

.
├── ...
├── data      
│   ├── clean_train_data    # Keep empty
│   ├── test_data           # Add raw testing csv's
│   └── train_data          # Add raw training csv's
└── ...

Code usage

The code can be run through main.py and the parameters can be set through the argument parser (each parameter is explained in the code).

How to cite

@article{briola2021deep,
title={Deep reinforcement learning for active high frequency trading},
author={Briola, Antonio and Turiel, Jeremy and Marcaccioli, Riccardo and Aste, Tomaso},
journal={arXiv preprint arXiv:2101.07107},
year={2021} }

Contacts

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

drl_for_active_high_frequency_trading's People

Contributors

alvaro2112 avatar antobrms 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.