3
$\begingroup$

I am new to machine learning and have started brainstorming some model ideas that involve financial instrument/time series data. I was thinking it might be useful to use a classification algorithm to predict if an instrument was in fact up or down y% (TRUE/FALSE) after n days, based on i.e. a combination of technical indicator states for each learning example.

That said, in researching the idea I came upon an article that stated training examples in time series data are not independent of each other:

"Time series data has a natural temporal ordering - this differs from typical data mining/machine learning applications where each data point is an independent example of the concept to be learned, and the ordering of data points within a data set does not matter"

My question is as follows: is the above true only if we are trying to predict the continuous value of an asset n days into the future? As far as my idea outlined in the first paragraph is concerned, would this then still be valid considering I am not (apparently) taking into account the specific relationship

$\endgroup$

1 Answer 1

3
$\begingroup$

Consider that:

  • a "sliding window" approach can be used with any standard regression / classification algorithm. E.g. given the following time series

    Time High Low Open Close Volume
      1   H1   L1  O1   C1     V1
      2   H2   L2  O2   C2     V2
      ...
      i   Hi   Li  Oi   Ci     Vi
    

    you can feed the ML algorithm with these examples:

      O0, H1, L1, O1, C1, V1, H2, L2, O2, C2, V2, H3, L3, O3, C3, V3
      O1, H2, L2, O2, C2, V2, H3, L3, O3, C3, V3, H4, V4, O4, C4, V4
      O2, H3, L3, O3, C3, V3, H4, V4, O4, C4, V4, H5, V5, O5, C5, V5
      ...
    

    (the first value is the target)

    The size of the window (s) is an important limitation: the algorithm cannot correlate "candles" that lie more than s timesteps apart.

    On the other end, with a large s, all examples appear to be sparse and dissimilar in many ways (see Curse of dimensionality).

    You may use other features (e.g. averages, multiple timeframes, Japanese candlestick patterns...) but not without a good knowledge of the specific domain.

  • ML has tools that, in theory, can deal with timeseries. E.g. Recurrent neural networks can take advantage of their internal memory to process arbitrary sequences of inputs and exhibit dynamic temporal behavior. See Which machine learning algorithms can be used for time series forecasts? for references.

$\endgroup$
1
  • $\begingroup$ Neural networks seem like overkill. Linear mixed models can capture non-independence between samples. $\endgroup$ Sep 18, 2016 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.