Assuming you are compounding returns, the optimal strategy is given by:
μ/σ^2
For your strategy this is 0.05/0.01 = 5x, but because of your constraint of a maximum of 2x, then you'd choose 2x. From a first principles basis, the formula is derived by:
- Assuming that the change in asset price, dS, is given by:
dS = Sμ * dt + Sσ * dW
Since leverage, λ, is instantaneously linear for returns (+1% on 2x leverage = 2%), levered returns are given by:
λ * dS/S = λ * (μ * dt + σ * dW)
- In the continuous case, the log returns are given by:
ln((S_t + dS)/S_t) = (μ - σ^2/2) * dt + σ * dW
The '- σ^2/2' term comes from the second term of the Taylor series expansion of ln(x+1).
In the levered case, the leverage is squared in the variance term, meaning the levered log/continuously compounded returns are given by:
(λμ - λ^2σ^2/2) * dt + λ*σ * dW
- The expected levered return is given by:
(λμ - λ^2σ^2/2) * dt
Intuitively, one can see that if leverage or variance is too high, the expected return turns negative. One can differentiate the function with respect to λ:
dR_λ/dλ = (μ - λ*σ^2)*dt
Setting to 0 to find the maximum:
μ = λ*σ^2
Solving for λ:
μ/σ^2 = λ
Note that this is only the optimal leverage when returns are definitely defined by a normal distribution, with no sampling error of the mean or volatility. In markets we rarely see returns globally defined by their long-run means or variances (though, perhaps locally we do with more frequent measurements), and with higher kurtosis and non-zero skewness, it is ill-advised to lever as high as the formula would indicate. Half is a popular alternative.