开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: Ways of filtering bad quotes from TWS


mbluhm2001
 

Yes, this is exactly what I'm trying to accomplish. Thanks for the
confirmation. What I'm using today is 5% range and if I see 5 prices
in a row in that new range then I assume that they are correct, i.e.
in your language, clumps of bad ticks are actually good ticks. The
only problem with this method is that you will be behind by 5 ticks
in time since I was waiting to verify them. I think this may work OK
for stocks but, as you know, in Futures, this could cost you a lot of
money. Just look bad at any of the days when Greenspan made suprise
rate cuts/hikes. I wish I could do something for the busted trades
issue but I think that may just be part of the game.

Thanks,
Mark


--- In twsapi@y..., tripack44 <no_reply@y...> wrote:
I filter for zero last price, ask and bid price in both the data
source and the data client. I haven't had problems with other quotes
being off but I'm only essentially dealing with the Minis and I
understand stocks have had some quote problems.

As I view it, there are 2 kinds of bad ticks that happen - single
bad
ticks and clumps of bad ticks. To get rid of single bad ticks, just
make sure that if you get a tick that is outside your tolerance
range, like greater than +/- 2% or 5%%, and if the next tick is back
inside your desired range, you have a high probability that it was a
bad tick.

You can make the assumption that clumps of bad ticks are actually
good ticks. Or you could pop up a dialog that would warn of possible
bad ticks and whether or not to filter. It is not an exact science
with stocks because if you get a harmonic alignment between the
exchange and a market maker or other large influential party who
made
a mistake, hundreds of trades can be busted, thus leading to "bad
ticks". But in this case you will only find out after the fact that
they were indeed bad ticks. So instead of tick filtration you will
need tick correction.

--- In twsapi@y..., "mbluhm2001" <mbluhm2001@y...> wrote:
I guess I will reply to myself and ask a different question:

Is anyone else getting bad quotes, i.e. quotes == 0 from the TWS
interface. If not, it seems I must be doing something wrong.

Thanks,
Mark


--- In twsapi@y..., "mbluhm2001" <mbluhm2001@y...> wrote:
I have been getting a price quote of zero for some of the stock
tickers throughout the trading day. So I decided to put in a
filter
and wanted to see if anyone else had any better ideas. The way
I'm
trying it is the following:

IF
the current price quote is greater than or less than the
previous
quote by X% and the error counter is less than Y

THEN
throw away the quote and increment the error counter

ELSE
use the price quote and clear the error counter

The idea is to set some min and max % (i'm starting with 5%)
that
the
quote can be outside the previous quote. But to handle gaps, if
the
quote is out of range Y number of times (i'm starting with 5)
then
use
that new quote. Also I don't allow quotes that are a value of
zero
either.

Any thoughts would be helpful.

Thanks,
Mark

Join [email protected] to automatically receive all group messages.