Or Quantopian?

How about Python libraries like ultrafinance and PyAlgoTrader?


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 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 only; tick, second, minute, hour and daily bars. Quote data is expected in August 2019.

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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