Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Buying and Selling at the same price without slippage

I'm looking for algorithm to buy and sell stock at the same price without any tick slippage. For example, I want to buy APPL at 500.00. So every time price goes above $500.00 the algorithm would buy @ 500 and when it goes below $500.00 it would sell at $500. The problem is the bid and spread and how to minimize slippage (eg. buying at 500 at the ask and sell at 499.99 at the bid.

Anyone have any solutions?

Thanks so much.

DL

1 response

Hello Dada,

Just curious...why would you want to buy and sell at the same price? Wouldn't that result in no profit (just a loss, since you'll have to pay a commission)?

Grant