Skip to Content
Hands-On Machine Learning for Algorithmic Trading
book

Hands-On Machine Learning for Algorithmic Trading

by Stefan Jansen
December 2018
Beginner to intermediate
684 pages
21h 9m
English
Packt Publishing
Content preview from Hands-On Machine Learning for Algorithmic Trading

Hyperparameters

The agent's performance is quite sensitive to several hyperparameters. We will start with the discount and learning rates:

gamma=.99,          # discount factorlearning_rate=5e-5  # learning rate

We will update the target network every 100 time steps, store up to 1 m past episodes in the replay memory, and sample mini-batches of 1,024 from memory to train the agent:

tau=100 # target network update frequencyreplay_capacity=int(1e6)minibatch_size=1024

The ε-greedy policy starts with pure exploration at ε=1, linear decay to 0.05 over 20,000 time steps, and exponential decay thereafter:

epsilon_start=1.0epsilon_end=0.05epsilon_linear_steps=2e4epsilon_exp_decay=0.99
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Machine Learning for Algorithmic Trading - Second Edition

Machine Learning for Algorithmic Trading - Second Edition

Stefan Jansen

Publisher Resources

ISBN: 9781789346411Supplemental Content