Last active
September 16, 2018 18:30
-
-
Save raddy/d55f16cafc529ee2d53334b8b535a4d9 to your computer and use it in GitHub Desktop.
Optimal Kelly Fraction 4 Moments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def kelly_four_moments(mu, sigma, c3, c4): | |
| return (c3/(3*c4) - (c3**2/c4**2 - 3*(mu**2 + sigma**2)/c4)/(3*(-c3**3/c4**3 + 9*c3*(mu**2 + sigma**2)/(2*c4**2) + np.sqrt(-4*(c3**2/c4**2 - 3*(mu**2 + sigma**2)/c4)**3 | |
| + (-2*c3**3/c4**3 + 9*c3*(mu**2 + sigma**2)/c4**2 - 27*mu/c4)**2)/2 - 27*mu/(2*c4))**(1/3)) | |
| - (-c3**3/c4**3 + 9*c3*(mu**2 + sigma**2)/(2*c4**2) + np.sqrt(-4*(c3**2/c4**2 - 3*(mu**2 + sigma**2)/c4)**3 | |
| + (-2*c3**3/c4**3 + 9*c3*(mu**2 + sigma**2)/c4**2 - 27*mu/c4)**2)/2 - 27*mu/(2*c4))**(1/3)/3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment