Quant Mashup - Hudson and Thames

Dynamically combining mean reversion and momentum strategies [Hudson and Thames]

Exploring Mean Reversion and Momentum Strategies in Arbitrage Trading Our recent reading group examined mean reversion and momentum strategies, drawing insights from the article, “Dynamically combining mean reversion and momentum investment strategies” by James Velissaris. The aim of the paper

*- 4 months ago, 11 Oct 2023, 03:22am -*

Taking your MLFinLab strategy live [Hudson and Thames]

Executing a live trading strategy can be a daunting task. From analyzing market data and identifying trading signals to deploying and monitoring trades in real-time, the process requires precision, speed, and accuracy. Fortunately, advancements in technology have paved the way for innovative

*- 7 months ago, 30 Jun 2023, 05:30pm -*

Machine Learning Trading Essentials (Part 2): Fractionally differentiated features, Filtering, and Labelling [Hudson and Thames]

Welcome back, fellow traders and machine learning enthusiasts! We hope you’ve been enjoying our journey towards building a successful machine learning trading strategy. If you missed Part 1 of our series, don’t fret – you can always catch up on our exploration of various financial data

*- 9 months ago, 27 Apr 2023, 02:12am -*

Machine Learning Trading Essentials (Part 1): Financial Data Structures [Hudson and Thames]

Trading in financial markets can be a challenging and complex endeavour, with ever-changing conditions and numerous factors to consider. With markets becoming increasingly competitive all the time, it is a never ending struggle to stay ahead of the curve. Machine learning (ML) has made several

*- 10 months ago, 13 Apr 2023, 10:17pm -*

Experimental Design and Common Pitfalls of Machine Learning in Finance [Hudson and Thames]

The first lecture from the Experimental Design and Common Pitfalls of Machine Learning in Finance series addresses the four horsemen that present a barrier to adopting the scientific approach to machine learning in finance. The second lecture focuses on a protocol for backtesting and how to avoid

*- 1 year ago, 13 Dec 2022, 09:42pm -*

QuantConnect Integration with MlFinLab [Hudson and Thames]

Announcing that MlFinLab is fully integrated into the powerful backtesting and execution platform of QuantConnect! At the start of 2022, we set out to improve the user experience across all of our products and to improve the accessibility of our libraries. This meant integrations into platforms that

*- 1 year ago, 21 Oct 2022, 11:07am -*

How to Build the Best Quant Team in the World [Hudson and Thames]

Building on our last article regarding best practices for quantitative finance research groups, this article asks the question: What is the best setup and culture for a quant team? This question may have different answers depending on who you ask. Fortunately, there are some glimpses and statements

*- 2 years ago, 24 Jan 2022, 09:55am -*

Best Research Practices for Your Quant Group [Hudson and Thames]

It’s early in the morning and the markets are about to open. As an individual trader/investor, or perhaps the manager of a group of traders/investors, you are intensely studying the latest news feed that you think may have an impact on your portfolio. Amongst the other plethora of tools at your

*- 2 years ago, 19 Jan 2022, 10:26am -*

Pairs Trading Based on Renko and Kagi Models [Hudson and Thames]

A group of strategies, named statistical arbitrage or pairs trading strategies are well-known for being market-neutral gained their popularity among institutional and individual investors. In general, to develop a pairs trading strategy, one needs to figure out two aspects, the first is how to

*- 2 years ago, 25 Oct 2021, 11:58am -*

Pairs Trading with Markov Regime-Switching Model [Hudson and Thames]

Traditional pairs trading strategies are prone to failures when fundamental or economic reasons cause a structural break and the pair of assets that were expected to move together are no longer having a strong relationship. Such a break may result in asset price spread having abnormally high

*- 2 years ago, 18 Oct 2021, 10:36am -*

Optimal Trading Thresholds for the O-U Process [Hudson and Thames]

Pairs trading or statistical arbitrage is a famous strategy among institutional and individual investors since the 1990s. The concept behind this kind of strategy is straightforward. If the prices of assets move together historically, this tendency is likely to continue in the future. When the

*- 2 years ago, 11 Oct 2021, 10:23pm -*

Introduction to Hedge Ratio Estimation Methods [Hudson and Thames]

The hedge ratio estimation problem is one of the most important issues for portfolio managers. The key concept of the hedging problem can be posed as the following equation: S_{t}=P_{1, t}+\sum_{n=2}^{N} \omega_{n} P_{n, t} where P_1 represents the market value at observation t of a portfolio we

*- 2 years ago, 7 Sep 2021, 11:35am -*

Caveats in Calibrating the OU Process [Hudson and Thames]

This is a series where we aim to cover in detail various aspects of the classic Ornstein-Uhlenbeck (OU) model and the Ornstein-Uhlenbeck Jump (OUJ) model, with applications focusing on mean-reverting spread modeling under the context of pairs trading or statistical arbitrage. Given the universality

