Now open source!
The course material consists of 'notebooks' that contain text together with interactive code like this one. You will be able to learn by interacting with the code and modifying it to your own liking. It will be a great starting point for writing your own strategies
While some topics are explained in great detail to help you understand the underlying concepts, in most cases you won't even need to write your own low-level code, because of support by existing open-source libraries : TradingWithPython library combines much of the functionality discussed in this course as a ready-to-use functions and will be used throughout the course. Pandas will provide you with all of the heavy-lifting power needed in data crunching.
The course focuses as much as possible on hands-on examples of real problems involved in quantitative trading. We will start with setting up developing environment and getting historic price data. After that we will backtest a couple of typical trading strategies. Theoretical part (math & computer science) will be kept to a minimum and only treated where needed.
We will start by setting up a Python environment and get a basic feel of the language. Then we will jump right in and use case studies to get accustomed to working with data aalysis and strategy development.
Introduction
Preface
Installation
Development tools
IPython
Source code editors
Jupyter notebook
Overview of python basics
Working with modules
Visualizing data
Visualization with matplotlib
Plotting with Pandas
Bokeh plots
TWP plotting class
Simulating leveraged etfs
How about 3x leverage?
Day of week seasonality of SPY
Get the data
Working with dates and times
Analyse weekday seasonality
Working with csv files
Reading csv
Writing csv files
Building a stock price database
Download historic data
Multi-index
Save data to file
Load data from file
Performance metrics
Sharpe ratio
Drawdown
Profit ratio
Backtesting with TWP backtesting module
Test on real price data
Walk-forward moving averages strategy
Moving averages crossover strategy
Divide dataset
Develop strategy
Make a parameter scan
Conclusion
Permanent portfolio
Get price data
Simulate portfolio
Conclusion
XLP strategy
Rewrite strategy to a single function
Make a scan of ALL parameters
Conclusion
Improvements
Pairs trading examples
Get list of XLE components
Get the price data
Visualise dataset
Build spread and visualise data
Create a trading strategy
Conclusion
VXX strategy
Strategy thesis
Get the data
Get data from CBOE
Research relationship VIX-VIX3M
More precise simulation
Leveraged ETF backtest YTD
Create pairs
Nearest neighbors strategy
Strategy thesis
Prepare data
Create trader class
Conclusion
External references