cephalopod Profile picture
At Octopus Capital our passion is providing best-in-class liquidity in the marketplace of ideas
Matthew Mansfield👹 Profile picture CRE Profile picture TurkeyClubSandwich Profile picture patrickjl Profile picture Mike Profile picture 40 subscribed
Mar 7 13 tweets 3 min read
A couple of people asked how to price this bet. As a reminder the bet Peter offered was 5-1 against that BTC/USD would hit $100,000 before the end of the year (i.e. he receives $20,000 if Bitcoin hits 100k, and he pays $100,000 if Bitcoin does not hit 100k) Intuitively that seems mispriced, but how can we sharpen that up a bit? Let's convert it to a derivative contract. The bet (from Peter's pov) is equivalent to paying $100,000 to buy a contract that pays out $120,000 if BTC/USD hits 100k.
Jan 14 11 tweets 2 min read
I feel like some people talk about quantitative/systematic/automated trading as if they are all the same thing, which is not true, and blurring these lines causes confusion for people who want to enter the industry. “Automated” trading (contrasted with manual trading) is the simplest to understand. If the strategy doesn’t require any human input as part of its execution, then it’s automated. If there is a human in the loop then it’s not automated.
Jan 10 4 tweets 1 min read
Something useful to keep in mind if you're using ridge regression. The normal equations are below, where the parameter lambda controls the amount of regularization. Image If you've normalized the columns of X so that the diagonal of X'*X are all 1s, then there's a nice interpretation of this - ridge regression both shrinks X'*X toward the identity matrix (ignoring correlations between features) and shrinks coefficients by a factor of 1+lambda Image
Jan 1 6 tweets 2 min read
Here's a cute story about risk management and how we traded a name that ran up in price from 250 to over 500 in a couple of hours, and then back down to 200 in about twenty minutes. This is the price chart of $TRB over the last 10 days - Image We were long this name for a while (a little unusual - the holding period for this strategy is around a day) and here I've normalized our dollar position by dividing by our max pos. We won't buy any more when this ratio is above 1, and we start selling when it's above 1.15ish Image
Dec 6, 2023 7 tweets 1 min read
A lot of quant workflows basically look like "do these somewhat related but basically different tasks and then combine the result into a normalized output"

For example - - Pulling together data from different sources, cleaning, mapping symbology etc
- Creating a large number of features as part of a fitting pipeline
- Fitting different models to get a forecast
- Searching over different parameters/strategies in a backtest
Jun 16, 2023 4 tweets 1 min read
This actually seems kinda positive, especially compared to what people were speculating on at the time. bloomberg.com/news/articles/… The Chinese securities held were commercial paper of ICBC, China Construction Bank and Agricultural Bank of China. These are some of the biggest banks in the world, they have trillions of dollars of assets and decent credit ratings.
Jun 9, 2023 9 tweets 4 min read
Quant interview question. Each dot is an average over a few thousand executed orders, x-axis is participation over the execution period (signed order qty divided by market qty traded) and y-axis is how much the market moved over the period. Why is there a discontinuity at 0? Image The quantities are all rescaled/renormalized btw, they don't tell you anything about the answer.
May 23, 2023 4 tweets 1 min read
Apr 2, 2023 4 tweets 1 min read
Nice alpha in this thread. Reminds me of the “up-modify” trick people use on some exchanges to drop lots of small orders in the book, then size them up when they get near top of book without losing queue priority. Not everywhere has this but iykyk. Another great trick is on exchanges that allow users to put stop loss orders directly in the matching engine. If you know what to look for you can identify these and it can be a strong signal that the price is going to move a *lot* once it hits a certain level.
Mar 19, 2023 4 tweets 2 min read
We’ve known this for a while but the last couple of weeks made it clear — trying to analyse what a VC says in terms of true/false is a waste of time.

Applies to @jason @balajis @DavidSacks and many others. True/false is not a dimension that concerns them, nor is right/wrong or whether something is good/bad for the world.

