I am simulating a market for my trading system. I have no ask-bid prices in my dataset and use adjusted close for both buy and sell price. To account for this I plan to use a relative transaction cost.

The question is how large such a relative transaction cost should be to be realistic?

  • I trade stocks only from Dow Jones Industrial average (read that it might be around 0.2% in this paper)

  • I trade only on day-to-day (no intraday) thus I can assume to buy at close prices (adjusted close?)

  • I simulate trades in the time period 2000-2012

  • By transaction cost I am interested in any cost related to a real trade, e.g., brokerage fee, spread, slippage (thanks @chrisaycock)


3 Answers 3


We cannot give you a relative bid-ask spread that would make sense. The reason for that is that it really depends on several parameters:

  • The type of financial asset you invest in (futures, funds, index, options, ...)
  • The period during which you're trading (I think the liquidity in markets hasn't been the same over time).
  • If you trade intraday, it depends on the time you trade at.
  • If you assume you trade close price, you would submit MOC (market on close) orders. Your broker is most likely to be able to sometimes execute your orders at a better price than the close, and sometimes the opposite. I think that some brokers will have some terms that allow you to make sure that your trade will be exactly the close price, I've seen this for some commodity futures.

Finally, bid-ask spreads are not transaction cost per-say; they are the market price of liquidity in a sense. Your transaction costs would be more a fee that is charged by the broker for executing the order. It depends more on the quantity you trade and the terms you manage to negotiate with your broker.

  • 1
    $\begingroup$ +1 I also think the OP is curious about slippage rather than mere transaction cost. $\endgroup$ Commented Jun 3, 2012 at 17:29
  • $\begingroup$ Thanks for the answer. I have added some details in the question. $\endgroup$
    – Stian
    Commented Jun 4, 2012 at 8:02
  • $\begingroup$ By the way I was not aware of slippage, so that helps my understanding :) $\endgroup$
    – Stian
    Commented Jun 4, 2012 at 8:14
  • 1
    $\begingroup$ You can use Jim Gatheral's square-root filter to approximate transaction costs inclusive of slippage. Another popular variation is the power-law filter $\endgroup$ Commented Jun 5, 2012 at 14:28
  • $\begingroup$ BTW on terminology, I hear slippage and liquidity costs together with brokerage fees and exchange fees collectively referred to as transaction costs all the time. Whether technically true or not, it is colloquially understood that way in most stuff I've read. $\endgroup$ Commented Jun 14, 2012 at 13:42

When I simulate, I can usually narrow my trades down to the minute. So I set my Open price at the HIGHEST price for the minute, and my close price to the LOWEST price for the minute. The goals is to be as conservative as possible. You don't want to go live and find that you were too optimistic in your fills.

If you cannot narrow it down to smaller than a day, then your open should be at the highest price of the day, and the close at the lowest price of the day.

Like I stated above, simulating should be as conservative as possible. As there will be enough real-time surprises when you start trading live.

  • $\begingroup$ This seems pretty arbitrary and I don't understand your reasoning. What is special about the high and low? Assuming that the high and low price are some multiple of the standard deviation around the mean price, this suggests that you are using a certain "worst case scenario". But some other level of confidence (a different multiple of sigma) could be optimal. and it is not true you should be as conservative as possible -- that would mean charging yourself an infinite amount of slippage. you want to be realistically conservative. $\endgroup$
    – Paul
    Commented Jul 26, 2017 at 1:28

For the brokerage fee, consider coding a system that calculates the fees for several brokerages (so that you can compare brokerages).

For the slippage (and other issues), consider coding that in as well. Adjust prices based on the slippage percentage. Once you do that, you can vary the slippage and determine how much slippage will break your algo.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.