In this Blog we demonstrate how Investor can be used together with DL4j and Spark’s MLlib.

In general the idea is to use the stock history data in order to predict an increase or decrease of the stock value with the help of Machine Learning. We will demonstrate how we can use Indicators to define the machine learning model and how to evaluate the models and finally to check the result using the Investor framework.

Here is the table of content:

  • Loading of Stock Data using Investor
  • Definition of a DL4J Iterator using Investor Indicators
  • Training and Evaluation of a DL4J Classification net
  • Training and Evaluation of a MLlib RandomForestClassifier
  • Training and Evaluation of a MLlib NaiveBayes Classifier
  • Setup of a Investor Strategy using the Predictions as input
  • Evaluation of the Machine Learning Trading Strategy using the Investor framework
  • We calculate the return of the BuyAndHoldStrategy as a Baseline

The link to the Jupyter Scala Workbook using the BeakerX kernel can be found in this Gist!


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *