As was already stated in Chapter 3, High-Frequency Bitcoin Price Prediction from Historical Data, you need Java 1.8+ and SBT as the dependencies. Then follow these instructions:
- Download the app. I named the code PlayML.zip.
- Unzip the file and you will get the folder ScalaML.
- Go to the PlayML project folder.
- Run $ sudo sbt run to download all the dependencies and run the app.
Then the application can be accessed at http://localhost:9000/, where we can upload the IBM stock and option prices and, of course, provide other config parameters:
Figure 17: The UI of options trading using QLearning
Now, if you upload the stock price and option price data and click on the run button, a graph will be generated as follows:
Figure 18: QLearning reaches goal state 81 with a coverage of 0.2 for 126 states and 15,750 transitions
On the other hand, the API endpoint can be accessed at http://localhost:9000/api/compute.
Figure 19: The API endpoint (abridged)