From the February 2013 issue of Futures Magazine • Subscribe!

Breaking new ground with neural nets

Market data effects

What we trade largely affects how we preprocess the data. Stated generally, the kind of data we use greatly affects the design of the preprocessing for our models and the outputs that we predict.

Many classic preprocessing methods use percentage changes to normalize price changes, but if we use back-adjusted futures data, we cannot use ratios. This create a problem. Back-adjusting  destroys  price levels by adjusting out contract roll gaps. Range is not distorted in back-adjusted contracts, so if we use range to normalize attributes such as (Close-Close[10])/Average(range,10), we’re OK.

If we want to use more classic ratios, we need to use ratio-adjusted futures contracts, cash series or index data. If we are using data for ETFs, mutual funds or stocks, then split-adjusted data work fine because split-adjusted data are logically analogous to ratio-adjusted future contracts.

Inputs, such as unemployment numbers and inflation gauges, require longer bar time frames (for example, monthly). We need to normalize the release date so that monthly data sum correctly. The easiest way is to use the last trading day of the month regardless of when in the month the data actually were released. If we are using daily or weekly data, we can use the released date to predict shorter-term trends.

Noise also affects preprocessing. We need to design preprocessing for a monthly or weekly model differently than what we would do for daily or intraday data. For example, price changes might readily be predictable on a weekly time frame, hardly predictable on a daily time frame, and unfathomable with intraday bars. You need to develop different types of targets based on the time frame being predicted.

The types of markets that we trade also affect our predictions. Currencies trend, stock indexes traverse a mean and other markets are choppy and noisy. 

Input & output training

Preprocessing of data simplifies relationships between the input preprocessing and our desired target. The goal of preprocessing is to make these relationships clear enough that the neural network or kernel regression algorithm can model them. Modeling is not as easy as it sounds for neural nets. Not only do we need preprocessing, which makes these relationships clear, but the distribution of outcomes affects how well the neural network will train. When we use these algorithms, we need to scale the data before we pass that data to the algorithm.

Let’s look at back-propagation. Its two most common activation functions are the sigmoid, which scales from 0 to 1, and the hyperbolic tangent, which scales from -1 to 1.

  • Sigmoid: S(t)=1/(1+e-t)
  • Hyperbolic tangent: Tanh(Z)= eZ-e-Z/eZ+e-Z

<< Page 4 of 9 >>
Comments
comments powered by Disqus