Solving Lagrange Optimization / System Of Equations / Multivariate Kelly Formula

77 Views Asked by At

I am hoping the Stack Exchange community can help me figure out why my Lagrange optimization is outputting a value outside of the constraints.

We have the option of betting on three mutually exclusive outcomes, A and B. There is a third outcome, C, which we are not betting on. Based on the Kelly Formula, I am trying to determine the optimal fraction of bankroll to bet on A and B which maximizes E(r).

Pr(A) = 0.5
Pr(B) = 0.25
Pr(C) = 0.25

Pr(A) + Pr(B) + Pr(C) = 1.

A pays 4 (fractional odds of 4)
B pays 2 (fractional odds of 2)

$F_A$ = fraction of bankroll bet on A
$F_B$ = fraction of bankroll bet on B
$F_D$ = fraction of bankroll not bet

$\textbf{1) Constraints:}$
$F_A$ +$F_B$ +$F_D$ = 1
$0 \leq F_A \leq1$
$0 \leq F_B \leq 1$
$0 \leq F_D \leq 1$

$\textbf{2) The Kelly formula (objective equation we are maximizing) is:}$
$E(r) = 0.5log(1+4F_A)+0.25log(1+2F_B)+0.25log(F_D)$

$\textbf{3) The Lagrangian is:}$ $L(F_A,F_B,F_D,\lambda)=0.5log(1+4F_A)+0.25log(1+2F_B)+0.25log(F_D)-\lambda(F_A+F_B+F_D-1)$

$\frac{\partial L}{\partial F_A}=\frac{4 * 0.5}{1+4 * F_A} - \lambda$

$\frac{\partial L}{\partial F_B}=\frac{2 * 0.25}{1+2 * F_B} - \lambda$

$\frac{\partial L}{\partial F_D}=\frac{0.25}{F_D} - \lambda$

$\frac{\partial L}{\partial \lambda}=-(F_A+F_B+F_D -1)$

$\textbf{4) Setting the partial derivatives equal to zero and solving for the bet fraction:}$

$F_A=\frac{0.5}{\lambda} - \frac{1}{4}$

$F_B=\frac{0.25}{\lambda} - \frac{1}{2}$

$F_D=\frac{0.25}{\lambda}$

$\textbf{5) Solving System of Equations:}$
$F_A = 1-F_B-F_D = 1 - (\frac{0.25}{\lambda} - \frac{1}{2}) - (\frac{0.25}{\lambda})$

$F_B = 1 - F_A - F_D = 1 - (\frac{0.5}{\lambda} - \frac{1}{4}) - (\frac{0.25}{\lambda})$

$F_D = 1 - F_A - F_B = 1 - (\frac{0.5}{\lambda} - \frac{1}{4}) - (\frac{0.25}{\lambda} - \frac{1}{2})$

$\textbf{6) Subjecting Bet Fractions to Constraint 0 $\leq$ $F_i$ $\leq$ 1}$

$\textbf{$F_A$}:$
$0 \leq F_A \leq 1$
$0 \leq (1 - (\frac{0.25}{\lambda} - \frac{1}{2}) - (\frac{0.25}{\lambda})) \leq 1$
$-1.5 \leq -(\frac{0.25}{\lambda} -(\frac{0.25}{\lambda}) \leq -0.5$
$\lambda \geq \frac{1}{3}$
$\lambda \leq 1$

$\textbf{$F_B$}:$
$0 \leq F_B \leq 1$
$0 \leq 1 - (\frac{0.5}{\lambda} - \frac{1}{4}) - (\frac{0.25}{\lambda}) \leq 1$
$-1.25 \leq -(\frac{0.5}{\lambda} -(\frac{0.25}{\lambda}) \leq -0.25$
$\lambda \geq 0.6$
$\lambda \leq 3$

$\textbf{$F_D$}:$
$0 \leq F_D \leq 1$
$ 0 \leq 1 - (\frac{0.5}{\lambda} - \frac{1}{4}) - (\frac{0.25}{\lambda} - \frac{1}{2}) \leq 1$
$-1.75 \leq -\frac{0.5}{\lambda} - \frac{0.25}{\lambda} \leq -0.75$
$\lambda \geq 0.428571429$
$\lambda \leq 1$

The smallest $\lambda$ is 0.6.

$\textbf{7) Plugging lambda into partial derivatives}$

$F_A=\frac{0.5}{0.6} - \frac{1}{4} = \frac{7}{12}$

$F_B=\frac{0.25}{0.6} - \frac{1}{2} = -\frac{1}{12}$

$F_D=\frac{0.25}{0.6} = \frac{5}{12}$

$\textbf{Questions}$

A)) Considering the constraint $0 \leq F_i \leq 1$ and $F_A + F_B + F_B = 1$, why is $F_B$ negative and why do the three fractions not add up to 1? I cannot find a math error.

B) If I am trying to maximize E(r), do I want to find the smallest lambda subject to the constraints? If yes, how do I know this?

C) Why am I not able to solve for $\lambda$ directly from part 3? If I do, the smallest $\lambda$ subject to the constraints is not 0.6.

I appreciate any assistance in advance!