Kelly Allocation
Install and import#
npm install fintech-algorithmsimport { kellyAllocation } from "fintech-algorithms/portfolio-construction/bayesian-and-robust-allocation/kelly-allocation";Signature#
kellyAllocation(returns, probabilities, maxIterations, tolerance)Maximizes expected logarithmic growth over a discrete scenario set, separating the long-run growth criterion from the single-coin-toss intuition.
Parameters#
| Name | Type | Notes |
|---|---|---|
returns | `S x n` matrix | decimal simple return/scenario |
probabilities | length `S` vector | probability optional |
maxIterations | unknown | |
tolerance | unknown |
Worked example#
executed Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.
Input#
[
[0.1, -0.05],
[-0.05, 0.1],
[0.02, 0.02]
][0.3333333333333333, 0.3333333333333333, 0.3333333333333333]Call#
kellyAllocation(returns, probabilities, maxIterations, tolerance)Returns#
object with 8 fields: weights, expectedLogGrowth, wealthFactors, minimumWealthFactor, arithmeticExpectedReturn, iterations, projectedGradientNorm, status
{
"weights": [0.5, 0.5],
"expectedLogGrowth": 0.023062617492307515,
"wealthFactors": [1.025, 1.025, 1.02],
"minimumWealthFactor": 1.02,
"arithmeticExpectedReturn": 0.02333333333333333,
"iterations": 1,
"projectedGradientNorm": 0,
"status": "optimal"
}Other exports#
This module also exports
logGrowth, fractionalKelly. Every module additionally exports run as an alias of its
primary function, and a meta object carrying its catalog id, domain, family,
shape and article URL.
Diagrams#
Calculation flow#
Diagram
flowchart TB
N0[Read scenario model] --> N1
N1[Check positive wealth] --> N2
N2[Maximize expected log] --> N3
N3[Check residual and factors] --> N4
N4[Scale risky mix into cash]
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- A New Interpretation of Information Rate — J. L. Kelly Jr.
- Risk-Constrained Kelly Gambling — Enzo Busseti, Ernest K. Ryu, and Stephen Boyd.
- Distributional Robust Kelly Gambling — Qingyun Sun and Stephen Boyd.