[HN Gopher] Making Markets on Kalshi
___________________________________________________________________
Making Markets on Kalshi
Author : andes314
Score : 38 points
Date : 2025-02-17 00:26 UTC (22 hours ago)
(HTM) web link (rlafuente.com)
(TXT) w3m dump (rlafuente.com)
| andes314 wrote:
| I built a market making algorithm for Kalshi, an event futures
| exchange. The algorithm dynamically places bids and asks to
| capture the spread while managing inventory risk. It supports
| multiple strategies running in parallel, each with its own
| configuration. The codebase is located at
| https://github.com/rodlaf/kalshimarketmaker.
| swilliams231 wrote:
| This is awesome. I tried doing something like this but had to
| put it on hold due to college classes/exams. Have you had any
| success with this strategy?
| andes314 wrote:
| I gave it some cash but in the end, with my risk
| configuration, it wasn't 'exciting' enough because orders
| don't really get taken very frequently. I think You'd have to
| deploy much more cash than I did (> $1000) and trade at least
| a couple dozen securities to really make it 'fun'.
|
| A major improvement to the software that I didn't get around
| to was a script to identify which securities offer the best
| market making opportunities (e.g., maybe by generating a
| custom YAML file).
| swilliams231 wrote:
| Did you try using it on the temperature markets? Those seem
| to get the most consistent trading volume.
|
| Also, LMK if you want some of the data, I collected I can
| share this via an S3 bucket. It's from the chicago max temp
| market. I ended up scrapping my strategy (not market
| making), but don't want the data to go to waste.
| zietzm wrote:
| Nice work! Code is super readable. Are you planning to keep
| improving it, or was this more an experiment to learn?
| andes314 wrote:
| This was an experiment to both 1) learn how market making works
| and 2) figure out what is so hard about it. My main insight
| from this process is that order management--making sure only
| the orders you want are placed, and fast, is a pretty complex
| software problem. The algorithm itself seems to be one of the
| easier things to implement.
| mgaunard wrote:
| I find that the best way to solve that is to make the
| strategy define its desired state, and then you have another
| component that diffs the current and desired states to
| identify the necessary transactions to send out as well as
| their priority based on the nature of the diff, then finally
| go to a scheduler.
| maest wrote:
| How big are the kalshi markets anyway?
| andes314 wrote:
| Not as big as other markets, but growing fast!
| boshalfoshal wrote:
| The markets that are basically derivatives of financial
| products (qqq/spy closing price, oil, rates, etc) have pretty
| decently sized volume but are likely pretty efficiently priced
| and most likely have institutions market making on them.
|
| The more niche markets are orders of magnitude smaller and are
| probably less efficient. However, market making on some low
| volume, niche market probably won't pay much.
| DiscourseFan wrote:
| One of the exceptions to that was of course the recent
| election, but events with such high volumes on that scale of
| unpredictability are quite rare.
| ammario wrote:
| Daily trading volume is about ~$5m
| ammario wrote:
| Cool to see. I'm currently #1 on the Kalshi volume leaderboard
| (https://kalshi.com/social/leaderboard) with a proprietary market
| making algorithm.
|
| There is plenty of money to be made on Kalshi, but I had to
| rethink the math from the ground up as most of the literature
| describes highly liquid, somewhat stable markets.
|
| One small change you could make to your algorithm is to calculate
| the skews/spreads in log-odds space. A change in price from 50c
| to 49c represents a very small delta in expected return whereas
| 2c to 1c is a doubling. Dealing with probability contracts in
| log-odds controls for this effect.
| vagab0nd wrote:
| Arbitraging is so 2024. The future is prediction market
| manipulation/crowd funding. Imagine shorting "asteroid hitting
| earth" and using the proceeds to divert the asteroid.
___________________________________________________________________
(page generated 2025-02-17 23:01 UTC)