Automated Trading Q & A

Discussion in 'Automated Trading' started by autotradingalgos, Apr 12, 2016.

  1. IAS_LLC

    IAS_LLC

    A kalman filter is an "optimal" estimator (I.e the mean and covariance combo produces the maximal likelihood/probability density) under the assumption of linearity and white gaussian measurement noise. It's like a adaptive bandwidth moving average that also gives you covariance estimates
     
    #21     Apr 20, 2016
  2. Simples

    Simples

    Exactly that. Funny how 95% of discussions are about differences in semantics and definitions, and not content :rolleyes:
     
    #22     Apr 20, 2016
    userque likes this.
  3. Simples

    Simples

    When you say it like that, it sounds much more interesting! :)

    Do you have any links you can recommend for better understanding for someone with low tolerance to obtuse formulas, but can use formulas when provided with clarity?
     
    Last edited: Apr 20, 2016
    #23     Apr 20, 2016
  4. IAS_LLC

    IAS_LLC

    I haven't used for finance at all, only engineering, although I do know some trader are using them. The specific behavior of the filter will depend on how you model the market, but generally speaking, you should get a covariance "spike" that will correlate with a rise in volatility (price action), and that in theory could be used to Signal entries or determine fair value
     
    #24     Apr 20, 2016
  5. Simples

    Simples

    I see, so you could use the error measurement as signal together with the averaging. So in effect it could be made to basically behave very much like a bollinger band? Meaning there will be periods with more accuracy of pricing (consolidation) and other periods of less accuracy (breakouts and trends), and you can read these extremes? What is a bit confusing is that since Kalman is an IIR filter, what kind of sensitivity could one expect, as it doesn't seem to be based on a fixed period. Meaning it could potentially be sensitive to scale, and thus very much dependent on ie. the sampling rate (timeframe) used. In electrical engineering, the kalman filter could be optimized to solve one specific problem, whereas with non-stationary price data you don't really have a fixed base to work from.

    I'm sure though, that you can use almost anything to generate trading signals. It's more about putting it all together the right way, than exactly what it is you're using for parts.
     
    #25     Apr 20, 2016
  6. IAS_LLC

    IAS_LLC

    As far as sampling rate (dt) is concerned, your state transition matrix is usually derived from a continuous time model , often with a Taylor series derivative approximation. So your model is a function of the sampling rate, and thus the prediction step of the Kalman Filter algorithm is robust to variable sampling rate. The measurent correction step is not a function of time, so market tick rate doesn't matter either.

    Yes, a kalman could be compared to Bollinger bands. But my money is on kalman as there is more statistical rigor in the underlying equations
     
    #26     Apr 20, 2016
    Simples likes this.
  7. traider

    traider

    How do you estimate the parameters for a Kalman filter?
     
    #27     Mar 6, 2017
  8. IAS_LLC

    IAS_LLC

    I assume you're referring to the process noise covariance matrix ? It depends on your system model, and generally requires some degree of tuning to balance error containment and filter response characteristics.
     
    #28     Mar 6, 2017
  9. traider

    traider

    yes, the process and measurement variance matrix. Can you elaborate more or link to academic paper that does this?
     
    #29     Mar 6, 2017
  10. IAS_LLC

    IAS_LLC

    dx/dt = f(x,t) + W(t)

    Where f() is your state space model, and W(t) is white noise process that represents the modeling errors/uncertainty in your state model. The process is the covariance of the stochastic processes W(t). You usually don't know W(t) exactly, which is why tuning kalman filter is considered an art in some situations. You should be able to google a tuning tutorial.

    For the measurement covariance matrix, no tuning should be required. You should know the accuracy of your measurements.
     
    #30     Mar 6, 2017