[{"content":"Portfolio Splitting and the Kelly Criterion Suppose the Knicks play the Spurs tomorrow.\nA bookmaker believes $P(\\text{Knicks win}) = p$. He sells two fractional contracts, each fairly priced under that belief:\nA $\\$1$ Knicks contract that pays $\\frac{1}{p}$ if the Knicks win. A $\\$1$ Spurs contract that pays $\\frac{1}{1-p}$ if the Spurs win. (Note: Zero vig $\\implies$ fair value = $1)\nA gambler believes $P(\\text{Knicks win}) = q \u003e p$. He has just $1 but wants to grow it aggressively, so he spends:\n$\\$q$ on the Knicks. $\\$(1-q)$ on the Spurs. (This is equivalent to wagering $a = \\frac{q-p}{1-p}$ on the Knicks and leaving the rest in cash.)\nAs the game is about to start, the gambler is feeling good. His expected log-wealth is:\n$$E_q[\\log(W)] = q \\log\\left(\\frac{q}{p}\\right) + (1-q) \\log\\left(\\frac{1-q}{1-p}\\right)$$ Does this formula look familiar? If you’ve taken a course in statistics or machine learning, you will recognize this as the Kullback-Leibler (KL) Divergence, denoted as $D_{\\text{KL}}(q \\parallel p)$.\nInterpretation The Kelly Criterion: The $q, 1-q$ split is algebraically the same as staking $f^* = \\frac{q-p}{1-p}$ on the Knicks per the Kelly criterion. Expected Log-Wealth: The highest possible expected log‑return is the Kullback-Leibler divergence between the gambler’s beliefs and the market’s. Actual Payoff: After the game, his actual wealth-multiplier equals the likelihood ratio ($\\frac{q}{p}$ or $\\frac{1-q}{1-p}$). Finger-Exercises Portfolio Replication: Convince yourself that wagering $a = \\frac{q-p}{1-p}$ on the Knicks and keeping the rest in cash perfectly replicates the gambler’s $q, 1-q$ split portfolio.\nThe Bookie\u0026rsquo;s Perspective: Under the bookie’s beliefs, show that the gambler’s portfolio has fair expected value:\n\\[ E_p[W] = 1. \\]But also show that the bookie\u0026rsquo;s expected log-wealth (under the bookie\u0026rsquo;s beliefs) is:\n\\[ \\begin{aligned} E_p[\\log W] \u0026= p \\log\\left(\\frac{q}{p}\\right) + (1-p)\\log\\left(\\frac{1-q}{1-p}\\right) \\\\ \u0026= -D_{\\text{KL}}(p \\parallel q) \\\\ \u0026\\leq 0. \\end{aligned} \\]How can both statements be true? What, exactly, is the bookie happy about?\n","permalink":"https://xtxinversexty.com/kl-divergence-and-the-kelly-criterion/","summary":"\u003ch1 id=\"portfolio-splitting-and-the-kelly-criterion\"\u003ePortfolio Splitting and the Kelly Criterion\u003c/h1\u003e\n\u003cp\u003eSuppose the Knicks play the Spurs tomorrow.\u003c/p\u003e\n\u003cp\u003eA bookmaker believes $P(\\text{Knicks win}) = p$. He sells two fractional contracts, each fairly priced under that belief:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003eA $\\$1$ Knicks contract that pays $\\frac{1}{p}$ if the Knicks win.\u003c/li\u003e\n\u003cli\u003eA $\\$1$ Spurs contract that pays $\\frac{1}{1-p}$ if the Spurs win.\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cem\u003e(Note: Zero vig $\\implies$ fair value = $1)\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003eA gambler believes $P(\\text{Knicks win}) = q \u003e p$. He has just $1 but wants to \u003ca href=\"https://en.wikipedia.org/wiki/Kelly_criterion\"\u003egrow it aggressively\u003c/a\u003e, so he spends:\u003c/p\u003e","title":"KL Divergence and the Kelly Criterion"},{"content":"I\u0026rsquo;ve read some inane discussions about the validity of the efficient market hypothesis (EMH). I\u0026rsquo;ve even participated in some. Proponents warn that cocky retail traders are naive, and detractors point to historical examples of inefficiencies.\nI claim this is a category mistake by both parties. The EMH is more like a philosophical razor: you should accept it for a given asset, unless you have some information to the contrary. We might as well call it the efficient market null hypothesis.\nThe efficiency of the market depends on the observer, and the information they have.\nThe EMH allows you to hedge Suppose you think $SUNY, a solar energy company, is undervalued; their new patents will cause their stock price to rise. You may be a smart guy, but that price reflects the beliefs of many smart people. Going off of prior alone, it\u0026rsquo;s unlikely you know something they don\u0026rsquo;t; it should take a preponderance of evidence to convince yourself that you know something others haven\u0026rsquo;t adequately considered!\nBut you\u0026rsquo;ve been throrough in your research, and so you buy shares of $SUNY. But your thesis is specific to that company, so you hedge out the industry-related risk by short selling an equal value of shares of comparable companies in the renewable energy sector, like wind or hydroelectric power companies.\nIn so doing, you reject the EMH for $SUNY, but assume it when you hedge. Without special information, you put your trust in the active investment managers of the world to appropriately price your hedging instruments - otherwise, you wouldn\u0026rsquo;t be hedging at all.\nThis isn\u0026rsquo;t an original take Grossman and Stiglitz (1980) showed that the theory of efficient markets entails a paradox. If the market is efficient, there\u0026rsquo;s no point in doing fundamental analysis, which makes the market inefficient, which incentivizes fundamental research again, which makes the market efficient again, ad infinitum.\nIn Efficiently Inefficient, Lasse Heje Pedersen resolves this like so: market prices \u0026ldquo;reflect enough information to make it difficult to make money, but not so efficient that no one wants to collect information and trade on it.\u0026rdquo;\nThe cost of acquiring and digesting information varies. For a dork like me, it is prohibitively expensive to collect information and trade on it, but not so much for sophisticated institutional traders. The latter should reject the EMH much more than me, and indeed they do!\n","permalink":"https://xtxinversexty.com/the-efficient-market-hypothesis-is-a-philosophical-razor/","summary":"\u003cp\u003eI\u0026rsquo;ve read some inane discussions about the validity of the efficient market hypothesis (EMH). I\u0026rsquo;ve even participated in some. Proponents warn that cocky retail traders are naive, and detractors point to historical examples of inefficiencies.\u003c/p\u003e\n\u003cp\u003eI claim this is a category mistake by both parties. The EMH is more like a philosophical razor: you should accept it for a given asset, \u003cstrong\u003eunless you have some information to the contrary\u003c/strong\u003e. We might as well call it the efficient market null hypothesis.\u003c/p\u003e","title":"The Efficient Market Hypothesis is a Philosophical Razor"},{"content":"Elo Scoring Two players have Elo scores $A$ and $B$.\nWith no info other than that, it\u0026rsquo;s generally accepted that\n$P(A\\ beats\\ B) = 1 / (1 + 10^{(B - A) / 400})$\nIf A indeed does beat B, here are the new Elo scores:\n$A' = A + K \\cdot (1 - P(A\\ beats\\ B))$\n$B' = B - K \\cdot (1 - P(A\\ beats\\ B))$\nWhere $K$ is a hyperparameter, usually something between 10 and 40.\nIf A and B go to a draw, this is the update rule:\n$A' = A + K \\cdot (0.5 - P(A\\ beats\\ B))$\n$B' = B - K \\cdot (0.5 - P(A\\ beats\\ B))$\nSo $A$ and $B$ are pulled towards one another.\nChess.com gives new players an Elo of 400 to start.\nStatistical Intuition The first time I saw this, I thought it was gobbledygook. Then I made this graph:\nTurns out, with some algebraic manipulations, one can show that the following is an equivalent system:\nLet $X_A$ be a one-hot encoding of the chess player $A$ Let $Y$ be $1$ if A beat B, $0.5$ if they draw, and $0$ if B beat A $P(A\\ beats\\ B) = 1 / (1 + e^{-\\beta^T (X_A - X_B)})$\nThat looks familiar, right? It\u0026rsquo;s logistic regression without an intercept term. To show these are equivalent, set $A = \\frac{400}{\\ln 10} \\beta^T X_A$.\nAnd then, for the update rule:\n$ \\beta' = \\beta + \\alpha (Y - P(A\\ beats\\ B))^T (X_A - X_B)$\nIgnoring draws, this is the gradient of the binary cross-entropy loss, with the learning rate $\\alpha$ equivalent to a scaled K-factor.\nSo the Elo rating system is stochastic gradient descent on a really, really wide logistic regression model, with a batch size of 1. Every player gets a coefficient, which is their Elo score.\nIs this really more intuitive? Criticisms of the Elo rating system cost a dime a dozen. For instance, suppose you compete in a tournament, and you lose your first match against a similarly-ranked opponent. For your own ego\u0026rsquo;s sake, you should hope that guy does well in the rest of the tournament - if he also beats everyone else, you can believe that his original Elo was an underestimate.\nI believe Elo scores in chess culture play a role similar to that of Black-Scholes in finance. Nobody treats the model as gospel anymore, yet it laid the foundation for options trading as a large, legitimate industry with many participants. Its primary utility is as a shorthand, a social convention, a lingua franca; anything more sophisticated would be a worse coordinating mechanism.\nFor a large number of people to adopt a system, and to mutually employ its outputs to interact with each other, it must be as simple as possible. Had the logistic regression model not been burned into my brain, I would find it far less intuitive than the original Elo formulation, and at any rate impossible to calculate.\nIt adds a new dimension to my understanding of the otherwise almost trite saying: all models are wrong, but some are useful.\n","permalink":"https://xtxinversexty.com/statistical-intuition-for-elo-scores/","summary":"\u003ch1 id=\"elo-scoring\"\u003eElo Scoring\u003c/h1\u003e\n\u003cp\u003eTwo players have Elo scores $A$ and $B$.\u003c/p\u003e\n\u003cp\u003eWith no info other than that, it\u0026rsquo;s generally accepted that\u003c/p\u003e\n\u003cp\u003e$P(A\\ beats\\ B) = 1 / (1 + 10^{(B - A) / 400})$\u003c/p\u003e\n\u003cp\u003eIf A indeed does beat B, here are the new Elo scores:\u003c/p\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cp\u003e$A' = A + K \\cdot (1 - P(A\\ beats\\ B))$\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp\u003e$B' = B - K \\cdot (1 - P(A\\ beats\\ B))$\u003c/p\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003eWhere $K$ is a hyperparameter, \u003ca href=\"https://en.wikipedia.org/wiki/Elo_rating_system#Mathematical_details:~:text=New%20players%20have%20a%20K%C2%A0%3D%C2%A040%2C%20which%20drops%20to%20K%C2%A0%3D%C2%A020%20after%2030%20played%20games%2C%20and%20to%20K%C2%A0%3D%C2%A010%20when%20the%20player%20reaches%202400.%5B31%5D\"\u003eusually something between 10 and 40\u003c/a\u003e.\u003c/p\u003e","title":"Statistical Intuition for Elo Scores"},{"content":"Twitter\nLinkedIn\n","permalink":"https://xtxinversexty.com/contact/","summary":"\u003cp\u003e\u003ca href=\"https://x.com/XTXinverseXTY\"\u003eTwitter\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003e\u003ca href=\"https://www.linkedin.com/in/john-curcio-ml/\"\u003eLinkedIn\u003c/a\u003e\u003c/p\u003e","title":"Contact"},{"content":"Hello, world! It\u0026rsquo;s me, blog!\n","permalink":"https://xtxinversexty.com/inaugural-post/","summary":"\u003cp\u003eHello, world! It\u0026rsquo;s me, blog!\u003c/p\u003e","title":"Inaugural post"}]