DGN Quant Profile Banner
DGN Quant Profile
DGN Quant

@DegenQuant

3,364
Followers
105
Following
49
Media
343
Statuses

—— Quant Dev / wide quotooor —— “Give a man an alpha, feed him for a day. Teach a man to find alpha, feed him for a lifetime."

the orderbook
Joined October 2021
Don't wanna be here? Send us removal request.
@DegenQuant
DGN Quant
8 months
One time I fucked up my python environment so bad that I just bought a new laptop
16
35
597
@DegenQuant
DGN Quant
6 months
Tweet media one
5
17
342
@DegenQuant
DGN Quant
1 year
The two approaches to research in quant finance: 1. Hypothesis -> Data 2. Data -> Hypothesis A thread on these two approaches: (1/N)
5
45
250
@DegenQuant
DGN Quant
1 year
Structural break modeling in stat arb: Thread 1 of 2 - Optimization of mean reverting portfolios (1/N)
Tweet media one
9
37
189
@DegenQuant
DGN Quant
7 months
What a shock that you can’t just shove a thousand unknown features into some neural net shitpile and generate alpha
@pedma7
pedma
7 months
Numerai is a crowd-sourced AI hedge fund. They paid $72,002,141 to data scientists to beat the market. Despite these efforts, since 2019, it has underperformed the S&P500. Why is trading the hardest problem in the world?
54
60
552
12
7
176
@DegenQuant
DGN Quant
1 year
Causal inference and its applications in quant finance, a thread: (1/N)
4
21
155
@DegenQuant
DGN Quant
5 months
Super hyped to say I’ll be starting my first quant dev job soon! See you in the orderbooks 🫡 *larp status decreases slightly*
17
1
131
@DegenQuant
DGN Quant
8 months
basic exchange type ui done, now to connect the algo 📈
9
2
124
@DegenQuant
DGN Quant
5 months
Fixed size array vs vec orderbook
Tweet media one
7
5
106
@DegenQuant
DGN Quant
7 months
this ui stuff is fun
17
1
92
@DegenQuant
DGN Quant
9 months
Doing HFT as a solo operation == 10% research, 90% dev
7
1
92
@DegenQuant
DGN Quant
7 months
Statistics courses are all fun and games until they make you use R instead of python 🤢
10
2
84
@DegenQuant
DGN Quant
6 months
LFGGGG huge improvement
Tweet media one
7
5
78
@DegenQuant
DGN Quant
6 months
in the arena, quoting wide
13
1
67
@DegenQuant
DGN Quant
6 months
Somewhere out there, some math student is gonna read this post, fuck around and spend god knows how long finding out
@ekrii3
ekri
6 months
Feeling super generous so, somewhat reluctantly, here are 5 industry secret holy grail books that have immensely assisted me in my quantitative trading endeavours (as an ex manual HFT mm) that I highly recommend new and experienced traders pick up if they can. No specific order.
83
127
2K
5
0
69
@DegenQuant
DGN Quant
8 months
Tweet media one
@ihzn7
ihzan
8 months
gm Really didnt expect to run this account up to 10m+ within a month after getting rekt in January and starting over in futures with 300k time to set some new yearly goals
Tweet media one
182
65
1K
4
4
57
@DegenQuant
DGN Quant
11 months
Going from only knowing python / r to learning a low level language (c/c++/rust) has made me realize so many important nuances in building production infra that I normally wouldn’t have even thought about
3
0
55
@DegenQuant
DGN Quant
3 months
Noticed spikes in latency at exactly 10ms every time in a very important single threaded process on the hot path, pinned to a core. Turns out isolcpus was not set to isolate the core on this instance, so this was all due to kernel interference!
Tweet media one
1
0
49
@DegenQuant
DGN Quant
8 months
building a dashboard for my algo ❌ building an algo for my dashboard ✅
1
1
47
@DegenQuant
DGN Quant
3 months
The most satisfying part of hft: the feeling of pushing a change to prod and within hours, seeing that your pnl has dramatically improved
2
2
47
@DegenQuant
DGN Quant
7 months
One big project > a bunch of trivial small projects imo. Market making is a good thing to focus on, it forces you to have to solve problems in systems design, math / stats, game theory etc. Build a simple system and iterate one step at a time
@Vertox_DF
Vertox
7 months
Quants of Twitter, what projects would you do if you were a student trying to get into quant?
Tweet media one
13
1
56
2
0
43
@DegenQuant
DGN Quant
5 months
just shaved 200us off my code (i commented out a println)
3
1
41
@DegenQuant
DGN Quant
3 months
Maker strats take so much more infra work than taker strats its not even funny
5
0
42
@DegenQuant
DGN Quant
6 months
Recruiters really be like hey we saw you have experience with python and rust so we thought you’d be a great fit for this role as a beekeeper
2
0
39
@DegenQuant
DGN Quant
9 months
Spent the last few months learning rust and building infra, finally about to go live with my first proper MM strat. Lfg
4
0
37
@DegenQuant
DGN Quant
5 months
POV: you have a meeting with the dev who wrote hyperliquid’s rust sdk
5
0
37
@DegenQuant
DGN Quant
8 months
Went from building mft systems in python to hft in rust, finally working on mft stuff in python again, I’ve become a MUCH better and faster dev
3
0
35
@DegenQuant
DGN Quant
3 months
Making a streamlit dashboard + using flat files in aws S3 (or similar) as your db is actually pretty nice and is a fraction of the cost of a traditional cloud db / grafana
6
0
32
@DegenQuant
DGN Quant
4 months
Turning 25 today 🎉🎉
9
0
30
@DegenQuant
DGN Quant
10 months
If anyone is interested in some orderbook / trade / other market data for any cex let me know. I’ve built a scraper (works for binance, bybit, bitget, okx so far). As long as I can keep the aws bill under a certain number I’ll make sure it’s free for now! Feel free to dm
3
0
30
@DegenQuant
DGN Quant
6 months
Saw a kid wearing a citadel shirt, i said nice citadel merch, he said what’s citadel
1
0
29
@DegenQuant
DGN Quant
9 months
The amount of crypto HFT firms using carrier pigeons for their trading algorithms would shock most CT users lol
3
1
26
@DegenQuant
DGN Quant
4 months
@BlackSwan_ptf high performance computing and python don’t belong in the same sentence 😭
4
0
25
@DegenQuant
DGN Quant
8 months
The masculine urge to build an orderbook heatmap chart that i absolutely do not need cause it’ll make my dashboard look sexy
3
1
24
@DegenQuant
DGN Quant
6 months
busy spinning and better deserialization much needed
Tweet media one
3
0
23
@DegenQuant
DGN Quant
6 months
New infra features done: 1. WsPool: Create N ws connections, measure latency, keep the ones w lowest latency 2. Redundant streams: Multiple ws for a given stream (book/trade etc), first recipient processes a given message (indexed by some id field) results to come!
3
0
22
@DegenQuant
DGN Quant
6 months
@Dub0x3A was gonna take a break from coding all day, then i read this, back to it then
2
0
21
@DegenQuant
DGN Quant
11 months
@BlackSwan_ptf Distance based metrics aren’t very robust. With pairs in general, you’ll always have some out of sample decay, try to optimize for maximal reversion and volatility, penalize for structural breaks, measure performance after in sample, then trade pairs that remain stable
2
0
18
@DegenQuant
DGN Quant
7 months
read through some old code and forgot how based my naming conventions were
Tweet media one
4
0
19
@DegenQuant
DGN Quant
7 months
a small part of me wants to go down the reinforcement learning rabbit hole and apply it to market making even though I know it’s a mistake
3
0
18
@DegenQuant
DGN Quant
11 months
Be careful of unintended behavior when developing an asynchronous application. A lesson learned from a trading system I worked on recently: (1/N)
4
1
20
@DegenQuant
DGN Quant
5 months
huge gains @levbeta
Tweet media one
3
0
19
@DegenQuant
DGN Quant
8 months
Building a dashboard app to watch the mm algo in action / control it, gonna be a game changer 😤
2
0
19
@DegenQuant
DGN Quant
6 months
Doing a rework of the infra, before I would handle ob updates on one thread, then send the entire ob to the strategy thread via a channel. Now sending the processed deltas to the strategy thread w a ring buffer, busy spinning on the recv end and applying updates there
4
0
19
@DegenQuant
DGN Quant
1 year
There are definitely many ways to apply this to trading, but I’ll leave that as an exercise for the reader ;) This article is also a great resource if you’re interested in a deeper look (9/N)
0
0
17
@DegenQuant
DGN Quant
6 months
internal tick to trade looking pretty decent at ~25us now, time to full send network optimizations
3
0
17
@DegenQuant
DGN Quant
8 months
I call her bayes the way she distribute that posterior
2
1
17
@DegenQuant
DGN Quant
9 months
*GIL has entered the chat*
Tweet media one
1
0
16
@DegenQuant
DGN Quant
1 year
A method for detecting breaks is the recursive CUSUM method, which defines break points recursively based on cumulative forecasting error. CUSUM is robust to heteroskedasticity and can detect multiple breakpoints. (6/N)
Tweet media one
1
1
15
@DegenQuant
DGN Quant
3 months
I’ve been getting into poker lately, it’s so satisfying in that it feels like running a trading system, except I get to look my counterparty in the eyes when I take his money
3
0
17
@DegenQuant
DGN Quant
9 months
Crazy how my math skills have decayed after spending months on the dev grind 🥲
1
0
15
@DegenQuant
DGN Quant
7 months
Aligning trade and ob data for research is a bit tricky, make sure your timestamps correspond to matching engine time, not send time. The state of the book at trade time is what matters, though you can’t trade on this info until it reaches your system some time later
2
0
14
@DegenQuant
DGN Quant
6 months
A lot of people like to hate on Java, but Java has this very cool feature where any code you write instantly becomes legacy code
1
0
14
@DegenQuant
DGN Quant
1 year
Data -> Hypothesis: Starting with data and a broad research question, then developing informative features to model. - Alpha comes from features more than models - Overly complex models / poor features -> overfitting - Many approaches to the problem -> more orthogonal (4/N)
2
0
13
@DegenQuant
DGN Quant
1 year
Both approaches have their pros and cons, and neither will work if data is poorly used. Lookahead bias, survivorship bias, low degrees of freedom, over/underfitting, incorrectly modeling costs and other backtesting errors are all common mistakes that can ruin alphas. (9/9)
3
0
12
@DegenQuant
DGN Quant
6 months
Crypto exchange idea: make all takers take an iq test, left tail and right tail iq takers get their trades matched to separate degen / toxic orderbooks
1
0
13
@DegenQuant
DGN Quant
1 year
Hypothesis -> Data: Starting with a hypothesis about how markets function based on prior research, translating it into code and testing it with historical or live data. - Fewer ideas tested -> Lower chance of spurious conclusions (multiple testing bias) (2/N)
2
0
12
@DegenQuant
DGN Quant
1 year
Rather, you need a method which can be used to detect breaks in real time with minimal delay and does not cause lookahead bias. More on this in part 2! (9/N)
0
1
13
@DegenQuant
DGN Quant
8 months
@0xSmartCrypto I was overdue for a new laptop, the python env was just the breaking point lol
1
0
11
@DegenQuant
DGN Quant
6 months
agreed (I’m self employed)
@dklineii
Dave Kline
6 months
Your boss is a coward and it's killing your career. Here's the honest feedback you need to hear:
7
57
441
0
0
12
@DegenQuant
DGN Quant
7 months
dang, my internal tick to trade latency is a lot faster than I expected, and I haven’t even optimized yet lmao
3
0
11
@DegenQuant
DGN Quant
3 months
I dreamt that I fixed some bug in my infra, woke up and it was still there 😩
2
0
10
@DegenQuant
DGN Quant
6 months
If my counterparty’s desk looks like this, im having a good day 💸
@Ashcryptoreal
Ash Crypto
6 months
FUCK THIS CRYPTO SHIT! DOWN $1,000,000 IN 2 HOURS I’M DONE WITH THIS SCAM
Tweet media one
2K
716
8K
0
1
9
@DegenQuant
DGN Quant
9 months
@gumby_arc it’ll take longer initially, but I highly recommend abstracting all the exchange logic you can so all you have to do to connect an exchange is pass args for the exchange’s unique traits like message formatting, signing requests etc
1
0
7
@DegenQuant
DGN Quant
1 year
There are 2 types of pain: needless pain and pain from poorly documented crypto exchanges
1
0
8
@DegenQuant
DGN Quant
1 year
- If prior research had alpha once, some extension of it likely has alpha - Minimally orthogonal to other researchers' work -> more competition / alpha decay - Analytical methods often make unrealistic modeling assumptions -> needs addressing (3/N)
1
0
8
@DegenQuant
DGN Quant
1 year
In the case of a mean reverting portfolio, sudden and prolonged divergences from the local mean are often a result of structural breaks, which are a major form of tail risk in stat arb. (2/N)
1
1
8
@DegenQuant
DGN Quant
6 months
maybe i should be nicer to copilot so i dont end up on the AGI kill list when it goes full terminator
Tweet media one
1
0
8
@DegenQuant
DGN Quant
6 months
@Dub0x3A Major players in hft very unhappy to see their alpha leaked like this 😫
1
0
8
@DegenQuant
DGN Quant
6 months
Taleb has a perpetual I was just cut off in traffic and im pissed kinda vibe
@yacineMTB
kache
6 months
NNT is a Grade A Imbecile that is grumpy, and wrong about most things. But god damn was he spitting when he came up with "antifragile"
Tweet media one
71
9
663
0
0
7
@DegenQuant
DGN Quant
1 year
This concept is very useful in modeling lead-lag relationships between variables. An example of this is applying granger causality to test whether some time series Y can be predicted with a lagged version of another time series X. (5/N)
1
0
7
@DegenQuant
DGN Quant
11 months
It’s really been a bad year for the name Sam
0
0
7
@DegenQuant
DGN Quant
6 months
For those of you interested in a trading terminal / dashboard, which features would you want the most? DM’s always open 🤝
Basis/funding arb tab
28
Customizable metrics
15
Cross exchange mm tab
25
Other (pls comment)
3
3
0
7
@DegenQuant
DGN Quant
11 months
This wasn’t exactly a catastrophic issue, but hopefully provides some insight into how you can run into unintended behavior with async if you’re not careful. (here’s a cookie for reading this far 🍪)
0
0
7
@DegenQuant
DGN Quant
1 year
The theory first approach might look like taking a well-established idea, such as cointegration based pairs trading, and extending it to more advanced applications. (5/N)
2
0
6
@DegenQuant
DGN Quant
3 months
@dom67191 Of course, not every hypothesis you have will be right. It’s kinda a cost / benefit analysis, where your cost is often code complexity. Things like reliability, tail latency, throughput etc. all contribute to long run pnl, even if you don’t see an impact immediately
1
0
4
@DegenQuant
DGN Quant
1 year
More formally, if the variance of your prediction of Y given all information in the universe is lower than the variance of the same prediction without X, then X granger causes Y. (4/N)
1
0
6
@DegenQuant
DGN Quant
1 year
One common approach to causal inference is called Granger Causality. The core idea of granger causality is based on the ability to predict a variable, given information from other variables. (2/N)
2
0
6
@DegenQuant
DGN Quant
1 year
@BeatzXBT the oh shit moment when you check your s3 logs and see thousands of lines of error messages lmao
1
0
5
@DegenQuant
DGN Quant
1 year
@crypto_hades have you seen his ex gf? he got pretty close lmao
1
0
6
@DegenQuant
DGN Quant
9 months
@Vertox_DF @mattomattik He’s just adding more uninformed flow to the market, let him cook 🤝
0
0
6
@DegenQuant
DGN Quant
1 year
First start with an idea; “Can I extend to find multivariate cointegration? Why would there be an edge in doing so?” See if any research on the idea already exists, then implement, test and improve upon. (6/N)
2
0
6
@DegenQuant
DGN Quant
1 year
For the bivariate case, even if your pair is mean reverting, trading both assets when only one is likely to drive most of the portfolio’s reversion will be inefficient and will likely be -EV after fees. (7/N)
1
0
6
@DegenQuant
DGN Quant
1 year
Look at the data. Is there an effect? Create features that capture this effect, i.e difference in rolling % change in some sentiment score between the pair’s assets, then model and test. (8/N)
2
0
6
@DegenQuant
DGN Quant
5 months
@quantymacro CEO of ridge discovers non linear models? Big if true
0
0
6
@DegenQuant
DGN Quant
5 months
@phoenixstealthy @PKycek You use a stop loss cause no alpha, I use a stop loss cause im afraid the exchange api is going to fail, we are not the same
0
0
6
@DegenQuant
DGN Quant
1 year
If the inclusion of a variable X helps predict a variable Y better than the same prediction without X, then it is said X contains some unique information regarding Y, and therefore X granger causes Y. (3/N)
1
0
5
@DegenQuant
DGN Quant
6 months
@frothybeverage The mid freq 2 sharpe to HFT pipeline is so real
1
0
5
@DegenQuant
DGN Quant
1 year
The data first approach can look like starting with price/volume, fundamentals, alt data, and looking to answer a broader research question such as “How do changes in relative news/sentiment with cointegrated assets affect pair tradability?” (7/N)
2
0
5
@DegenQuant
DGN Quant
6 months
gonna post the before and after performance when it’s done!
0
0
5
@DegenQuant
DGN Quant
1 year
In testing for stationarity when forming mean reverting portfolios, with an ADF test for example, structural breaks inflate the p value of the test and cause a non rejection of the NH, implying non stationarity. (3/N)
1
1
5
@DegenQuant
DGN Quant
3 months
@BlackSwan_ptf the most reputable, indisputably most valuable career advice for quantitative finance hands down
1
0
5
@DegenQuant
DGN Quant
8 months
@phoenixstealthy @BlackSwan_ptf Building a basic MM system is a great project to learn rust, i highly recommend it
1
0
5
@DegenQuant
DGN Quant
8 months
@minimaximinis It’s a desktop app I built, backend in rust, front end react
3
0
5
@DegenQuant
DGN Quant
8 months
@LilQwantXBT sharing resources across threads without major contention issues
0
0
5
@DegenQuant
DGN Quant
1 year
Modeling lead lag dynamics can be very useful in trading, a simple example is in determining which assets to trade in a stat arb portfolio. (6/N)
1
0
5
@DegenQuant
DGN Quant
1 year
Determining which asset is a granger leader and which is a granger follower can help determine which is likely to drive an expected mean reversion. I.e: if X lags Y by 1 minute, then X only trade X since it is likely the one driving most mean reversion. (8/N)
1
0
5