Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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.

share|improve this answer

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.

share|improve this answer
This question isn't about how to calculate standard deviation. – chrisaycock Oct 18 '12 at 11:11
Yeah, this answer has nothing to see with the question... – SRKX Nov 12 '12 at 23:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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