QuantConnect & Alpaca Leverage Community-Driven, End-to-End Quant Trading Platform

Extensive research, cloud backtesting, responsive live trading and more available for Alpaca users

QuantConnect powers hedge funds, brokerages, and individuals

301k

Quant Community

500k+

monthly backtests

$5B

volume per month

150+

demo strategies

Powerful Tools for Quant Trading

QuantConnect enhances your algo trading with a cutting-edge API and suite of financial tools including rich data libraries, cloud backtesting, parameter optimization and more.

Extensive Strategies, Comprehensive Assets

Leverage thousands of example live trading strategies from QuantConnect for stock, ETFs, options and crypto.

Commission-Free Trades with Alpaca

Invest in over 11,000 stocks, ETFs, and options with zero commission using your Alpaca account directly in QuantConnect.

1 Create your free Alpaca account
Create your free Alpaca account
2 Sign up to QuantConnect
Sign up to QuantConnect
3 Build and backtest your trading strategy
Build and backtest your trading strategy
4 Deploy with Alpaca for commission-free trading
Deploy with Alpaca for commission-free trading
Create your free Alpaca account
Sign up to QuantConnect
Build and backtest your trading strategy
Deploy with Alpaca for commission-free trading
1 2 3 4 5 6 7 8 9 10 11 12
class BasicTemplateAlgorithm(QCAlgorithm):
    def initialize(self):
        ‘‘‘Initialize the data and resolution required, as well
        as the cash and start-end dates for your algorithm. All
        algorithms must initialized.’’’
        self.set_brokerage_model(BrokerageName.ALPACA,AccountType.MARGIN)
    def on_data(self, on_data):
        ‘‘‘OnData event is the primary entry point for your
        algorithm. Each new data point will be pumped in here.
        data is a Slice object keyed by symbol containing the
        stock data’’’
        pass

Connect your Alpaca account with QuantConnect today

Create Free Account