Key Concepts

Getting Started


Quantitative trading is a method of trading where computer programs execute a set of defined trading rules in an automated fashion. Quants take a scientific approach to trading, applying concepts from mathematics, time series analysis, statistics, computer science, and machine learning. Compared to discretionary traders, quants can respond faster to new information and are at less risk to their emotions during trades. Since quants can concurrently trade many strategies while discretionary traders only have the mental bandwidth to trade a small number of concurrent strategies, quant traders can have more diversified portfolios.

Learn Programming

We aim to make it as easy as possible to use QuantConnect, but you still need to be able to program. The following table provides some resources to get you started:

C# Video C# Fundamentals for Absolute BeginnersMicrosoft
C# Text C# Jump Start - Advanced ConceptsMicrosoft
C# Video Top 20 C# QuestionsMicrosoft
C# Text C# Tutorialtutorialspoint
Python Text Introduction to Financial PythonQuantConnect
Python Text/Video Introduction to PythonGoogle
Python Interactive Code Academy - PythonCode Academy
Python Text Python Pandas Tutorialtutorialspoint

Learn Jupyter

The following table lists some helpful resources to learn Jupyter:

Text Jupyter Tutorialtutorialspoint
Text Jupyter Notebook Tutorial: The Definitive GuideDataCamp


The following snippet demonstrates how to use the Research Environment to plot the price and Bollinger Bands of the S&P 500 index ETF, SPY:

The following snippet demonstrates how to use the Research Environment to print the price of the S&P 500 index ETF, SPY:

// Load the required assembly files and data types
#load "../Initialize.csx"
#load "../QuantConnect.csx"
using QuantConnect;
using QuantConnect.Data;
using QuantConnect.Algorithm;
using QuantConnect.Research;

// Create a QuantBook
var qb = new QuantBook();

// Create a security subscription
var symbol = qb.AddEquity("SPY").Symbol;

// Request some historical data
var history = qb.History(symbol, 70, Resolution.Daily);

foreach (var tradeBar in history)
    Console.WriteLine($"{tradeBar.EndTime} :: {tradeBar.ToString()}");
# Create a QuantBook
qb = QuantBook()

# Create a security subscription
spy = qb.AddEquity("SPY")

# Request some historical data
history = qb.History(qb.Securities.Keys, 360, Resolution.Daily)

# Calculate the Bollinger Bands
bbdf = qb.Indicator(BollingerBands(30, 2), spy.Symbol, 360, Resolution.Daily)

# Plot the data
bbdf.drop('standarddeviation', 1).plot()

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: