Skip to content

Latest commit

 

History

History
99 lines (78 loc) · 3.05 KB

experiment1.md

File metadata and controls

99 lines (78 loc) · 3.05 KB

Experiment 1

Main

Experimental settings that are constant throughout the experiment:

  • Objective: Predict future change in stock price n days ahead.
  • Task type: Classification.
  • Architecture: Feedforward.

Variation 1

  • Input data: 3 stocks. E.g. [GOOG, IBM, AAPL]
  • Output: One hot categorical prediction with threshold t+n time steps in the future.
    • n = [1, 2, 3, 5, 8, 13, 21]
    • Threshold [up_thr, down_thr]

Trading logic

If Output > up_thr: BUY Elif Output < down_thr: SELL Else HOLD

Variation 1

  • Input data: 3 stocks. E.g. [GOOG, IBM, AAPL]
  • Output: 3 output nodes. [[BUY(t+1), HOLD(t+1), SELL(t+1)], [BUY(t+2), HOLD(t+2), SELL(t+2)], ...,[BUY(t+n), HOLD(t+n), SELL(t+n)]]
    • n = [1, 2, 3, 5, 8, 13, 21]
    • Threshold [up_thr, down_thr]

Trading logic

If Output > up_thr: BUY Elif Output < down_thr: SELL Else HOLD

  • categories = [[large pos, pos, no change, neg, large neg], [pos, no change, neg]]
  • nr of input nodes
    • weekdays: Yes/No
    • On Balance Volume (OBV)
    • Simple Moving Average (SMA)
    • BIAS
    • Psychological Line (PSY)
    • ASY

Variations

  • Input data: 3 stocks. [GOOG, IBM, AAPL]
  • Output: One hot categorical prediction t+n time steps in the future.
    • n = [1, 2, 3, 5, 8, 13, 21]
    • categories = [[large pos, pos, no change, neg, large neg], [pos, no change, neg]]
  • nr of input nodes
    • weekdays: Yes/No
    • On Balance Volume (OBV)
    • Simple Moving Average (SMA)
    • BIAS
    • Psychological Line (PSY)
    • ASY

Technical Indicators from table 2

  • type of technical indicators
  • nr of layers
  • nr nodes in each layer
  • dropout setting
  • threshold values for output classes
  • weight initialisation
  • batch size

Notes

  • Make sure to balance the number of outputs / category. Ideally they are equal.

Results

Prediction

Mean Average Percent Error (MAPE):

Backtest

Backtest on Out-Of-Sample data only.

Performance metrics are:

  • Total Returns
  • Average Annual Return
  • Maximum drawdown
  • Sharpe ratio sharpe = (returns/std)*sqrt(365.25) std = std_dev(returns)
  • Sortino ratio

Comparision Strategies:

  • Buy&Hold
  • Naive
  • Trend following

https://github.com/Crypto-toolbox/pandas-technical-indicators/blob/master/technical_indicators.py