I am trading with standard deviation bands (6 bands) on de-trended data. How can I find the most profitable signals with neural network or GA with standard deviation bands? Should I first find the slope degree of n bars of trend line (for example, 50 bars linear trend line slope is 30 degree) then calculate bands distance to price the finally find the probability distribution of the signals? Is this the correct method? Any comments welcome from people with a good grasp of signal processing and knowledge of probability.


2 Answers 2


You need to define the parameters over which you are searching (i.e. # of bands, slope of trendline, some function relating slopes to trendline, etc.). Then you can use your favorite optimizer to identify which parameters satisfy your P&L objective.

Of course, your approach is a surefire way to lose money since this curve-fitted model will not generalize out-of-time. There is no theoretical reasoning on why the parameters and functional form that your optimizer identifies need explain future returns. It's also not clear what your strategy is -- trend-following or mean-reversion on breaks -- which suggests there is not much of a theoretical underpinning here.

A better approach along your lines of going long/short and certain bands would be the attached paper by Marco Avellaneda @ NYU. Better still is taking a step back and making empirical observations about the market and then fitting a theory (what statisticians call the "data generating process") to explain your observations. Then try to build a model that reflects your theory.


Calculating standard deviation is a little bit complex. Standard deviation is used for prediction from past data. For calculating it firstly calculate mean of group of data, than subtract mean from each data, take square of each result and create sum, than divide this by the total number of data minus one. The sum of all the squared differences is then divided this by number less than total data. The square root of this number is called standard deviation.

  • 1
    $\begingroup$ This question isn't about how to calculate standard deviation. $\endgroup$ Oct 18, 2012 at 11:11
  • $\begingroup$ Yeah, this answer has nothing to see with the question... $\endgroup$
    – SRKX
    Nov 12, 2012 at 23:55

Your Answer

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

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