Line Smoothnes

Discussion in 'Technical Analysis' started by dtl, Sep 23, 2006.

  1. dtl



    Does anyone know a way of determining the smoothness of a line?

    I am using an oscillating indicator and would like to determine the smoothness of the output.
    IE I prefer the oscillator to resemble something line a sinuisodal line, obviously I can determine this viusally but is there a way I can do this with an existing indicator or mathematically?

  2. Volatility is a measurement of "smoothness". "Smoothness" might also be described as the range of values or standard deviation of values over various time periods.

    Some people use moving averages to smooth data.

    It is not clear to me exactly what you want to do.

    Sometimes calculating indicators with nonstandard parameters gives smoother curves.
  3. dtl


    Thanks for the reply.

    Explaining a little bit more:

    I would like to determine when the last 10 periods of an oscillator are smooth and the output over these 10 periods resembles something that looks like part of a sinuisoidal wave. I can do this visually but this is no good for proper backtesting.

    I am away from home at the moment so unfortunatley I cannot post a screenshot of what I mean.

  4. MA or exponential MA ( more weight to most current unit of data : hour , day or period)
  5. nitro


    It is not so easy to do, but not hard. You should understand that this is a well studied problem, and has many approaches. Here is a "simple" one:

    Fit a cubic spline of a given order to the curve. Then do a [R]MSE of data points from the curve. The higher the MSE from the curve, the "choppier" it is. The higher the order of the curve, the closer the fit and the lower the MSE from the curve, so this problem is reduced to finding the "optimal" order of the curve. You can do the same estimation with moving averages, etc, but you get very rough numbers then.

    I believe that other statistics like fractal dimension, lyapunov exponets, etc will give you a number that describes information about the time series that you want, but they may not necessarily be better if what you are trying to match is what you see with your eye.

    Finally, probably the closest approach to what you are seeing with your eye is to transform the signal (time series) into the frequency domain, and do fourier or wavelet type analysis there (edge detection etc.) This is not so easy to do if you are not trained in the subject matter.

  6. dtl


    Thanks for the replies.

    Nitro, I think I am going to try your first approach.......I have no idea what you are talking about, however I will have a google to see if I can figure out the maths!

  7. bighog

    bighog Guest

    Why not just trade the stuff that goes straight up or down?
  8. I have found one way to "smooth" out indicators in the past.....use tick charts over time period charts or use range bar charts (like 4 tick range bars for the ES).
  9. Wouldnt a fisher transform be a good starting point, or is that not the sort of thing you mean?