Literally the only thing that matters, the only frame through which it makes sense to analyse what they say, is whether it pumps or harms their bags.
Mar 16, 2023 8 tweets 2 min read
Apparently bookmarks are going to be public now? Anyway here’s a thread of all my bookmarks
Mar 9, 2023 11 tweets 2 min read
I spent some time looking at FTMO and it is absolutely, 100% a scam.

They're not even trying to make money from profitable traders. They make money from people repeatedly paying to take the "FTMO challenge" in the hopes of being allowed to trade a real money account. How does it work? You pay a fee to take the "FTMO challenge" which is a 30 day period where you trade an FX account. The fee varies depending on account size, from $155 for a $10k account to over $1000 for a $200k account.
Feb 17, 2023 4 tweets 1 min read
You’re telling me that a guy who sells online coaching courses is saying that getting a coach is the key to success? Oh my god it’s even more meta than I realised, he sells online courses which coach you to build your own online coaching course.

“It’s no use, Mr James …”
Dec 11, 2022 4 tweets 1 min read
Day 9. Borrow availability.

A lot of factors have good alpha on the short side. In particular it’s pretty easy to find shitcos where you can be pretty sure the price will drop. To put the trade on you first need to secure borrow in order to go short. And if you try this you’ll find that you can’t actually get borrow for a lot of the most attractive opportunities (this is true in developed markets and doubly true in emerging markets)
Dec 4, 2022 8 tweets 2 min read
Day 4. Backtesting with revised data.

This is another form of look-ahead bias but it deserves its own entry because it’s such an easy mistake to make. Take US GDP as an example. The “advance” estimate for US Q4 GDP is released at the end of January. There is then a “preliminary” release at the end of Feb and a “final” release at the end of March.
Dec 3, 2022 10 tweets 2 min read
Day 3. Instantaneous trading.

This is where you assume you can observe a price and then trade at that price. This is obviously false (apart from anything else it takes some time for you to observe a price and act on it, and the price might move in that time) but ... ... often people convince themselves that it's a very benign form of look-ahead, and probably won't materially affect the backtest results.

That *might* be true, it depends on the strategy. But most often it's not.
Dec 3, 2022 9 tweets 2 min read
Day 2. Look ahead in your signals.

This covers any form of using future information to decide what trade to make. There are lots of ways this can creep into your backtest. For example, you are testing a mean reversion strategy on European stocks and you compute the signal with -(r - mean(r)).shift(1). If the stock exchanges in the sample close at different times, you are leaking information from the later closes into the earlier ones.
Dec 2, 2022 8 tweets 2 min read
As a special advent treat I’m going to do 24 days of backtest errors — 24 different ways to mess up your backtest of a quant strategy so that you think you’re going to make money when you won’t (yes I’m starting late, what’s your point) Day 1. Look ahead when picking the trading universe.

You want a set of stocks/futures/coins/whatever to include in your backtest which meet some sensible criteria for market cap, liquidity, average daily volume etc.
Nov 1, 2022 37 tweets 7 min read
Couple of thoughs about trend following is probably the most straightforward systematic trading strategy to implement - you're just buying the stuff that's been going up and selling the stuff that's been going down. It's big business though - the CTA industry (which is largely trend followers) manages ~$350bn in funds and managed accounts, and there is probably half that again in in-house implementations, multi strategy funds etc.
Oct 31, 2022 11 tweets 2 min read
Hard disagree with most of this.

First, the idea that multi-strat managers are raising money now based on track records from when they were smaller. Empirically false - the largest multi strats have managed >$10bn for over a decade, with great returns, and far from raising new money now, they are mostly closed to new investors (despite huge demand).
Apr 14, 2021 7 tweets 2 min read
My advice here was pretty standard - profile, find bottlenecks, use caching/vectorization/numpy/numba to speed up the hot code.

But even better advice is "do less backtesting" (as pointed out by @therobotjames) Backtesting is not a research tool. It belong right at the end of the process and you use it for four things -

1. Final verification of your idea
2. Sensitivity to assumptions
3. Reconciliation vs live trading
4. Non-performance stats like turnover, max net/gross exposure etc