The simpler case I am considering is when we have two bets, A and B, where the value after taking a turn after each bet is described as the following: \begin{equation} F_{A}(f_{A}) = \begin{cases} 1+u_{A}f_{A} & \text{with the probability $p_{A}$}\\ 1-d_{A}f_{A} & \text{with the probability $1-p_{A}$}\\ \end{cases} \end{equation}
\begin{equation} F_{B}(f_{B}) = \begin{cases} 1+u_{B}f_{B} & \text{with the probability $p_{B}$}\\ 1-d_{B}f_{B} & \text{with the probability $1-p_{B}$}\\ \end{cases} \end{equation}
Where $f$ is a fraction of your total asset, $a$ and $b$ are the return on the bet for a succesful and unsuccessful bet.
By the kelly criterion, when only considering bet A, the optimum fraction f is the following, where
\begin{equation} f = \dfrac{p_A}{d_A} - \dfrac{1-p_A}{u_A} \end{equation}
When taking into consideration of both bets, and under the assumption that they are independent, we have \begin{equation} F_{A, B}(f_{A}, f_{B}) = \begin{cases} 1+u_{A}f_{A}+u_{B}f_{B} & \text{with the probability $p_{A}p_{B}$}\\ 1+u_{A}f_{A}-d_{B}f_{B} & \text{with the probability $p_{A}(1-p_{B})$}\\ 1-d_{A}f_{A}+u_{B}f_{B} & \text{with the probability $(1-p_{A})p_{B}$}\\ 1-d_{A}f_{A}-d_{B}f_{B} & \text{with the probability $(1-p_{A})(1-p_{B})$}\\ \end{cases} \end{equation}
From what I understand, I can take $\mathop{\mathbb{E}}\ln((F(f_{A}, f_{B})))$ and take partial derivative w.r.t. $f_{A}$ and $f_{B}$ and find the pair $(f_{A}, f_{B})$ to maximize the expected return.
However, How do I find the pair $(f_{A}, f_{B})$ when the two bets are not independent? That is, how do I modify the equation to take into account the correlation between $F_{A}(f_{A})$ and $F_{B}(f_{B})$?
Furthermore, generalizing this situation to when we have the return of the bets to be a continuous random variable, where $P(X_{i}) = P_{i}$, with the value comming out of each turn in the bet as $1+fX_{i}$, what is the equivalent kelly fraction pair $(f_{A}, f_{B})$?