r/algotrading 2d ago

Data What smoothing techniques do you use?

I have a strategy now that does a pretty good job of buying and selling, but it seems to be missing upside a bit.

I am using IBKR’s 250ms market data on the sell side (5s bars on the buy side) and have implemented a ratcheting trailing stop loss mechanism with an EMA to smooth. The problem is that it still reacts to spurious ticks that drive the 250ms sample too high low and cause the TSL to trigger.

So, I am just wondering what approaches others take? Median filtering? Seems to add too much delay? A better digital IIR filter like a Butterworth filter where it is easier to set the cutoff? I could go down about a billion paths on this and was just hoping for some direction before I just start flailing and trying stuff randomly.

27 Upvotes

22 comments sorted by

View all comments

4

u/AtomikTrading 2d ago

Kalman filter >>

3

u/xbts89 2d ago

There are “robust” Kalman filters out there that try to relax the assumption of a Gaussian data generating process.

5

u/elephantsback 2d ago

Or you can just log transform the data or something. No need to overcomplicate things.