Standard deviation for irregularly spaced timeseries

Discussion in 'Automated Trading' started by kroxobor, Jan 11, 2021.

  1. Standard deviation of N=10 is the same measure as of N=100, so it shouldn't matter (make sure to divide by N-1 because you are working with observational data). What you could also consider is taking standard deviation not by time, but by number of observations. So instead of measuring every minute, measure every, say 100, observations.
     
    #11     Jan 11, 2021
  2. yes that is true, but standard deviation is only a valid measure for series with zero autocorrelation, etc. The vast majority of times when people say they are smoothing something they are interpolating where the interpolation isnt valid. Proper handling requires non-linear filtering, and a signal and noise model, or something LIKE that. A smoother is just a low-pass filter which adds lag. we could go into information theory and the Nyquist limit and Shannon entropytheorems but that would be an ass kicking
     
    #12     Jan 11, 2021
    longandshort likes this.
  3. Here's a primer to help you navigate this: show.cgi (uvt.nl)
     
    #13     Jan 11, 2021
    kroxobor likes this.
  4. Craig66

    Craig66

  5. Whatever you do, you will need to normalise the data before you apply any stats to it. Is time really that important to you or are you just trying to get a measure of volatility? Tick data is normally full of noise and very hard to replicate the backtest results with real time ticking data, especially across different data providers.

    Consider working with range intervals instead.

    Good luck.
     
    #15     Jan 11, 2021
  6. data is not noisy at all. unless you have a shotty provider , its all information. brains actually operate with noise on a 1/f spectrum . stochastic resonance
     
    #16     Jan 12, 2021
  7. see my article
    https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.296.9564&rep=rep1&type=pdf
     
    #17     Jan 14, 2021
  8. kroxobor

    kroxobor

    I'm afraid I'll find difficult to code it properly.

    What I try to learn is how mean-reversion on 1M timeframes depends on near-term preceding volatility of returns. Using BTC data I wanted to pick some random days in 2020 and from tick data construct time series with interval of 0.5s - 1s. After computing 1-minute volatility for a particular day I wanted to see how behaviour of volatility in N preceding minutes affects ability of price to revert after a breakout by, lets say, 20 USD in the current minute. Breakout event is when price moves by T Dollars for example in 0.3-0.4 sec.

    Sorry this idea is still crude and poorly explained but I would appreciate any ideas and comments on this.
     
    Last edited: Jan 18, 2021
    #18     Jan 18, 2021