Quant Mashup - Robot Wealth
Quantocracy is now on Bluesky and Threads. See the links in the header. - Mike
Trading books: Let's get real about what you actually need [Robot Wealth]
People often ask me for book recommendations. But here’s a better question: What’s going to help you make money today? Reading a book probably isn’t the answer. I’m not saying books aren’t useful. They absolutely are. But you’re not preparing for a PhD defence – you’re trying to turn
- 1 week ago, 10 Nov 2024, 09:13pm -
Portfolio Hedging with Put Options [Robot Wealth]
There are 2 good reasons to buy put options: Because you think they are cheap Because you want downside protection. You want to use the skewed payoff profile to protect a portfolio against large downside moves without capping your upside too much. The first requires a pricing model. Or, at the
- 4 months ago, 19 Jul 2024, 10:09pm -
Revisiting Overnight vs Intraday Equity Returns [Robot Wealth]
Back in May 2020, in the eye of the Covid storm, we looked at overnight vs intraday returns in US equities. Intuitively, we’d probably expect to see higher average returns overnight when the market is closed – because it’s much more difficult to hedge and manage our exposures when the cash
- 5 months ago, 31 May 2024, 08:09pm -
Options Trading with Cross-Sectional Volatility Factors [Robot Wealth]
A few years ago, I got deep into the idea of constructing a long/short equity options portfolio based on the kind of simple factor sorts that had been so successful in quant equity. My original intention was to set up an index and license it to fund managers. Of course, there are many reasons why
- 6 months ago, 13 May 2024, 07:43pm -
A Simple Trick for Dealing with Overlapping Data [Robot Wealth]
Last week, we looked at simple data analysis techniques to test for persistence. But we only looked at a feature that is measured over a single day – the absolute range. Such a feature makes it easy to test persistence because you don’t have the problem of overlapping data. Each data point is
- 6 months ago, 25 Apr 2024, 10:02pm -
How to Test the Assumption of Persistence [Robot Wealth]
An assumption we often make in trading research is that the future will be at least a little like the past. I see a lot of beginners making this assumption implicitly without recognising that they’re making it or thinking about whether it’s reasonable to do so. That’s a mistake. If you are
- 7 months ago, 5 Apr 2024, 07:52pm -
Trading 0DTE Options with the IBKR Native API [Robot Wealth]
Here’s a thing that I suspect will make money, but that I haven’t yet tested (for reasons that I will explain shortly): Every day, at the start of the trading day, get the SPX straddle price and convert it to an expected SPX price move. Then at the end of the trading day, take the SPX price and
- 7 months ago, 24 Mar 2024, 10:27pm -
Getting Started with the Interactive Brokers Native API [Robot Wealth]
Here at Robot Wealth, we trade with Interactive Brokers (IB) primarily because they offer access to global markets at a reasonable price. In recent times, IB has put some time and effort into upping its tech game, including development of an API for interacting with its desktop trading applications.
- 8 months ago, 7 Mar 2024, 12:34am -
Navigating Tradeoffs with Convex Optimisation [Robot Wealth]
This is the final article in our recent stat arb series. The previous articles are linked below: A short take on stat arb trading in the real world A general approach for exploiting stat arb alphas Ideas for crypto stat arb features Quantifying and combining crypto alphas A simple and effective way
- 8 months ago, 2 Mar 2024, 08:19pm -
Building Intuition for Trading with Convex Optimisation with CVXR [Robot Wealth]
This article continues our recent stat arb series. The previous articles are linked below: A short take on stat arb trading in the real world A general approach for exploiting stat arb alphas Ideas for crypto stat arb features Quantifying and combining crypto alphas A simple and effective way to
- 8 months ago, 24 Feb 2024, 08:56pm -
How to Model Features as Expected Returns [Robot Wealth]
Modeling features as expected returns can be a useful way to develop trading strategies, but it requires some care. The main advantage is that it directly aligns with the objective of predicting and capitalising on future returns. This can make optimisation and implementation more intuitive. It also
- 9 months ago, 18 Feb 2024, 09:11pm -
A Simple, Effective Way to Manage Turnover and Not Get Killed by Costs [Robot Wealth]
Every time we trade, we incur a cost. We pay a commission to the exchange or broker, we cross spreads, and we might even have market impact to contend with. A common issue in quant trading is to find an edge, only to discover that if you executed it naively, you’d get killed with costs. In this
- 9 months ago, 11 Feb 2024, 05:14am -
Quantifying and Combining Crypto Alphas [Robot Wealth]
In this article, I’ll take some crypto stat arb features from our recent brainstorming article and show you how you might quantify their strength and decay characteristics and then combine them into a trading signal. This article continues our recent articles on stat arb: A short take on stat arb
- 9 months ago, 2 Feb 2024, 06:22pm -
Ideas for Crypto Stat Arb Features [Robot Wealth]
This article continues our recent articles on stat arb: A short take on stat arb trading in the real world A general approach for exploiting stat arb alphas In this article, I’ll brainstorm some ideas for predictive features that you could potentially use in a crypto stat arb model. The ideas draw
- 9 months ago, 28 Jan 2024, 02:49am -
A General Approach for Exploiting Statistical Arbitrage Alphas [Robot Wealth]
Last week, I wrote a short article about statistical arbitrage trading in the real world. Statistical arbitrage is a well-understood concept: find pairs or baskets of assets you expect to move together, wait for them to diverge, and bet on them converging again. Simple enough. But making it work,
- 9 months ago, 22 Jan 2024, 08:52pm -
A Short Take on Real-World Pairs Trading [Robot Wealth]
In textbooks, one often sees pairs trading algorithms start by regressing prices of Asset A on Asset B to calculate a hedge ratio. I’ve rarely seen anyone actually do this in the real world. That’s because it is a very unstable thing – especially for a pair of volatile assets, and especially
- 10 months ago, 12 Jan 2024, 10:39pm -
How Much Damage Can I Do Turbo-Punting Shitcoins? [Robot Wealth]
Here in Australia, we’re right in the depths of the silly season. We indulge in long lunches, take days off work, and generally let our hair down. In that spirit, I thought I might have some fun punting shitcoins. (Maybe my definition of fun differs from yours, but let’s run with it). For the
- 11 months ago, 13 Dec 2023, 09:10pm -
The Art and Science of Trading Carry [Robot Wealth]
Let’s talk about carry trades. First, what exactly is a carry trade? A carry trade is a trade that pays you to hold it. A position where, if nothing changes except the passing of time, you expect to make money. Let’s go through some examples. FX carry The classic example is the FX carry trade,
- 11 months ago, 9 Dec 2023, 04:06am -
Exponentially weighted covariance in an Equal Risk Contribution portfolio optimisation problem [Robot Wealth]
The Equal Risk Contribution (ERC) portfolio seeks to maximally diversify portfolio risk by equalising the risk contribution of each component. The intuition is as follows: Imagine we have a 3-asset portfolio Assets 1 and 2 are perfectly correlated (correlation of 1.0) Asset 3 is uncorrelated with
- 1 year ago, 20 Nov 2023, 09:41pm -
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 -
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 -
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 -
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 -
Quant Signal Trade-Offs in the Real World [Robot Wealth]
I want to discuss a couple of simple trade-off considerations around quant trading signals that may not be obvious. Here’s the price of some asset: Our main job is to predict how it’s likely to move. To do this, you use information about it that you think is predictive. And at any point in time:
- 1 year ago, 22 Sep 2023, 07:52am -
Price data from Yahoo Finance in R – the Easy Way [Robot Wealth]
Traders typically have many ideas for trading strategies – more than they can ever implement in practice! Therefore it’s useful to be able to move quickly in the early research phase. You want to disprove things as quickly as possible so that you can move onto the next thing. Obviously there is
- 1 year ago, 8 Sep 2023, 09:08pm -
A Case Study in Finding Edge [Robot Wealth]
In 2021, James, I, and a small team decided to set up a crypto trading venture. We faced several problems, but knowing almost nothing about crypto was the most significant. We sensed that the fractured, developing nature of the crypto market would likely be a good place to seek out inefficiencies,
- 1 year ago, 21 Aug 2023, 05:48pm -
A Beginner's Guide to Using DuckDB with Stock Price Data in R [Robot Wealth]
In this blog post, I will demonstrate how to work with stock price data using the DuckDB database management system in R. DuckDB is a fast and lightweight analytical database engine that is designed to work with various programming languages, including R. You can use Duck DB from the command line or
- 1 year ago, 9 May 2023, 10:42pm -
Webinar recordings and notebook [Robot Wealth]
Towards the end of last year, we ran a couple of free Zoom webinars on: The Basics of Edge Extraction – the “trader smarts” of getting an edge Data Analysis for Traders – an interactive research session. Here are the recordings: Basics of Edge Extraction Data analysis for Traders The colab
- 1 year ago, 23 Mar 2023, 09:40am -
More Intuitive Joins in dplyr 1.1.0 [Robot Wealth]
dplyr 1.1.0 was a significant release that makes several common data operations more syntactically intuitive. The most significant changes relate to joins and grouping/aggregating operations. In this post we’ll look at the changes to joins. First, install and load the latest version of dplyr:
- 1 year ago, 15 Mar 2023, 09:55pm -
Exploring the finnhub.io API [Robot Wealth]
Over the last few years, a number of new market data providers have come online. They tend to have modern websites, broad coverage, and well-documented RESTful APIs. Their services are often priced very competitively – especially for personal use – and usually have generous free tiers. One such
- 1 year ago, 23 Feb 2023, 07:47am -
How to get serious about making money trading [Robot Wealth]
In Australia, if you’re serious about getting the job done effectively and efficiently, you might say: “I’m not here to f*** spiders.” Many traders act like they are, indeed, here to f*** spiders. If you’re making soup, you first need a good stock. Stock isn’t exciting. Everyone has
- 2 years ago, 12 Jan 2022, 11:21am -
Steal ideas, not implementations [Robot Wealth]
Imagine you’re a relatively small, independent trader trying to turn trading from a hobby into a serious business. If that’s you, then there are a few concepts that will help you pick the right trades to get after. This is important because picking the right trades is most of the game. First,
- 3 years ago, 22 Sep 2021, 11:31am -
Optimising the rsims package for fast backtesting in R [Robot Wealth]
rsims is a new package for fast, quasi event-driven backtesting in R. You can find the source on GitHub, docs here, and an introductory blog post here. Our use case for rsims was accurate but fast simulation of trading strategies. I’ve had a few questions about how I made the backtester as fast as
- 3 years ago, 20 Aug 2021, 10:38am -
Exploring the rsims package for fast backtesting in R [Robot Wealth]
rsims is a new package for fast, realistic (quasi event-driven) backtesting of trading strategies in R. Really?? Does the world really need another backtesting platform…?? It’s hard to argue with that sentiment. Zipline, QuantConnect, Quantstrat, Backtrader, Zorro… there are certainly plenty
- 3 years ago, 13 Aug 2021, 10:44am -
How to Predict Asset Prices (and how not to) [Robot Wealth]
If you have some factor that you think predicts future stock returns (or similar) and you are making charts like below, then here are some tips… We’ll go through an example of trying to “time” SPX with the level of VIX. You get daily SPX index prices and daily VIX close data You align them
- 3 years ago, 16 Apr 2021, 12:10pm -
What P&L Swings Can I Expect as a Trader? [Robot Wealth]
Many beginner traders don’t realize how variable the p&l of a high-performing trading strategy really is. Here’s an example… I simulated ten different 5 year GBM processes with expected annual returns of 20% and annualized volatility of 10%. (If you speak Sharpe Ratios, I’m simulating a
- 3 years ago, 8 Apr 2021, 10:47am -
Three types of systematic strategies that "work" [Robot Wealth]
Broadly, there are three types of systematic trading strategy that can “work.” In order of increasing turnover they are: Risk premia harvesting Economically-sensible, statistically-quantifiable slow-converging inefficiencies Trading fast-converging supply/demand imbalances This post provides an
- 3 years ago, 10 Feb 2021, 10:04am -
Exporting Zorro Data to CSV [Robot Wealth]
Earlier versions of Zorro used to ship with a script for converting market data in Zorro binary format to CSV. That script seems to have disappeared with the recent versions of Zorro, so I thought I’d post it here. When you run this script by selecting it and pressing [Test] on the Zorro
- 3 years ago, 6 Jan 2021, 08:31pm -
Evolving Thoughts on Data Mining [Robot Wealth]
Several years ago, I wrote about some experimentation I’d done with data mining for predictive features from financial data. The article has had several tens of thousands of views and nearly 100 comments. I think the popularity of the article lay in its demonstration of various tools and modeling
- 3 years ago, 9 Dec 2020, 10:04am -
Are Cheap Stocks Expensive? A Simple Equity Factor Analysis Walkthrough [Robot Wealth]
I have been sharing examples of simple real-time trading research on my Twitter account. I do this kind of thing a lot in the training program of our trading group – and I’m sharing in the hope that it might also help a wider audience. Here’s a piece of analysis I did recently on a really
- 3 years ago, 2 Dec 2020, 09:44am -
Trading FX using Autoregressive Models [Robot Wealth]
I’m a big fan of Ernie Chan’s quant trading books: Quantitative Trading, Algorithmic Trading, and Machine Trading. There are some great insights in there, but the thing I like most is the simple but thorough treatment of various edges and the quant tools you might use to research and trade them.
- 3 years ago, 24 Nov 2020, 09:38am -
Tesla's inclusion in the S&P 500 - Is there a trade? [Robot Wealth]
The S&P index committee recently announced that Tesla, already one of the biggest stocks listed in the country, would be included in the S&P 500. Here’s the press release: Due to TSLA’s size, it was widely expected to have entered the S&P 500 index much earlier – but S&P has
- 4 years ago, 19 Nov 2020, 10:18am -
Where does FX sit in a Systematic Trading Portfolio? [Robot Wealth]
This post is a BONUS LESSON taken directly from Zero to Robot Master Bootcamp. In this Bootcamp, we teach traders how to research, build and trade a portfolio of 3 strategies including an Intraday FX Strategy, a Risk Premia Strategy and a Volatility Basis Strategy. If you’re interested in adding
- 4 years ago, 10 Nov 2020, 10:18am -
What Assumptions Are You Making About “Time” In Your Trading? [Robot Wealth]
I recently listened to a podcast about one of the earliest human civilizations – the ancient Sumerians. Apparently, our system of minutes, hours, and days has been with us since the time of these ancient people, who developed it based on a simple base-12 counting system: There are three joints in
- 4 years ago, 2 Nov 2020, 09:23pm -
My Thoughts on Quantopian's Closing [Robot Wealth]
I was very sad to learn that Quantopian is shutting down its community services. Quantopian’s efforts to bring quant finance outside of institutions was a genuine game-changer. The educational content was solid, the tech was excellent, and the QuantCon conferences were professional, well-run, and
- 4 years ago, 30 Oct 2020, 02:05am -
Trading the US Election – Profiting from “Known Unknowns” [Robot Wealth]
You’ve probably noticed that there’s a US election on the horizon. This is an event of known uncertainty: a “known unknown” in the now immortal language of Donald Rumsfeld. In trading, we sometimes observe marginal pricing inefficiencies around these “known unknowns”. For example, ahead
- 4 years ago, 29 Oct 2020, 10:58am -
Positional Option Trading by Euan Sinclair: A Review [Robot Wealth]
Trading books set a low bar for the reviewer. 99% are full of facile feel-good advice (don’t fight the trend, always use a protective stop). The 1% that are useful tend to either be dry technical treatments (quants who don’t trade), or sporadically helpful insights from traders who make money
- 4 years ago, 16 Sep 2020, 11:28am -
How To Be a Quant Trader - Experiments with @QuantConnect [Robot Wealth]
This post presents an analysis of the SPY returns process using the QuantConnect research platform. QuantConnect is a strategy development platform that lets you research ideas, import data, create algorithms, and trade in the cloud, all in one place. For this research, I’ve used their online
- 4 years ago, 14 Jul 2020, 09:36am -
How to extend ETF prices with mutual fund data using SQL [Robot Wealth]
On Zero to Robot Master Bootcamp, we teach how to build a portfolio of three automated systematic trading strategies. One of them is a long term Risk Premia Harvesting strategy which trades asset class ETFs. ETFs are useful instruments for analysing long term (tradeable) performance of various asset
- 4 years ago, 8 Jun 2020, 11:09pm -
Why Aren't Call Options More Expensive Than Put Options? [Robot Wealth]
Why aren’t calls more expensive than puts for an asset which is more likely to go up than down? We have an asset trading at $100 for which the distribution of future returns is a known fact. It has annual returns described by a normal distribution with mean 5% and standard deviation 10%. This is,
- 4 years ago, 4 Jun 2020, 01:16pm -