Opto Trader Hints

Overview

You will draw on your experience with your manual strategy and optimization to train and test a learning trading algorithm.

ML Trader

Recall your manual trader: You should have used one or more indicators, then you used a simple set of logical statements to decide on an action. Those logical statements should include statements like “if indicator1 < threshold1 and indicator2 > threshold2” The idea for this version of the project is to use an optimizer to find the values of these thresholds rather than setting them manually. More succinctly, the optimization problem is:

  • Given: a set of parameters: threshold[0] to threshold[n-1]
  • Find: values for the parameters that maximize Sharpe ratio of the corresponding trading strategy.

Your objective function for the optimizer is thus the Sharpe ratio of the strategy. The logic you use should classify a particular state (set of indicator values) as:

  • +1: LONG
  • 0: CASH
  • -1: SHORT

The X data for each sample (day) are simply the values of your indicators for the stock — you should have 3 to 5 of them. Once you have these values, you can use the classifications to generate a set of transactions which you then assess the Sharpe ratio of.