Options Trading Using Q-learning and Scala Play Framework

As human beings, we learn from experiences. We have not become so charming by accident. Years of positive compliments as well as negative criticism, have all helped shape us into who we are today. We learn how to ride a bike by trying out different muscle movements until it just clicks. When you perform actions, you are sometimes rewarded immediately. This is all about Reinforcement learning (RL).

This chapter is all about designing a machine learning system driven by criticisms and rewards. We will see how to apply RL algorithms for a predictive model on real-life datasets.

From the trading point of view, an option is a contract that gives its owner the right to buy (call option) or sell (put option) a financial asset (underlying) at a fixed price (the strike price) at or before a fixed date (the expiry date).

We will see how to develop a real-life application for such options trading using an RL algorithm called QLearning. To be more precise, we will solve the problem of computing the best strategy in options trading, and we want to trade certain types of options given some market conditions and trading data.

The IBM stock datasets will be used to design a machine learning system driven by criticisms and rewards. We will start from RL and its theoretical background so that the concept is easier to grasp. Finally, we will wrap up the whole application as a web app using Scala Play Framework.

Concisely, we will learn the following topics throughout this end-to-end project:

  • Using Q-learning—an RL algorithm
  • Options trading—what is it all about?
  • Overview of technologies 
  • Implementing Q-learning for options trading
  • Wrapping up the application as a web app using Scala Play Framework
  • Model deployment
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset