Quant Mashup Finding the Nearest Valid Correlation Matrix with Higham’s Algorithm [Sitmo Machine Learning]In quantitative finance, correlation matrices are essential for portfolio optimization, risk management, and asset allocation. However, real-world data often results in correlation matrices that are invalid due to various issues: Merging Non-Overlapping Datasets: If correlations are estimated(...) Macro trading signal optimization: basic statistical learning methods [Macro Synergy]A key task of macro strategy development is condensing candidate factors into a single positioning signal. Statistical learning offers methods for selecting factors, combining them to a return prediction, and classifying the market state. These methods efficiently incorporate diverse information(...) Variance for Intuition, CVaR for Optimization [Anton Vorobets]While everyone understand that investment risk is characterized by large losses or drawdowns, mainstream finance and economics academics still continue to promote mean-variance analysis. Even Harry Markowitz understood that risk should be measured by the downside, but in 1950’s the computational(...) Weekly Research Insights [Quant Seeker]Many readers have asked for a richer discussion of useful and interesting papers, alongside the most recent research I cover in my weekly recap. So, I’m testing a new Thursday post: Weekly Research Insights. In this format, I’ll highlight a few noteworthy papers and discuss their key findings(...) Backtesting the Opening Range Breakout (ORB) Strategy using Polygon.io [Concretum Group]In this article, we will show you how to run, customize, and analyze a backtest for the Opening Range Breakout (ORB) strategy. Instead of explaining every line of code, we’ll focus on how to execute the backtest, adjust key parameters, and interpret the results. By the end, you’ll be able to:(...) Weekly Recap [Quant Seeker]Behavioral Finance How Costly are Trading Heuristics? (Han, He, and Weagley) Retail investors often rely on simple decision-making shortcuts when picking stocks, but these habits can be costly. By analyzing decades of research and actual trading data, the paper finds that traders frequently use(...) Capturing Volatility Risk Premium Using Butterfly Option Strategies [Relative Value Arbitrage]The volatility risk premium is a well-researched topic in the literature. However, less attention has been given to specific techniques for capturing it. In this post, I’ll highlight strategies for harvesting the volatility risk premium. Long-Term Strategies for Harvesting Volatility Risk Premium(...) Volatility Forecasting: HExp Model [Portfolio Optimizer]In this series on volatility forecasting, I previously detailed the Heterogeneous AutoRegressive (HAR) volatility forecasting model that has become the workhorse of the volatility forecasting literature1 since its introduction by Corsi2. I will now describe an extension of that model due to(...) Efficient Rolling Median with the Two-Heaps Algorithm. O(log n) [Sitmo Machine Learning]Calculating the median of data points within a moving window is a common task in fields like finance, real-time analytics and signal processing. The main applications are anomal- and outlier-detection / removal. Fig 1. A slow-moving signal with outlier-spikes (blue) and the rolling median filter(...) Fast Rolling Regression: An O(1) Sliding Window Implementation [Sitmo Machine Learning]In finance and signal processing, detecting trends or smoothing noisy data streams efficiently is crucial. A popular tool for this task is a linear regression applied to a sliding (rolling) window of data points. This approach can serve as a low-pass filter or a trend detector, removing short-term(...) Does gold belong in a risk premia portfolio? [Robot Wealth]With GLD up 40-something percent since early 2024, I’ve been thinking about gold’s place in a risk premia harvesting portfolio. It’s a fascinating rabbit hole and there’s plenty of disagreement. Let’s break this down from two perspectives – the academic one (yawn) and the practical one(...) How Bond ETFs Make Trading Easier and Cheaper [Alpha Architect]Bond Exchange-Traded Funds (ETFs) help people invest in bonds without having to buy them one by one. Instead, they let investors buy a mix of bonds all at once, making it easier and cheaper to trade. This is especially helpful for bonds that are usually harder to buy or sell. Because of bond ETFs,(...) Can Margin Debt Help Predict SPY’s Growth & Bear Markets? [Quantpedia]Navigating the financial markets requires a keen understanding of risk sentiment, and one often-overlooked dataset that provides valuable insights is FINRA’s margin debt statistics. Reported monthly, these figures track the total debit balances in customers’ securities margin accounts—a key(...) Very... slow... mean reversion, and some thoughts on trading at different speeds [Investment Idiocy]Bit of a mixed bag post today. The golden thread connecting them is the idea that markets trend and mean revert at different frequencies. - A review of the discussion around timeframes for momentum and mean reversion in 'Advanced Futures Trading Strategies', in light of this excellent(...) Weekly Recap [Quant Seeker]Commodities Macroeconomic Conditions, Speculation, and Commodity Futures Returns (Adhikari and Putnam) This paper tests the predictability of weekly commodity returns using a range of macroeconomic variables and measures of speculation derived from the Commitment of Traders report. The predictive(...) What is Trend Following? A Painful Journey to Smarter Investing [Alpha Architect]When it comes to choosing an investment strategy, most investors—whether they realize it or not—are looking for something that: Beats the benchmark Never loses money Works all the time And here’s the harsh reality: this unicorn of a strategy doesn’t exist. Anyone promising you all three is(...) Batch Linear Regression via Bayesian Estimation [Quant Start]In previous articles we have discussed the theory of state space models and Kalman Filters as well as their application to estimating a dynamic hedging ratio between a pair of cointegrating ETFs. The articles were relatively light on theory and did not explore the much broader field of Bayesian(...) Understanding Mean Reversion to Enhance Portfolio Performance [Relative Value Arbitrage]In a previous newsletter, I discussed momentum strategies. In this edition, I’ll explore mean-reverting strategies. Mean reversion is a natural force observed in various areas of life, including sports performance, portfolio performance, volatility, asset prices, etc. In this issue, I specifically(...) Understanding the Stock–Bond Correlation [Alpha Architect]This study looks at how stocks and bonds move together over time, using data from 1875 to 2023. The authors find that inflation, interest rates, and government stability affect this relationship. When inflation and interest rates go up, stocks and bonds tend to move in the same direction, making(...) Learning to Rank [Quantitativo]“Give me a firm place to stand and a lever, and I can move the Earth.” Archimedes. Archimedes, the brilliant Greek mathematician and engineer, was so fascinated by levers that he claimed he could move the Earth with one. His deep understanding of mechanics made him a legend, from designing war(...) Can you trust the "Fear & Greed Index"? [Unravel Markets]In the last couple of days, X and other crypto social media is flooded with screenshots of the “Fear & Greed Index” printing “Extreme Fear”, usually with a Warren Buffet quote, or something similar. Let’s dig into whether it really has any predictive power at all! The common assumption(...) Confessions of a recovering engineer (or why engineers make bad traders) [Robot Wealth]Here’s something that might shock you: Engineers make the worst traders. I’m speaking from experience here. As an engineer who transitioned to trading, it wasn’t until I stopped thinking like an engineer that I started to make progress. You can read all about this in my case study, by the way.(...) Valuations Reflect U.S. Exceptionalism [Alpha Architect]Conventional wisdom can be defined as ideas that are so ingrained in our belief system that they go unchallenged. Unfortunately, much of the “conventional wisdom” about investing is wrong. One example of erroneous conventional wisdom is that investors seeking higher returns should invest in(...) Trading the Fed: The Pre-FOMC Drift is Alive [Quant Seeker]The pre-FOMC announcement drift is a well-documented anomaly where equities exhibit abnormal positive returns leading up to Federal Open Market Committee (FOMC) meetings, challenging traditional asset pricing models. In this blog post, I test the anomaly using data through December 2024 and find(...) Sequential Entropy Pooling [Anton Vorobets]Entropy Pooling is a core method of the next generation investment framework, thoroughly presented in the Portfolio Construction and Risk Management book1. As a very oversimplified introduction to Entropy Pooling, you can think about it as a generalization of the Black-Litterman model without all(...) How to evaluate leading indicators [Unravel Markets]I started this Substack, as I found close to zero investment research material that I’d consider rigorous-enough “predictive analytics” — also the reason why I co-founded Unravel. What I rather see a lot is: the price of the asset, and another metric plotted on the same chart, with someone(...) Weekly Recap [Quant Seeker]Commodities Commodity dependence and optimal asset allocation (Dequiedt, Gomes, Pukthuanthong, and Williams) Investors often assume adding commodities to a portfolio enhances diversification. However, this paper finds that the benefits depend on a country’s economic structure. In nations heavily(...) Volatility Risk Premium: The Growing Importance of Overnight and Intraday Dynamics [Relative Value Arbitrage]The breakdown of the volatility risk premium into overnight and intraday sessions is an active and emerging area of research. It holds not only academic interest but also practical implications. ETF issuers are launching new ETFs to capitalize on the overnight risk premium, and the shift toward(...) Using Inflation Data for Systematic Gold and Treasury Investment Strategies [Quantpedia]Inflation significantly impacts the prices of gold and treasury bonds through various mechanisms. Gold is often viewed as a hedge against inflation, while treasury bonds exhibit a more complex relationship influenced by interest rates and investor behavior. This relationship between inflation, gold,(...) Time- and State-Dependent Resampling [Anton Vorobets]Generating realistic future paths for investment market time series is crucial for risk management, good backtesting1, fully general stress-testing2, and CVaR tail risk optimization, see the Portfolio Construction and Risk Management book3. The recent Time- and State-Dependent Resampling article4(...) Rob Carver - The Comprehensive Guide to a Diversified Futures Strategy [Algorithmic Advantage]In this episode, seasoned trader Rob Carver shared his nuanced approach to building and managing a diversified futures portfolio—a methodology that appeals to advanced, technical traders, while we also covered off some of the 'basics' of futures trading, such as rolling, back-adjusting,(...) Weekly Recap [Quant Seeker]Welcome to this week's roundup of the latest investing research! Below is a carefully curated selection of highlights from the past week, with each title linking directly to its source for further reading. Thank you for reading and don’t forget to hit the like button! Crypto Token Economics(...) Exploring Credit Risk: Its Influence on Equity Strategies and Risk Management [Relative Value Arbitrage]Credit risk, also known as default risk, is the likelihood of loss when a borrower or counterparty fails to meet its obligations. A lot of research has been conducted on credit risk, and an emerging line of study explores the connection between the equity and credit markets. In this post, we’ll(...) Dangers of Relying on OHLC Prices – the Case of Overnight Drift in GDX ETF [Quantpedia]Can we truly rely on the opening price in OHLC data for backtesting? While the overnight drift effect is well-documented in a lot of asset classes, we investigated its presence in gold using the GLD ETF and then extended our analysis to the GDX – Gold Miners ETF, where we observed an unusually(...) Modelling the yield curve of US government treasuries [OS Quant]The interest rate is a key input to pricing various instruments. For example, the price of an option depends on the risk free rate. The return earned holding bonds depends on the bond yield. A good model of interest rates means you can better price these interest rate derived products and have a(...) The Ability to NAV Time Interval Funds [Alpha Architect]Highly illiquid assets trade infrequently making it difficult to know their true market value. To address this issue, funds that invest in illiquid assets create fair valuation estimates at periodic intervals. These valuation estimates determine the share values at which interval and tender offer(...) Research Review | 14 FEB 2025 | Rebalancing and Asset Allocation [Capital Spectator]The Unintended Consequences of Rebalancing Campbell R. Harvey (Duke University), et al. January 2025 Institutional investors engage in trillions of dollars of regular portfolio rebalancing, often based on calendar schedules or deviations from allocation targets. We document that such rebalancing has(...) The VIX of Crypto and How Options Data Predicts BTC Price Swings [Unravel Markets]The interactive version of this report can be found here; our previous report on exchange outflows’s predictive power here. With investor sentiment and risk premiums encapsulated in its options data, Bitcoin’s implied volatility is becoming an interesting predictive factor with its dual role as(...) Hedging Efficiently: How Optimization Improves Tail Risk Protection [Relative Value Arbitrage]Tail risk hedging aims to protect portfolios from extreme market downturns by using strategies such as out-of-the-money options or volatility products. While effective in mitigating large losses, the challenge lies in balancing cost and long-term returns. In this post, we’ll discuss tail risk(...) Can Miner Economics Predict Bitcoin Returns? [Unravel Markets]The Puell Multiple was invented by analyst David Puell, back in March 2019. He developed the metric as a way to quantify miner revenue in relation to historical averages: it compares the daily USD value of Bitcoin mined through block rewards to its 365-day moving average, directly meauring whether(...) What's the chance that a market effect is real? Monte Carlo permutation tests in Excel [Robot Wealth]Let’s say you observe some effect in the market and quantify it with simple data analysis. A good question is, “What are the chances I’d see this effect solely due to chance?” And using simple Excel tools, we can answer this question without doing any formal statistics. Before we get into(...) Data Visualization - the Momentum Map [Grzegorz Link]Dealing with multidimensional data in data visualization is tricky. You have to strike a balance between presenting a lot of useful information, but not cluttering charts too much. There are a lot of flashy and glimmery chart options. Yet it's easy to lose your audience by flooding them with(...) Weekly Recap [Quant Seeker]Commodities Tail Risk Premium in the Crude Oil Market (Li and Li) While the variance risk premium has been widely studied in financial markets, this paper finds that the option-implied tail risk premium is a stronger predictor of crude oil futures returns. Short-term tail risks signal lower returns(...) Turn-of-the-Month Strategies: Do They Still Work? [Quant Seeker]Decades of research have uncovered numerous market anomalies, persistent patterns in asset returns that cannot be fully explained by traditional risk-based models. Among the most enduring and well-documented of these is the turn-of-the-month (TOM) effect, characterized by abnormally high stock(...) Coding Trend Factor [Quantitativo]"Every great developer you know got there by solving problems they were unqualified to solve until they actually did it." — Patrick McKenzie. Patrick McKenzie is a well-known software developer, entrepreneur, and writer, widely recognized for his work in the software industry,(...) How much should we get paid for skew risk? Not as much as you think! [Investment Idiocy]A bit of a theme in my posts a few years ago was my 'battle' with the 'classic' trend followers, which can perhaps be summarised as: Me: Better Sharpe! Them: Yeah, but Skew!! My final post on the subject (when I realised it as a futile battle, as we were playing on different(...) The Mathematics of Portfolio Return [Portfolio Optimizer]Whether we manage our own investment assets or choose to hire others to manage the assets on our behalf we are keen to know how well our […] portfolio of assets is performing1 and the calculation of portfolio return is the first step in [that] performance measurement process1. Now, while the(...) Better Backtesting [Anton Vorobets]I recently wrote a post about naive backtesting of investment risk measures1, which is usually performed in the following way: Look at some historical data samples. Optimize portfolios using different risk measures. Crown the investment risk measure with the highest cumulative performance as “the(...) The Low-Vol Effect in Crypto [Falkenblog]Thirty years ago, I wrote my dissertation on the low-vol effect, which was really bad timing. This was just after various anomalies highlighted in the 70s and 80s were exposed as the effects of measurement error and selection bias (the low-price effect, the January effect). The small-cap effect was(...) Taming Excessive "Timing Luck" in TAA by Tranching Strategies [Allocate Smartly]Fair warning: this article is intended for advanced DIY Tactical Asset Allocation investors, i.e. nerds like us. First, a bit of background knowledge you’ll need to understand this discussion… Background knowledge: What is “timing luck”? Most Tactical Asset Allocation (TAA) strategies trade(...)