I'm implementing an ANN that predicts the stock market but I have a doubt about which inputs should I take into account and the best way to normalize them. I want to predict the daily highest value and for this reason I want to consider 'open value', 'lowest value', ' close value', 'volume value, and 'Adj close value'. The problem is that the 'volume' has a value way bigger that the others (i.e. datum1: 2071.820068,2073.850098,2052.280029,2065.300049,4704720000,2065.300049).

How should I normalize these inputs?

  • 3
    $\begingroup$ You may have more answers there: quant.stackexchange.com Good luck at predicting the unpredictable :) $\endgroup$
    – mic
    Dec 20, 2016 at 19:59
  • $\begingroup$ I assume that you realize that what you're trying to do is impossible. This must be a class project? $\endgroup$
    – Aksakal
    Dec 20, 2016 at 20:00
  • $\begingroup$ aha I know that's impossible, its just a class project. I've already implemented the network but Im having some issues with inputs and normalization $\endgroup$
    – Pino
    Dec 20, 2016 at 20:03

1 Answer 1


Whether you have variables that are "roughly" on the same scale, or you have one (volume) or more that are far larger/smaller, it is common-practice and recommended to standardize. There are cases in which I would recommend not standardizing (specifically, not scaling), for example when the variables are in the same units and represent the same things.

Anyway, there are many ways to standardize, usually by first centering and then scaling. I'll list three common methods. Let $x \in \mathbb{R}^n$ be a vector of measurements (a feature) and let $\tilde{x}$ be its standardized version.

  1. $\ell_2$ standardization works well when your data is normal or platykurtic and not too skewed: $$\tilde{x} = \frac{x - \mathbf{mean}(x)}{\|x - \mathbf{mean}(x)\|_2}$$ In this case $\mathbf{mean}(\tilde{x}) = 0$ while $\|\tilde{x}\|_2 = 1$.
  2. $\ell_1$ standardization is a robust alternative to $\ell_2$ and works better when your data is highly leptokurtic, is corrupted by outliers, or is very skewed: $$\tilde{x} = \frac{x - \mathbf{median}(x)}{\|x - \mathbf{median}(x)\|_1}$$ In this case $\mathbf{median}(\tilde{x}) = 0$ while $\|\tilde{x}\|_1 = 1$. This is the one I tend to use when working with financial data like returns and volume.
  3. $\ell_\infty$ standardization is typically used with uniform distribution or others where the data is known to have a bounded support: $$\tilde{x} = \frac{x - \mathbf{min}(x)}{\|x - \mathbf{min}(x)\|_\infty}$$ In this case $\mathbf{min}(\tilde{x}) = 0$ and $\mathbf{max}(\tilde{x}) = 1$.

The comments I added when explaining when each methods works best are purely anecdotal and it's quite common for practitioners to try different methods and judge using objective metrics like out-of-sample forecasting error. I know, for example, that $\ell_\infty$ standardization is a favorite in the deep learning literature, even when the sampling distribution is approximately normal.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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