Currently I am designing a little market making bot for forex trading, that puts offers around the mid price. In the market I am trading it happens the order book becomes so thin that the mid price jumps up or down by quite a bit (say 30%) when one big order hits the order book. Just have a look at this chart around Dec 25th
These events always last just for around 30-60 seconds until the order books recover and the mid price becomes stable again.
My market making bot updates its offers in 12-15 second intervals. Now my question is how to deal effectively with these "outliers"?
My first idea was to measure the volatility before the bot updates its offers. And when the volatility is to high the bot just deletes the offers and waits until the volatility falls below a certain threshold again.
My second approach is to sample the price in say 10 second intervals and put these prices in a EWMA model. Then before updating the price I check the relative distance of the current price from the moving average.
What would be the most sensible approach to stop the bot from suffering from these outliers of the mid price.