I'm backtesting an algorithm for trading nasdaq stocks, and would like to take into account the spread. I am using historical data from yahoo, which contains:
open, high, low, close, volume, adj. close
All of my trading signals are based off of those prices as they are (without regard to whether they are bid, ask, best bid, best ask, etc.)
To attempt to take into account the bid/ask spread when executing a trade, I have treated all the prices above as the bid prices. To estimate the ask price, I decided to set the spread always equal to 1% of the previous day's high. So the ask price is just estimated by adding that spread to the bid price (and again, the bid price is equal to the yahoo prices given).
Under what conditions is this a reasonable estimate for the spread? For example, very low priced stocks have larger spread percentages so I exclude those stocks completely from my backtesting.
Any better way to do this?
Thanks