# Does QuantConnect use both bid and ask data for backtesting?

Or Quantopian?

At the moment QuantConnect doesn't have bid & ask data.

However, I've been using limit orders in my backtests, and adjusting the limit orders. I'm guessing what they do is fill your limit order according to the trades coming in... so limit order backtests 'steal' the trades as they come in, until your limit order is filled.

For low volume stocks with big spreads, your limit order may not get filled for a long time...

Their 'standard' Order() method just fills your order at the current price.
You can also model slippage ( 1/10th of 1% in this example):

Securities[symbol].SlippageModel = new ConstantSlippageModel(0.001m);


All that said, there really is no good way to model bid/ask in a backtest, because in the real world, placing a large-ish limit order often scares off real world traders.

QuantConnect uses L1 data (bid and ask quotes) for its US Equities Backtesting.

QuantConnect has a full break down of the data library, including free data for download in LEAN format at the data library page: https://www.quantconnect.com/data

The open-source LEAN algorithmic trading engine can support trades and quotes, however, on QuantConnect website the free data library is:

US Equities - Trades and Quotes data in tick, second, minute, hour and daily bars. Quote data was added to backtesting in April 2020.

US Fundamentals - MorningStar corporation fundamentals.

FOREX & CFD - Quotes; Tick, second, minute, hour and daily bars for FXCM and Oanda market providers. Bars are from the midpoint of the quote data.

US Options - Trade and Quote Minute Bars.

US Futures - Trades, Quotes; Tick, second, minute, hour and daily bars.

(Disclosure, I am the Founder of QuantConnect)

Edit: Updated state of Futures and Options, and US Equity Quote.

• Hi Jared: I haven't used quantconnect but suppose that one needs historical one minute U.S quote data from say 6 months ago. Is that possible to obtain from quantconnect ? thanks. – mark leeds Apr 20 '20 at 15:10
• Hi Mark, we do not sell data at this time but are considering it as we expand into supporting companies better. – JaredBroad Jun 15 '20 at 14:26
• Hi Jared: Thanks. Can you let me know if that happens. – mark leeds Jun 16 '20 at 14:22