
Explore multi-strategy algorithmic trading from scratch in python, drawing on industry and academic insights. Require prior programming methodology and quantitative literacy, because this is not an introductory statistics programming course.
Learn to fetch S&P 500 tickers by installing tools, coding in Python 3.6, using Visual Studio Code, scraping Wikipedia for S&P instruments, and building a function to extract symbols.
Gather ten years of open, high, low, close, and volume data for S&P 500 tickers via Yahoo Finance API, rename five columns, ignore dividends and splits, and handle missing data.
Fill missing Yahoo Finance data with forward fill to recent value, avoid backfill to reduce bias, assess return and activity statistics for risk management, and exclude assets not actively traded.
Store Python objects to disk and load them later to avoid re-fetching the S&P 500 data, using pickled objects for subsequent runs.
Develop your private Python code library by creating a root folder environment with shared dependencies for multiple projects, and follow software engineering design principles to keep it scalable and reusable.
Examine the system architecture with a data component pulling data from multiple sources such as Wife Finance, Bloomberg, and Quando, then unify subsystems into a single alpha signal for trades.
Harvest the momentum factor in equity returns by using moving averages of stock pairs and initialize a 30-stock S&P universe with volatility targeting and voting to weight returns.
Implement indicators, utility functions, and default indicator constants for the indicator calculator to support indicators across the system, emphasizing separation of concerns and core design principles.
Integrate the strategies API interface into the main driver and momentum class, enabling subsystems to access the strategy and run long past momentum from the driver.
Implement a long biased time series momentum strategy by sizing positions, evaluate the strategy scale—risk, market exposure, and volatility—assess relative risk and alpha, then compute the strategy panel and test.
Demonstrate how to obtain strategy data and perform calculations, compare capital return and leverage to the previous day, and assign two relative positions to manage risk exposure based on equity.
Establish a rest API connection to Oanda by configuring authentication tokens and environment in a config file, then implement wrapper classes to interact with the brokerage via an API client.
Implement wrapper functions for the client interface to Ovando brokerage and obtain Oanda OHLCV data in a standardized format aligned with the SNP dataset.
Identify the oanda config file to define the asset manifest and prune the asset universe to usd-denominated instruments, then fetch open, high, low, and volume data to initialize a database.
Replace s&p 500 dataset with event brokerage data. Fetch open, high, low, close, and volume via the brokerage trade client, then merge frames with a priority-based combined function for continuity.
Add fx information to the data by incorporating currencies beyond the US dollar and enabling cross-currency conversions. Augment the historical database with effects codes to support broader currency-aware trading insights.
Implement a master configuration file to manage portfolio settings and run the long biased momentum strategy via the brokerage configuration, avoiding code changes by adjusting the file.
Implement an fx calculator to test contracts in multiple currencies, convert dollar and price changes to a common currency, and validate exposure, treated instruments as positions, with volatility-based sizing.
Refactor the system to add more subsystems and test multiple strategies at once. Integrate the momentum strategy to enable testing across all strategies.
Implement a long-short momentum strategy with a 50/50 allocation, define the asset universe including crypto, commodities, metals, and bonds, and adjust alpha for regime biases.
Implement diagnostic tools to gauge the health of the trading system by retrieving key performance indicators and ratios, including shot, drawdown, coma ratio, and salty ratios, noting Gaussian return assumptions.
Run diagnostic tools to identify issues, then stabilize a quantitative trading strategy by setting a nominal leverage cap to control portfolio volatility and capital exposure, reducing risk and unhealthy positions.
Explore the securities premium as a factor return in commodity futures, filtering non-commodities, and trade by shorting the most positive and long the negative skewed assets using 60-day Q statistics.
Combine the three strategy signals into a unified portfolio signal, then debug and run the strategy to evaluate how allocations perform at the portfolio level.
Explore the static allocation framework within a vol target framework, adjust rate allocations, and apply a leverage cap to control nominal exposure across the portfolio.
Victoria implements a service class API to obtain the optimal live-trading allocation, including the get order specifics function, contract sizes, and mapping external brokerage codes to unique internal asset labels.
Complete the service class API implementation and create an order config by finalizing the Orlando Savage class API.
Develop infrastructure to integrate service clients with the main driver, enabling live optimal allocations and seamless integration with the brokerage.
Implement function structure and added positions logic, using enumerations to define constants, and implement the market order and open positions functions, including handling sensitive brokerage information.
Complete internal order logic for opening new positions; integrate with other brokerages via rest APIs through the Darwin Expert Bridge, using the application layer of the OSI model and TCP.
Set up the Python client with the zero and key connector and install the Darwin terminal from the brokerage site, using the Darwin extra tube channel for guidance.
Test the Python client connection to an open MT4 terminal via a TCP socket using the zero and two connector, ensuring the antifraud terminal message is received before printing.
Modify the script and the Python client to obtain information about brokerage accounts. Update the TCP connection inside the Python client to reflect the new TCP sockets setup.
Download a script from the Darwin Next website to identify tradable assets, then write and clean up the Darwin X configuration file to match the window configuration.
Continue writing the Darwin X configuration files to align with contract specifications for the Darwinex wrapper API and configs.
Implement the Darwinex service client to manage internal logic with a consistent naming convention, assuming USD nominations, and limit to USD pairs for faster testing, removing a subset of equities.
Implement the Darwinex trade client for the index brokerage, as part of building multi-strategy quant systems in Python.
implement a master switch in the master configuration to toggle between two brokerages, including Darwinex, via portfolio settings, enabling changes without modifying code.
implement the cpa function for assets and prepare a database, and address lcp data gaps caused by a tcp socket, holding data until the message arrives.
Demonstrates how to integrate the Darwinex data pipeline by addressing data gaps in MetaTrader with manual downloads and alternative data sources, including Yahoo Finance, for testing from 2018 onward.
Integrate darwinex strategy configs to test strategy performance by net assets on the loan by instrument and functional medicine, while finishing market setup for client-focused events.
Multi-Strategy Quant Systems in Python from Scratch - A First Course in Algorithmic Trading by HangukQuant.
As this is not a Python tutorial, we get right down to business and adopt a no-nonsense coding approach. It is advised that you slow down the pace of the course to your own needs. Even though only 7 hours of lectures have been distilled, the material within is fairly heavy. It is a walkthrough without the introductory explanations - since there are no explanations within the lecture walkthroughs, all students are expected to be hands-on and actively participate by asking questions; which we will compile in the Questions Section. Code is downloadable in Checkpoint Lectures.
Watch a (sped-up) live recording of a quant implementing a shoestring trading system for non-HFT in Python, from data pipelines to order management. Build robust and flexible modular systems + take home a professional setup to adapt and improve.
HangukQuant is the author of the quant trading blog on Substack- Mathematics, Finance and Their Babies, with many years of experience in quant trading.
Implement a Multi Strategy Quantitative System in Python from Scratch, while learning how to build robust frameworks for implementation of alpha signals and capital allocation. Learn industry standards in risk management, such as volatility targeting schemes and technical diversification. Code along an algorithmic trading system with modular approaches to integrate with multiple brokerages and switch between them in a matter of seconds, all with the same code.
Build diagnostic tools to analyse your trading system.
Integrate with multiple brokerages in a single code base.
Learn industry standards in risk management, such as volatility targeting schemes and technical diversification.
Take back with you the final product - Your Very Own, Robust Quant Systems to hone and develop!
Build quantitative strategies implementing factor premia and be given guidance for serious students of the market.
This course is not a beginner course; financial literacy, and programming methodology is expected. Students are expected to be able to understand code without being prompted, or at least learn how to comprehend medium-sized code systems of thousands of lines of code.
The course was first recorded and then sped up and voiced over chosen sections to meet Udemy course requirements. You may also choose to code along without the audio as the textual explanations should be primarily useful. As the course is an Advanced-Intermediate level, do note that you may face some difficulties along the way. It is expected that you would need to rewatch some of the lectures, and please do ask away in the Questions Section.
Those without programming experience are encouraged to first undergo courses in Python / Programming Methodology / Data Science for Finance courses.
Note that this course is not part of the Udemy Deals program, and no Udemy promotions are available. We believe that the material within is highly valuable and the cost price is cost de minimis in your quant journey.