Quant Mashup
Quantocracy is now on Bluesky and Threads. See the links in the header. - Mike
Using time series lag() in R finance [Babbage9010]
Backtesting quant strategies in R requires paying attention to how we lag() our time series. Here be dragons. Lagging a time series relative to another is important in many areas, but we use it a lot in backtesting financial strategies. I’ve struggled with the logic of lag() several times, and
- 1 year ago, 15 Nov 2023, 08:37pm -
Sector Rotation Strategy: Should Trading Rules Make Sense? [Alvarez Quant Trading]
I was doing my usual reading when I came across a sector rotation strategy. I have seen lots of these strategies but this one had a different twist. The strategy was a momentum strategy but instead of buying the top three, it was buying the middle three. The article gave no reason other than it
- 1 year ago, 15 Nov 2023, 08:37pm -
Small Trader Alpha: An Arbitrage Strategy in SPY Options [Return Sources]
In this post, I'll discuss in detail an arbitrage trade in SPY options that I'd been running for about a year. (Some of you may have read a short version of this in this twitter post). I'm no longer using it, but it's still a viable strategy to earn some extra money. To be clear,
- 1 year ago, 14 Nov 2023, 09:38pm -
Inflation surges - how long to return to normal? [Alpha Architect]
How long will it take for the current level of inflation to subside? If history is any guide, it could take quite a while. Across 198 policy interest rate hikes of at least 1%, a decrease of 1% in inflation took 2 to 4 years (Havranke and Rusnak, 2013). The authors of this research article conduct
- 1 year ago, 14 Nov 2023, 09:37pm -
Wiener–Khinchin theorem and Gaussian processes [OS Quant]
The Wiener-Khinchin theorem provides a clever way of building Gaussian processes for regression. I’ll show you this theorem in action with some Python code and how to use it to model a process. The Wiener-Khinchin theorem states that an autocovariance function of a weakly stationary process is a
- 1 year ago, 12 Nov 2023, 09:26pm -
An Exponenetially Weighted Covariance Matrix in R [Robot Wealth]
Exponential weighting schemes can help navigate the trade-off between responsiveness and stability of the inherently noisy estimates we make from market data. We previously saw examples of calculating the exponentially weighted moving average of a vector, and estimating the correlation between SPY
- 1 year ago, 12 Nov 2023, 07:02am -
Quant_rv performance over three decades [Babbage9010]
In recent posts we added nATR as a vol measure, went short instead of flat, and significantly improved quant_rv’s performance over our in-sample test period 2006-2019. Now we look at the more recent record including the Covid Swoon and Inflation Coaster, and the years prior from the Roaring 90s
- 1 year ago, 11 Nov 2023, 05:23pm -
The Performance of Major Private Equity/LBO Firms [Alpha Architect]
Attracted by the glamour and potential for lottery-like returns, global private equity (PE) assets under management reached $4.2 trillion in 2022. PE involves pooling capital to invest in private companies by providing venture capital (VC) to startups or by taking over and restructuring mature firms
- 1 year ago, 11 Nov 2023, 05:22pm -
Calibrating volatility smiles with SABR [PyQuant News]
In today’s newsletter, we’ll explore the SABR stochastic volatility model. It’s a very popular volatility model used by professionals for many types of derivatives. Today, we’ll look at how to calibrate the SABR parameters and use them to fit a volatility smile for equity options. Sound
- 1 year ago, 9 Nov 2023, 12:08am -
NEW CONTRIBUTOR: Improving Trend With Mean Reversion [Return Sources]
In a 2011 paper, “To Trade or Not to Trade? Informed Trading with Short-Term Signals for Long-Term Investors,” Roni Israelov discusses how investors could use short-term trading signals that are normally too costly to trade, such as short-term reversal. He describes using the short-term signal
- 1 year ago, 6 Nov 2023, 10:20pm -
Using Exponentially Weighted Moving Averages to navigate trade-offs in systematic trading [Robot Wealth]
A big part of the job of the indie trader is data analysis. We’re always looking in the past data to validate (or more often, invalidate) a hypothesis about what might predict future returns. And one could argue that recent data is more useful than past data, since it may reflect the current state
- 1 year ago, 6 Nov 2023, 10:20pm -
Sovereign debt sustainability and CDS returns [SR SV]
Selling protection through credit default swaps is akin to writing put options on sovereign default. Together with tenuous market liquidity, this explains the negative skew and heavy fat tails of generic CDS (short protection or long credit) returns. Since default risk depends critically on
- 1 year ago, 6 Nov 2023, 10:20pm -
Organization Capital and the Cross-Section of Expected Returns [Alpha Architect]
This paper focuses on “organization capital,” representing intangible assets in a firm’s key employees that is not captured by classic value measures such as book-to-market. The authors propose a structural model to analyze the impact of organizational capital on asset prices and argue that
- 1 year ago, 6 Nov 2023, 10:20pm -
CLOs - Diversifier, or another Equity Clone? [Finominal]
Multiple collateralized loan obligation (CLO) ETFs have been launched since 2020 CLOs are promoted as low-risk fixed-income products However, these simply represent diluted equity exposure and offer limited diversification benefits INTRODUCTION The U.S. leveraged loan market has increased from $100
- 1 year ago, 6 Nov 2023, 10:19pm -
Technology Spillover Impacts Stock Returns [Alpha Architect]
The increasing role of intangible assets compared to physical assets in our economy has been accompanied by increased research into their impact on asset prices and returns. Studies such as the 2020 papers “Explaining the Recent Failure of Value Investing,” “Intangible Capital and the Value
- 1 year ago, 6 Nov 2023, 10:19pm -
Inflation and Stock/Treasury Correlation [Allocate Smartly]
There has been a surge in correlation between US stocks and Treasuries over the last couple of years. To illustrate, below we’ve shown the rolling 3-year correlation between US stocks and 10-year Treasuries since 1900 (based on monthly returns). Note the spike at the far right of the chart. What
- 1 year ago, 3 Nov 2023, 08:00am -
Big boost for quant_rv going long/short SPY/SH (Part 11) [Babbage9010]
sum: quant_rv was already beating SPY in our last post, with a long-only approach. Testing the remaining (flat) days finds that they’re dominated by losers, so if we go short (using SH ETF) instead of flat, boom! performance jumps again recap quant_rv is a simple quant strategy written in R that
- 1 year ago, 2 Nov 2023, 02:15am -
Index Tracking: Reproducing the Performance of a Financial Market Index (and more) [Portfolio Optimizer]
An index tracking portfolio1 is a portfolio designed to track as closely2 as possible a financial market index when its exact replication3 is either impractical or impossible due to various reasons4 (transaction costs, liquidity issues, licensing requirements…). In this blog post, after reviewing
- 1 year ago, 1 Nov 2023, 02:15am -
Higher Volatility, Higher Alpha? [Finominal]
Intuitively fund managers should create more alpha when volatility is higher However, neither mutual nor hedge fund managers have been able to do so Likely explained by fund managers being less rational than assumed INTRODUCTION “However, a period of higher volatility is ‘a good environment for
- 1 year ago, 1 Nov 2023, 02:14am -
Dissecting the Idiosyncratic Volatility Puzzle [Alpha Architect]
Idiosyncratic volatility (IVOL) is the volatility of a security that cannot be explained by overall market volatility—it is the risk unique to a particular security. IVOL contrasts with systematic risk, which is the risk that affects all securities in a market (such as changes in interest rates or
- 1 year ago, 29 Oct 2023, 10:13pm -
Part 10 quant_rv: getting somewhere now, by adding normalized ATR [Babbage9010]
TL;DR ~ This post explores adding a normalized Average True Range (nATR) measure that behaves in a similar fashion to other volatility measures, including a “low volatile anomaly” and nATR gives quant_rv a nice boost in backtesting performance. Not all goals for quant_rv are met yet, but we’re
- 1 year ago, 25 Oct 2023, 09:41pm -
Demystifying Equity Market Neutral Investing [Simplify]
The 60/40 portfolio, the bread-and-butter portfolio of today’s wealth management industry, is limited to just two core drivers of returns: equities and bonds. Is there someplace else we can turn to for a compelling yet distinct source of returns? Yes, there are several places to look in fact, one
- 1 year ago, 25 Oct 2023, 09:41pm -
Unmasking Insights through Human-AI Differences in Earnings Conference Q&A [Alpha Architect]
This paper acknowledges the pivotal role of earnings calls in disseminating value-relevant information, with particular emphasis on the Q&A segment. However, it confronts the inherent challenge posed by the unstructured nature of language in these calls, complicating quantitative analysis. In
- 1 year ago, 23 Oct 2023, 11:12pm -
Determining the Optimal Benchmark for Funds [Finominal]
SUMMARY Identifying the right benchmark for a fund or portfolio can be difficult Many common metrics like correlation or betas do poorly for benchmark selection Combining metrics is more effective INTRODUCTION Is gold the right benchmark for gold miners? Although these companies focus on excavating
- 1 year ago, 23 Oct 2023, 10:35pm -
Market Cap vs Dollar Volume: Which to Use for Universe Selection? [Quant Rocket]
Market cap and dollar volume are two commonly used metrics for filtering a trading universe by size of security. Does it matter which one you use? In this post, I quantify the difference between market cap and dollar volume and explain the kinds of stocks that may unexpectedly appear in your
- 1 year ago, 22 Oct 2023, 11:16pm -
Macro demand-based rates strategies [SR SV]
The pace of aggregate demand in the macroeconomy exerts pressure on interest rates. In credible inflation targeting regimes, excess demand should be negatively related to duration returns and positively to curve-flattening returns. Indeed, point-in-time market information states of various macro
- 1 year ago, 22 Oct 2023, 11:16pm -
How an old Nintendo baddie boosts portfolio analysis [PyQuant News]
Today’s newsletter is based on a reader’s suggestion. We look at k-medoids which is a villain in the popular Nintendo game Metroid. No it’s not. But if you know Metroid, you have to agree: It sounds like one! It’s actually a powerful method used in data science to cluster similar data
- 1 year ago, 22 Oct 2023, 11:16pm -
Volatility Forecasting: Simple and Exponentially Weighted Moving Average Models [Portfolio Optimizer]
One of the simplest and most pragmatic approach to volatility forecasting is to model the volatility of an asset as a weighted moving average of its past squared returns1. Two weighting schemes widely used by practitioners23 are the constant weighting scheme and the exponentially decreasing
- 1 year ago, 20 Oct 2023, 02:18am -
Hello ChatGPT, Can You Backtest Strategy for Me? [Quantpedia]
You may remember our blog post from the end of March, where we tested the current state-of-the-art LLM chatbot: Time flies fast. More than six months have passed since our last article, and half a year in a fast-developing field like Artificial intelligence feels like ten times more. So, we are here
- 1 year ago, 18 Oct 2023, 10:07pm -
Vector AutoRegression models: Implementation in Python and R [Quant Insti]
Whenever you want to estimate a model for multiple time series, the Vector Autoregression (VAR) model will serve you well. This model is suitable for handling multiple time series in a single model. You will learn here the theory, the intricacies, the issues and the implementation in Python and R.
- 1 year ago, 17 Oct 2023, 12:56am -
Momentum Research: a summary: high quality articles of note [Alpha Architect]
The Jegadeesh and Titman (1993) paper on momentum established that an equity trading strategy consisting of buying past winners and selling past losers, reliably produced risk-adjusted excess returns. The Jegadeesh results have been replicated in international markets and across asset classes. As
- 1 year ago, 17 Oct 2023, 12:56am -
Use OpenAI prompts for stock news sentiment [PyQuant News]
In today’s newsletter, you’ll use the OpenBB SDK to download news for a topic. Then, you’ll use OpenAI and build a prompt to predict the sentiment of a news headline. You’ll bring it all together with LangChain. The result is a pandas DataFrame with a column of news headlines and a column
- 1 year ago, 15 Oct 2023, 11:02pm -
Aliens made this rock: The post-hoc probability fallacy in biology, finance and cosmology [Mathematical Investor]
While out hiking, I found this rock. Evidently it was created by aliens, as can be shown by a probability argument. The following table gives measurements made on the rock. The first two rows give the overall length and width of the rock. Each of the next six rows, after the first two, gives
- 1 year ago, 15 Oct 2023, 11:01pm -
Trend-Following Filters – Part 7 [Alpha Architect]
Financial time series that are structured as data sampled at a uniform time interval, e.g., hourly, daily, weekly, or monthly, are called discrete-time time series and referred to, from a digital signal processing (DSP) perspective, as being in the “time domain.” Technical market analysts
- 1 year ago, 13 Oct 2023, 07:47pm -
AutoRegressive Fractionally Integrated Moving Average (ARFIMA) model [Quant Insti]
Usually, in algorithmic trading, we talk about AutoRegressive Integrated Moving Average (ARIMA) models. They’re very popular in the industry. You might remember that the “d” component in the model can be 0, 1, 2, etc. What if 'd' could take fractional values? We’ll learn about such
- 1 year ago, 13 Oct 2023, 07:47pm -
Research Review | 13 October 2023 | Market Volatility [Capital Spectator]
An ETF-Based Measure of Stock Price Fragility Renato Lazo-Paz (University of Ottawa) July 2023 A growing literature employs equity mutual fund flows to measure a stock’s exposure to non-fundamental demand risk – stock price fragility. However, this approach may be biased by confounding
- 1 year ago, 13 Oct 2023, 07:46pm -
Beyond Stocks: The Surprising Volatility Returns of Oil and Gold [Robot Wealth]
I’ve previously discussed the Volatility Risk Premium (VRP) and how it differs from the Equity Risk Premium (ERP). Probably the most interesting difference, from the perspective of the trader, is that the VRP may be somewhat amenable to timing – more than the ERP at any rate. In this article,
- 1 year ago, 12 Oct 2023, 10:33pm -
Time Invariant Portfolio Protection [Quantpedia]
In this article we are going to continue the discussion on portfolio insurance strategies. An exhaustive description of this methodology was already presented in the article Introduction to CPPI (https://quantpedia.com/introduction-to-cppi-constant-proportion-portfolio-insurance). This article will
- 1 year ago, 11 Oct 2023, 03:22am -
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
- 1 year ago, 11 Oct 2023, 03:22am -
How to measure the quality of a trading signal [SR SV]
The quality of a trading signal depends on its ability to predict future target returns and to generate material economic value when applied to positioning. Statistical metrics of these two properties are related but not identical. Empirical evidence must support both. Moreover, there are
- 1 year ago, 9 Oct 2023, 07:15pm -
The ESG-efficient frontier (Part II) [Quantifying ESG]
In the previous week, we looked at the first part of a paper by AQR’s Lasse H Pedersen, Shaun Fitzgibbons and Lukasz Pomorski. This remains an influential paper in that it contains some really useful ideas on how to incorporate ESG in a portfolio optimization problem. You can read the first part
- 1 year ago, 9 Oct 2023, 07:15pm -
Building Better High Yield Portfolios [Finominal]
There is an inverse relationship between yield and total return The ideal yield strategy has a high yield, high Sharpe, and low correlation to stocks The yield-to-downside beta ratio enhances the strategy selection process INTRODUCTION @ChatGPT: “What is a rhyme that includes ‘high dividends are
- 1 year ago, 9 Oct 2023, 07:15pm -
Long-term Returns for US Treasury Funds Are Predictable: What Do We Do with That Information? [Allocate Smartly]
Long-term returns for US Treasury bond funds with a constant maturity (like IEF, TLT and SHY) have been quite predictable simply using initial Treasury yields as an estimate. This observation was popularized by John Bogle. Here’s an excellent recent look from Portfolio Optimizer. How predictable?
- 1 year ago, 6 Oct 2023, 01:10am -
International Value Stocks Offering "More Bang for the Buck" [Alpha Architect]
Over the very long term, while value stocks have been less profitable and have had slower growth in earnings than growth stocks, they have provided higher returns. Among the reasons are that value stocks have traded at substantial valuation discounts compared to growth stocks, and reversion to the
- 1 year ago, 6 Oct 2023, 01:10am -
Diving Deep: My Personal Approach to Equity and Volatility Risk Premia [Robot Wealth]
Lately, I’ve been thinking a lot about the Volatility Risk Premium (VRP). The VRP makes much more sense (to me, at least) when I have the Equity Risk Premium (ERP) for context and comparison. So, in this article, I want to discuss the ERP and the VRP, their similarities and differences, and how I
- 1 year ago, 4 Oct 2023, 10:29pm -
Trading Technical Indicators the Right Way: Digital to Analog Signals [Hanguk Quant]
In the previous lecture, we did a line by line walk through and intuitive explanation of the need for volatility targeting: Code Walkthrough for the Alpha Simulator: Simple Trend Rule with Volatility Targeting HangukQuant · Sep 23 Code Walkthrough for the Alpha Simulator: Simple Trend Rule with
- 1 year ago, 4 Oct 2023, 10:29pm -
The State Of Vol [Investment Idiocy]
I'm sometimes asked where I get my ideas for new trading strategies from. The boring truth is I rarely test new trading strategies, and I mostly steal ideas when I feel in the mood. Today for example I saw this tweet post on twitter X: The original paper is here (requires subscription or
- 1 year ago, 4 Oct 2023, 10:28pm -
AutoRegressive Moving Average (ARMA) models: Using R [Quant Insti]
In the AutoRegressive Moving Average (ARMA) models: A Comprehensive Guide of my ARMA article series, I covered the theoretical aspects of Autoregressive Moving Average models (ARMA). In the AutoRegressive Moving Average (ARMA) models: Using Python, I simulated different ARMA models, their
- 1 year ago, 4 Oct 2023, 10:28pm -
Key insights: Imbalance in the order book [OS Quant]
I summarise key insights from a few papers studying the limit order book. You’l learn how to measure volume imblanace in the limit order book and how well it predicts price moves. Author Adrian Letchford Published 1 October 2023 Length 5 minutes Like what you see? Follow Adrian on Twitter to be
- 1 year ago, 2 Oct 2023, 11:01pm -
How to use VectorBT PRO to algorithmically find chart patterns [PyQuant News]
VectorBT PRO (VBT) is a proprietary Python package designed for backtesting and analyzing quantitative trading strategies. In today’s guest post, you’ll use VectorBT PRO to algorithmically detect chart patterns from 230 million unique pattern and window combinations. All in about 2 minutes.
- 1 year ago, 2 Oct 2023, 11:00pm -