*- 2 years ago, 30 Aug 2021, 08:22pm -*

Extended Optimal Arbitrage Strategies [Hudson and Thames]

In our previous article, we’ve discussed a couple of trading strategies exploiting arbitrage between similar stocks using stochastic optimal control methods. A major shortcoming of those approaches is that we restricted ourselves to constructing delta-neutral portfolios. Along with this, the ratio

*- 2 years ago, 9 Aug 2021, 11:33am -*

Distance Approach in Pairs Trading: Part II [Hudson and Thames]

We have discussed Basic Distance Approach in the previous blog post. In this post, we’ll look into one of the advanced methods in the Distance Approach and its differences to the Basic Distance Approach. If you haven’t read the previous blog post, we recommend reading it before you read this

*- 2 years ago, 3 Aug 2021, 11:08am -*

Intro to Partial Sample Regression [Hudson and Thames]

Ordinary least squares (OLS) regression is probably the most commonly used statistical method in quantitative finance (and likely in other quantitative fields). It is very fast to compute, and the results are often quite interpretable. Due to its simplicity, it serves as the cornerstone for many

*- 2 years ago, 27 Jul 2021, 10:59am -*

Distance Approach in Pairs Trading: Part I [Hudson and Thames]

There are many types of approaches you can use in pairs trading, but the Distance Approach is one of the most widely used because of its simplicity. The basic concept is as follows: Using Euclidean squared distance on the normalized price time series, n closest pairs of assets are chosen as pairs. S

*- 2 years ago, 29 Jun 2021, 11:51am -*

Introducing: Arbitragelab Tear Sheets [Hudson and Thames]

Pairs selection is the first crucial step to building a pairs trading strategy. And it is no surprise, to perform it correctly, one must diligently examine, compare and contrast numerous test results, graphs and characteristics. For example, cointegration analysis alone can be performed in one of

*- 2 years ago, 24 Jun 2021, 08:21pm -*

Pairs Trading with Stochastic Control and OU process [Hudson and Thames]

The concept of pairs trading is pretty straightforward. As described in [Gatev et al. (2006)], we first find two stocks that have moved together historically and then monitor the spread between these stocks. If the prices of the two stocks diverge, we short the winner and go long on the loser,

*- 2 years ago, 22 Jun 2021, 07:29pm -*

Copula for Statistical Arbitrage: C-Vine Copula Trading [Hudson and Thames]

This is the sixth article of the copula-based statistical arbitrage series. You can read all the articles in chronological order below. In this series, we dedicate articles 1-3 to pairs-trading using bivariate copulas and 4-6 to multi-assets statistical arbitrage using vine copulas. Copula for Pairs

*- 2 years ago, 10 May 2021, 09:07pm -*

Copula for Statistical Arbitrage: Stocks Selection [Hudson and Thames]

This is the fifth article of the copula-based statistical arbitrage series. You can read the previous four articles with the first three focusing on pairs-trading: Copula for Pairs Trading: A Detailed, But Practical Introduction. Copula for Pairs Trading: Sampling and Fitting to Data. Copula for

*- 2 years ago, 28 Apr 2021, 11:31pm -*

Copula for Statistical Arbitrage: Intro to Vine Copula [Hudson and Thames]

Copula is a great statistical tool to study the relation among multiple random variables: By focusing on the joint cumulative density of quantiles of marginals, we can bypass the idiosyncratic features of marginal distributions and directly look at how they are “related”. Indeed, traders and

*- 2 years ago, 14 Apr 2021, 09:53pm -*

The Definitive Guide to Pairs Trading [Hudson and Thames]

Born at Morgan Stanley in the late 1980s, under the wing of Nunzio Tartaglia and his team, who later split up to start several of the world’s best hedge funds, namely PDT Partners and D.E. Shaw (which then lead to Two Sigma). Pairs trading has proven to be a popular and sophisticated trading

*- 2 years ago, 12 Apr 2021, 10:50am -*

Minimum Profit Optimization: Mean-reversion Trading [Hudson and Thames]

In my previous articles, I introduced how to construct long-short asset pairs according to the concept of cointegration and how to build a sparse mean-reverting multi-asset portfolio. Now that we are able to answer the question “what to trade” with confidence, it is time to get down to the

*- 2 years ago, 30 Mar 2021, 11:12am -*

Sparse Mean-reverting Portfolio Selection [Hudson and Thames]

“Buy low, sell high.” One cannot find a more succinct summary of a mean-reversion trading strategy; however, single assets that show stable mean-reversion over a significant period of time such that a mean-reversion trading strategy can readily become profitable are rare to find in markets

*- 2 years ago, 22 Feb 2021, 10:08am -*

Copula for Pairs Trading: Strategies Overview [Hudson and Thames]

