Giter Site home page Giter Site logo

white07s / forex-trading Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 2.0 531 KB

A simple implementation of HFT (High-Frequency Trading) in Python on the concept of DQN for forex market

License: Apache License 2.0

Python 100.00%
dqn-tensorflow forex-trading high-frequency-trading

forex-trading's Introduction

Forex-Trading

A simple implementation of HFT (High-Frequency Trading) in Python on the concept of DQN

Goal :

  • Finding patterns for avoiding spread loss and limiting the order book
  • Automating the trading by certain default values (you can find the config file inside the file) by using the DQN model.
  • Making a model that can handle multiple orders without avoiding conflict with the analysis
  • Avoid using any extra library or API

Some basic information:

  • Support tensorboard
  • Written in TensorFlow v1
  • if you using TensorFlow v2 then import this on top of the code to avoid conflict of depreciated function like random_seed_set and session
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
  • HFT (High-Frequency Trading): High-frequency trading (HFT) is a type of algorithmic financial trading characterized by high speeds, high turnover rates, and high order-to-trade ratios that leverages high-frequency financial data and electronic trading tools.
  • More info: https://www.investopedia.com/terms/h/high-frequency-trading.asp

Training Data

  • 1000 Episodes
  • EURUSD (5 min interval - 2 Year Period)
  • GBPUSD (5 min interval -2 Year Period)

Install

  • Check config file based on your requirements
  • Install lib
pip install -r requirements.txt

Training

python3 index.py
  • Code Documentation
python3 index.py -h
  • Tensorborad results link
https://tensorboard.dev/experiment/H86sR9cmRlOUvRV8yBwLEA/

Results

  • Map Map
  • Result Result

Remarks

  • Results will be different if you are using leverage (for testing purpose 50x leverage is used) and charge based on your broker
  • IT'S A EXPERIMENT [NO RESPONSIBILITY FOR ANY INTEGRATION IN THE LIVE MARKET]

forex-trading's People

Contributors

white07s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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