Vertox Profile picture
Quant is love, Quant is life. DM if you're a freelancer and need work.
9 subscribers
Aug 16 6 tweets 3 min read
Moving Averages don't do well when data changes abruptly.

We can do better by solving a 100000-dimensional Second Order Cone Program.

Let's talk about Total variation denoising: Image When to use it:

If you have a noisy dataset whose mean changes abruptly and you want to filter out all the noise and get the underlying process then Total variation denoising is perfect.

In the image below the black line is what we get after denoising. Image
Aug 14 10 tweets 3 min read
Crypto is practically the only big market where retail can compete in market making.

There aren't many sophisticated players and the technology you need to compete is available to everyone.

Here are all the resources you need to learn market making: In this article we build out simple infrastructure in python and NATS and take a simple market making bot online.

It goes over all the components of a market making system and how they play together.

vertoxquant.com/p/how-to-start…
Aug 10 8 tweets 6 min read
There are so many underrated quant resources.

I've discovered those resources over 7+ years of studying quant finance.

And now, they're yours to explore: I've been studying stochastic calculus lately and this blog explains stochastic calculus in a really simple and intuitive way!

jiha-kim.github.io
Jun 25 6 tweets 2 min read
How to make your backtests more accurate.

This is the type of backtest you often see in pairs trading strategies backtested by beginners.

Here is the problem with it 👇
🧵1/n Image Using trades data on a large timescale isn't usually a problem but once you start using minutely data you face a problem: Bid-Ask Bounce.

The last traded price keeps bouncing between the best bid and best ask after each maker order. This movement is not tradable!

2/n Image
Sep 8, 2023 9 tweets 2 min read
Reducing variance via positive cashflow

🧵
1/n
Image Above you can see the pnl of a strategy with an average win of 0.1%, and average loss of 0.09% and standard deviation of 0.1% over 2000 trades.

2/n
Aug 29, 2023 9 tweets 4 min read
The Leverage Effect and Volatility Decay

Why more leverage doesn't necessarily mean more profit and how to find the optimal leverage.

🧵
1/n Let's say you have $100. You do a trade, make 1% and are now at $101. You do a trade again with your $101 and this time you loose 1%.
Intuitively it would seem like you would be break even but if you do the math then 0.99*$101 is actually $99.99. You lost a penny!

2/n
Aug 5, 2023 8 tweets 2 min read
Latency Arbitrage and Lead-Lag, a thread.

🧵
1/n Image Latency arbitrage or Lead-Lag Arbitrage is if you have the same asset on 2 different exchanges and one of them moves slower than the other.

There is also Lead-Lag statistical arbitrage where bigger assets lead smaller assets in the same industry.

2/n
Jul 4, 2023 10 tweets 4 min read
Structural Breaks, what they are, how to spot them and how they appear in finance.

🧵
1/n What is a Structural Break?

A structural break is when a timeseries suddenly starts behaving very differently.
This could be when it switches regimes for example.

2/n
Jun 30, 2023 8 tweets 4 min read
Alternatives to Candlesticks based on time.

🧵
1/n First of all why the hell would we even need that?
There are a few scenarios where those can come in pretty useful.
It can give your data nicer statistical properties like data being more normal.
It can make certain effects like momentum more noticable and easier to trade.

2/n
Jun 26, 2023 11 tweets 3 min read
How to handle outliers

1/n What are outliers?:

Outliers are simply data points in your dataset that are very different from most of your other data points.
The red dot in the following dataset would be considered an outlier:

2/n
Jun 19, 2023 11 tweets 2 min read
Clustering Algorithms and how to use them in Quant Finance

🧵
1/n Image Clustering is about finding groups of whatever you want.
One thing you can do is find clusters of Assets based on certain properties like their returns.
This will give you groups of similar assets that can be used for SMRPs, diversification etc.

2/n
Jun 18, 2023 8 tweets 3 min read
A Strat a Day Episode 3 - Turn of the Month Effect

The turn of the month effect is one of the most popular strategies across all asset classes.

Let's look at a simple example of how you can trade it and then try to improve on it.

🧵
1/n Image So first of all what is the turn of the month effect?

It's the tendency for assets like equities to go up before and after the end of a month.
It's commonly explained by people getting their paychecks during that time, investing into the assets and driving price up.

2/n
Jun 15, 2023 9 tweets 3 min read
Why a pure stationarity test doesn't make sense for a mean reverting portfolio.

🧵
1/n Image First of all how is stationarity defined? Let's look at wikipedia:
"a stationary process is a stochastic process whose unconditional joint probability distribution does not change when shifted in time."

2/n
Jun 10, 2023 12 tweets 3 min read
Numerical Methods in Quant Finance.
A couple of techniques and resources.

Vine-Copula Alpha in the Thread!

🧵
1/n Image Numerical Integration:

Sometimes it is not possible to actually integrate something mathematically because we don't know the antiderivative or even our function we are integrating for example.

2/n
Jun 9, 2023 20 tweets 5 min read
An overview of mathematical optimization techniques and how to use them in trading. If you want to learn about computational optimization techniques then head over to BlackSwans thread: twitter.com/BlackSwan_ptf

1/n Image The first major one is convex optimization. The goal is to maximize or minimize a convex or concave function with a convex contraint function. A convex function is one where you can choose 2 points on the graph and the line between the 2 will always be above the graph.

2/n
Jun 3, 2023 13 tweets 3 min read
A couple of Sports Betting Alphas.
From Latency Arbitrage to Relative Value Trading.

🧵
1/n Image 1. Matched Betting
In Matched Betting you take advantage of the promotions bookmakers offer, let's go through an example.
Bet365 gives you a 100EUR free bet if you place a 100EUR real bet. You can take advantage of this.

2/n
May 27, 2023 12 tweets 2 min read
Momentum.

What it is, what causes it and how to interpret it mathematically

🧵
1/n Image Basically momentum is if price keeps going in one direction. Mathematically this means that returns are positively autocorrelated. Now let's say you have some asset with positive autocorrelation. Should you buy after a positive return? no

2/n
May 21, 2023 7 tweets 2 min read
Spotting the difference between an Arb and a Risk Premium.

🧵
1/n
Example 1:
SBFs Japan Trade (Kimchi Premium)
This one is both imo.
One reason why crypto was trading for more in japan than in the US was because of hype, this is the arb aspect. Another reason would be counterparty risk, some small japanese exchange is a lot more risky.

2/n
May 18, 2023 12 tweets 3 min read
Gradient Descent / Ascent.
What it is, why it works and how to make it work a lot better!

🧵
1/n First of all Gradient Descent / Ascent is an optimization technique to find minima and maxima of some function. You use it in moments where you can't just use regular calculus to find those points. One example is finding the weights that reduce the cost of a Neural Network

2/n
May 13, 2023 5 tweets 1 min read
Mean Reversion Strategies: To stop loss or not to stop loss?

Intuitively a stop loss doesn't make sense in a mean reversion strategy because we expect the mean reversion to be stronger the more it goes against us but there are moments where it makes sense.

🧵
1/n
So first of all you definitely don't want a tight stop loss since you would probably still expect things to revert if they go against you a little. What can make sense it a vey wide stop loss because you assume that your reason for mean reversion is no longer there.

2/n
May 10, 2023 10 tweets 3 min read
What is a Stochastic Volatility Model and a couple of examples.

🧵
1/n Image A Stochastic Volatility Model is a model in which the variance of a stochastic process is itself also a stochastic process.

2/n