This is the third article of the copula-based statistical arbitrage series. You can read the previous two articles: Copula for Pairs Trading: A Detailed, But Practical Introduction. Copula for Pairs Trading: Sampling and Fitting to Data. Introduction Systematic approaches of pairs trading gained

*- 3 years ago, 17 Feb 2021, 08:25am -*

Advanced Pairs Trading Lecture Videos [Hudson and Thames]

ArbitrageLab is a python library filled with algorithms from the best academic journals and graduate-level textbooks, which focuses on the branch of statistical arbitrage known as pairs trading. This playlist is a series of lecture videos that explore advanced topics and highlight how your team can

*- 3 years ago, 15 Feb 2021, 11:06am -*

Copula for Pairs Trading: Sampling and Fitting to Data [Hudson and Thames]

This is the second article of the copula-based statistical arbitrage series. You can read the first article: Copula for Pairs Trading: A Detailed, But Practical Introduction. Overview Whether it is for pairs trading or risk management, two natural questions to ask before putting copula for use are:

*- 3 years ago, 5 Feb 2021, 10:14am -*

The Correct Vectorized Backtest Methodology for Pairs Trading [Hudson and Thames]

Whilst backtesting architectures is a topic on its own, this article dives into how to correctly backtest a pairs trading investment strategy using a vectorized (quick methodology) rather than the more robust event-driven architecture. This is a technique that is very common amongst analysts and is

*- 3 years ago, 27 Jan 2021, 10:29am -*

Machine Learning for Trading Pairs Selection [Hudson and Thames]

In this post, we will investigate and showcase a machine learning selection framework that will aid traders in finding mean-reverting opportunities. This framework is based on the book: “A Machine Learning based Pairs Trading Investment Strategy” by Sarmento and Horta. A time series is known to

*- 3 years ago, 26 Jan 2021, 09:59am -*

Copula for Pairs Trading: A Detailed, But Practical Introduction [Hudson and Thames]

Suppose that you encountered a promising pair of stocks that move closely together, the spread zig-zagged around 0 like some fine needle stitching that sure looks like a nice candidate for mean-reversion bets. What’s more, you find out that the two stocks’ prices for the past 2 years are all

*- 3 years ago, 21 Jan 2021, 05:41am -*

An Introduction to Cointegration for Pairs Trading [Hudson and Thames]

Cointegration, a concept that helped Clive W.J. Granger win the Nobel Prize in Economics in 2003 (see Footnote 1), is a cornerstone of pairs and multi-asset trading strategies. Anecdotally, forty years have passed since Granger coined the term “cointegration” in his seminal paper “Some

*- 3 years ago, 20 Jan 2021, 07:46pm -*

Bayesian Portfolio Optimisation: Introducing the Black-Litterman Model [Hudson and Thames]

The Black-Litterman (BL) model is one of the many successfully used portfolio allocation models out there. Developed by Fischer Black and Robert Litterman at Goldman Sachs, it combines Capital Asset Pricing Theory (CAPM) with Bayesian statistics and Markowitz’s modern portfolio theory

*- 3 years ago, 13 Jan 2021, 10:08am -*

ArbitrageLab Release Update [Hudson and Thames]

ArbitrageLab is a python library that helps traders who want to exploit mean-reverting portfolios by providing a complete set of algorithms from the best academic journals. How to Get Access Recently there has been a lot of interest in the development of our most recent library which focuses

*- 3 years ago, 20 Oct 2020, 09:38pm -*

Discrimination of Correlated Random Walk Time Series using GNPR [Hudson and Thames]

Discriminating random variables on time-series on both their distribution and dependence information is motivated by the study of financial assets returns. For example, given two assets where their returns are perfectly correlated, are these returns always similar from a risk perspective? According

*- 3 years ago, 18 Oct 2020, 08:55pm -*

Exploring the PMFG Portfolios for Covid-19 Robustness [Hudson and Thames]

Pozzi, Di Matteo, and Aste (2013) conclude that it is “better to invest in the peripheries” of the Planar Maximally Filtered Graph (PMFG), as investing in the peripheries lead to better returns, and reduced risk. This blog post explores the impacts of Covid-19 by simulating two investment

*- 3 years ago, 4 Oct 2020, 10:51pm -*

Optimal Stopping in Pairs Trading: Ornstein-Uhlenbeck Model [Hudson and Thames]

Nothing makes a situation better like good timing. Whether it’s getting a promotion, catching the last train after a night out, meeting the love of your life, or joining a quant community – it is many of small consequential gambles of stopping decisions that get us to that triumphant “Yes!”

*- 3 years ago, 21 Sep 2020, 09:17pm -*

Networks with MlFinLab: Minimum Spanning Tree (MST) [Hudson and Thames]

Network analysis can provide interesting insights into the dynamics of the market, and the continually changing behaviour. A Minimum Spanning Tree (MST) is a useful method of analyzing complex networks, for aspects such as risk management, portfolio design, and trading strategies. For example,

