• Stars
    star
    497
  • Rank 88,652 (Top 2 %)
  • Language
    Jupyter Notebook
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Learning to trade under the reinforcement learning framework

Trading Using Q-Learning

In this project, I will present an adaptive learning model to trade a single stock under the reinforcement learning framework. This area of machine learning consists in training an agent by reward and punishment without needing to specify the expected action. The agent learns from its experience and develops a strategy that maximizes its profits. This is my capstone project for the Machine Learning Engineer Nanodegree, from Udacity. You can check my report here and the notebook with the tests of the codes used in this project here. The TEX file was produced with help of Overleaf.

Install

This project requires Python 2.7 and the following Python libraries installed:

Run

In a terminal or command window, navigate to the top-level project directory QLearning_Trading/ (that contains this README) and run one of the following commands:

python qtrader/agent.py <OPTION>
python -m qtrader.agent <OPTION>

Where OPTION could be train_learner, test_learner, test_random, optimize_k or optimize_gamma. The simulation will generate log files to be analyzed later on. Be aware that any of those commands take several minutes to finish.

Reference

  1. T.M. Mitchell. Machine Learning. McGraw-Hill International Editions, 1997. link
  2. M. Mohri, A. Rostamizadeh, A. Talwalkar. Foundations of Machine Learning. 2012. link
  3. N.T. Chan, C.R. Shelton. An Electronic Market-Maker. 2001 link
  4. N.T. Chan. Artificial Markets and Intelligent Agents. 2001 link
  5. R. Cont, k. Arseniy, and S. Sasha. The price impact of order book events. Journal of financial econometrics, 2014 link
  6. Du, Xin, Jinjian Zhai, and Koupin Lv. Algorithm Trading using Q-Learning and Recurrent Reinforcement Learning. link

License

The contents of this repository are covered under the Apache 2.0 License.

More Repositories

1

rl_trading

An environment to high-frequency trading agents under reinforcement learning
Python
272
star
2

FiniteDifference_Pricing

Pricing derivatives using the explicit finite-difference method
Jupyter Notebook
13
star
3

machine-translation

End-to-end machine translation pipeline using Deep Learning
Jupyter Notebook
10
star
4

banana-rl

Train an agent using RL to navigate (and collect bananas) in a large, square world
Python
7
star
5

Replicating_Strategy

A dynamic strategy that replicates the payoff of a derivative described as a stochastic process
HTML
5
star
6

cpp-binomial-greeks

Calculating options greeks using binomial tree model in C++
C++
4
star
7

mlops-predict-churn-clean-code

Build a customer churn prediction model using clean code principles
Python
4
star
8

VectorAutoregression_Model

Specification and estimation of VAR model to U.S. Dollar Future prices
HTML
4
star
9

AirCargo_Planning

Solving a logistic planning problems for an Air Cargo transport system with AI
Python
4
star
10

AssetReturns_Behavior

Statistical analysis of lognormal asset returns
HTML
3
star
11

reacher-rl

Keeping the double-jointed arm hand in the green sphere
Python
3
star
12

Customer_Segments

Using unsupervised learning techniques on product spending data to identify customer segments hidden in the data
Jupyter Notebook
3
star
13

ShortRate_Model

Implement the Kalotay-Williams-Fabozzi model to describe the future evolution of the short rate
HTML
2
star
14

IdentifyingFraud

Jupyter Notebook
2
star
15

dog-cnn

A Convolutional Neural Networks that identifies the canine's breed from a image
Jupyter Notebook
2
star
16

Smart_Cab

Training a cab how to drive using reinforcement learning
Jupyter Notebook
2
star
17

rnn_predictions

Building RNNs that generate sequences based on input data applied to time-series and text generation
Jupyter Notebook
1
star
18

cpp-traffic-simulation

Building a concurrent traffic simulation in C++
C++
1
star
19

kafka-spark-streaming

Streaming application using Apache Spark Structured Streaming and Kafka
Python
1
star
20

Student_Intervention

Predict how likely a student is to pass their high school final exam using Supervised Learning
Jupyter Notebook
1
star
21

mlops-dynamic-risk-assesment

Building a system to train and monitor an ML model to predict attrition risk
Python
1
star
22

etl-intraday-bidask

Hosting data lake with bid-ask data in S3 using Spark and Airflow
Python
1
star
23

tennis-rl

Training a pair of agents to play tennis
Python
1
star
24

ProsperLoan_EDA

final project for Udacity "Data Analysis With R" course
HTML
1
star
25

Boston_Housing

P1 for the Udacity's Machile Learning Egineer Nanodegree
Jupyter Notebook
1
star