Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Bid-Ask Model Erosion

All rule based systems which take the initiative in order to enter into a position, either short or long, are subject to a negative or cost associated return. Even if you trade in a market which is commission free, every time your algorithm hits the bid or the ask side of a market, your system looses the spread between the two. At first glance, this may seem trivial since efficient markets run on a spread of one tick or one cent. But the long term consequence can be catastrophic.

To see this clearly, consider the fact that Bid and Ask prices for a security run almost parallel, but not in perfect in sync, since the spread often changes throughout the day, during volatile sessions. They are in fact, two distinct long term price paths which are slightly different. If your model is based on a singular path of prices, its resulting output may look more like a fractal rather then a continuous set of predictable results. Periods of consistent gains, followed by a catastrophic loss may be the outcome.

To cope with this challenge, you may wish to retool your models so that they more closely resemble the market - that they have both an offer variable and a bid variable.