*- 3 years ago, 14 Sep 2020, 10:49am -*

CorrGAN: Realistic Financial Correlation Matrices [Hudson and Thames]

There are 6 properties that empirical correlation matrices exhibit that no synthetic generation method has been able to replicate, until now. Enabling researchers to backtest strategies on an abundance of data would make our algorithms and strategies more robust, accurate, and efficient. Since

*- 3 years ago, 7 Sep 2020, 11:16am -*

Portfolio Optimisation with MlFinLab: Mean-Variance Optimisation [Hudson and Thames]

For a long while, investors worked under the assumption that the risk and return relationship of a portfolio was linear, meaning that if an investor wanted higher returns, they would have to take on a higher level of risk. This assumption changed when in 1952, Harry Markowitz introduced Modern

*- 3 years ago, 1 Sep 2020, 12:32pm -*

Portfolio Optimisation with MlFinLab: Estimation of Risk [Hudson and Thames]

Risk has always played a very large role in the world of finance with the performance of a large number of investment and trading strategies being dependent on the efficient estimation of underlying market risk. With regards to this, one of the most popular and commonly used representation of risk

*- 3 years ago, 9 Aug 2020, 10:43pm -*

10 Learnings from Open Source [Hudson and Thames]

As many of you will know by now, Hudson & Thames is pivoting towards an open-core business model and away from our dreams of pure open source and the “unlocking the commons”. What follows is a very brief history of our learnings with open-source. Starting Out MlFinLab started as an ambitious

*- 3 years ago, 8 Aug 2020, 09:51am -*

Portfolio Optimisation with MlFinLab: Hierarchical Equal Risk Contribution [Hudson and Thames]

Harry Markowitz’s Modern Portfolio Theory (MPT) was seen as an amazing accomplishment in portfolio optimization, earning him a Nobel Prize for his work. it is based on the hypothesis that investors can optimize their portfolios based on a given level of risk. While this theory works very well

*- 3 years ago, 2 Aug 2020, 08:59pm -*

Portfolio Optimisation with MlFinLab: Theory-Implied Correlation Matrix [Hudson and Thames]

Traditionally, correlation matrices have always played a large role in finance. They have been used in tasks ranging from portfolio management to risk management and are calculated based on historical empirical observations. Although they are used so frequently, these correlation matrices often have

*- 3 years ago, 13 Jul 2020, 11:01am -*

Beyond Risk Parity: The Hierarchical Equal Risk Contribution Algorithm [Hudson and Thames]

As diversification is the only free lunch in finance, the Hierarchical Equal Risk Contribution Portfolio (HERC) aims at diversifying capital allocation and risk allocation. Briefly, the principle is to retain the correlations that really matter and once the assets are hierarchically clustered, a

*- 3 years ago, 6 Jul 2020, 09:34am -*

Portfolio Optimisation with MlFinLab: Hierarchical Risk Parity [Hudson and Thames]

In 2016, Dr. Marcos Lopez de Prado introduced the Hierarchical Risk Parity (HRP) algorithm for portfolio optimization. Prior to this, Harry Markowitz’s Modern Portfolio Theory (MPT) was used as an industry-wide benchmark for portfolio optimization. MPT was an amazing accomplishment in the field of

*- 3 years ago, 22 Jun 2020, 05:16am -*

Online Portfolio Selection: Pattern Matching [Hudson and Thames]

Pattern matching locates similarly acting historical market windows and makes future predictions based on the similarity. They combine the strengths of both momentum and mean reversion by exploiting the statistical correlations of the current market window to the past. In the following blog post, we

*- 3 years ago, 31 May 2020, 10:48pm -*

Online Portfolio Selection: Mean Reversion [Hudson and Thames]

Mean Reversion is an effective quantitative strategy based on the theory that prices will revert back to its historical mean. A basic example of mean reversion follows the benchmark of Constant Rebalanced Portfolio. By setting a predetermined allocation of weight to each asset, the portfolio shifts

*- 3 years ago, 10 May 2020, 10:03pm -*

Online Portfolio Selection: Momentum [Hudson and Thames]

Today we will be exploring the second chapter of our newest online portfolio selection module, momentum. Momentum strategies have been a popular quantitative strategy in recent decades as the simple but powerful trend-following allows investors to exponentially increase their returns. This module

*- 3 years ago, 4 May 2020, 09:27am -*

Introducing Online Portfolio Selection [Hudson and Thames]

Online Portfolio Selection is an algorithmic trading strategy that sequentially allocates capital among a group of assets to maximize the final returns of the investment. Traditional theories for portfolio selection, such as Markowitz’s Modern Portfolio Theory, optimize the balance between the

*- 3 years ago, 27 Apr 2020, 10:49am -*