Module 3
Content
• Financial Data
• Backtesting Frameworks and Platforms
• QuantConnect Tutorial
• Case Study: Design a primitive trading strategy and backtest it
Free, or Almost Free Data
• Alpha Vantage
• Stock and ETF, Forex, Cryptocurrencies, Technical indicators, Sector performances
• Intraday or daily and above, Up to 20 years
• API in Python and other languages [Link] (For example,
[Link]
• Nasdaq Data (formerly Quandl)
• Futures, Stocks (until 2018/3/27), Economic Data, Global index, Short interest data
• Daily data API in Python
• Yahoo Finance, Google Finance
• API in Python
• Not recommended for real research or trading
Free, or Almost Free Data
• Free on the cloud: Quantconnect with free account tier
• Free with the book: machine-learning-for-trading
• Free but less organized: Kaggle
• Free from brokers: interactive brokers, tradier, etc.
Affordable Data
• IEX Cloud
• [Link]
• Marketdata
• Alpaca
• [Link]
• [Link]
• Any many others…
Backtesting Frameworks and
Platform
• Backtrader
• Zipline/Quantopian
• Blueshift
• Lean/QuantConnect
• Algotrade
• Bt
• Finmarketpy
• [Link]
• IBridgePy
QuantConnect Tutorial
Introducing the Algo Lab
Step 1
• Sign up/Sign in
• Enter Algorithm Lab
Step 2
• In the left menu, choose “Projects”
Projects
• Choose “Create New Algorithm”
Step 3
• Choose “Use Default Template”.
Step 4
Computational Resources
• Backtest Node Cluster
• .py files
• Research Node Cluster
• .ipynb files
• Live trading Node Cluster
• We will not use them
Before you start coding
You can
• Organize the files
• change the project’s name to “Folder Y/Project X”
• Share files
• Not available for free-tier account
• Clone files
• it is a good idea to modify a file cloned from existing source
• For example, you can copy and paste the code from the last box in
“Module3_SMA.ipynb”
Case Study: Design a primitive
trading strategy and backtest it
• See the Jupyter Notebook “Module3_SMA.ipynb”