Kelly again

Discussion in 'Risk Management' started by ronblack, Aug 22, 2007.

  1. ronblack


    Is %K the amount to put at risk or the amount to invest?

    It seems there are conflicting views as expressed in another thread.

    For instance, if equity is 100,000 and %K is 0.25 do we size position so that:

    1) 25,000 is lost if losing trade?

    2) 25,000 is used to determine the number of contracts for a given exit price?

    For example, if the stop is 10 per contract and price is 100 then:

    1) number of contracts = 25000/10 = 2500


    2) number of contractS= 25000/100 = 250

    Can someone clarify this and explain why?

    I believe the answer is (1) above. The problem is that 2500 x 100 = 250,000 which exceeds the account equity so only 1000 contracts can be bought.

    I wonder if this is a problem with Kelly formula, i.e. the fact that it determines shares without looking at price.

  2. maxpi


    I think it's the portion of your bankroll you should put on a bet. One interesting thing is that it tops out at 100% bankroll and therefore precludes use of margin.
  3. One


    The original Kelly formula was based on an all or nothing bet, i.e., the amount you invest and potentially lose are the same, probably accounting for the differences of opinion. My interpretation is that it represents the amount you can lose.

    Keep in mind that a stop does not guarantee a max loss in fast or gapping markets and that the formula is very aggressive, e.g., there is a 10% chance that you will experience a 90% drawdown.
  4. ronblack


    maxpi, can you be more specific? (1) or (2)? Also, can you explain a bit the margin problem?

  5. ronblack


    You're probably correct about the simplified version of %K traders use but the general form of Kelly's formula applies to non-Bernouli distributions. Regardless, if that is true, i.e. %K represents the amount you can lose, then I wonder why do people talk about this formula and recommend it for position sizing.

  6. maxpi


    Essentially,when I look at the kelly formula I can see that the greatest bet it will ever recommend is 100% of your account. That leaves margin out of the picture if you are trading just one instrument.
  7. One


    Hi Ron,

    Yes, of course most traders are interested in non-Bernoulli distributions which necessitates generalizing the formula for scenarios that include more than two outcomes. But, and I may be wrong because I have never worked through the math myself which I understand to be non-trivial, it would seem that a generalization would start from the same basic definitions of the specific case Kelly outlined.

    This seems most reasonable to me, but any individual solving for an estimate of the general case - I've seen several out there - might define K differently I suppose.
  8. gbos


    Under Kelly framework the possition sizing goes something like this ...

    1. First we take an arbitrary example of a trading XYZ system with futures:

    We want to enter long at a future contract and we estimate that at current contract price, we risk 100$ per contract until our stop-loss is triggered. So the stimated cost to take the bet is 100$ per contract.

    -There is 0.4 chance that we will win 200$ per contract
    -There is 0.55 chance that our stop loss will be triggered and we will lose 100$ per contract
    -There is 0.05 chance that things will go real bad and a price gap will pass our stop loss and will cost us 200$ per contract
    -Your capital is 10,000$.

    2. Then we construct the normalized payoff matrix

    -The Cost to take the bet is 100$
    -We calculate the Payoff matrix in a per unit bet basis, by dividing our payoffs with the cost to take the bet.

    Probability ___ win/loss ___ win/loss per unit bet
    0.4 ___ 200 ___ 2/1
    0.55 ___ -100 ___ -1/1
    0.05 ___ -200 ___ -2/1

    So the matrix is

    Probability p ___ Payoff x
    0.4 ___ 2
    0.55 ___ -1
    0.05 ___ -2

    3. Then we perform Kelly calculations.

    The expected growth rate we want to maximize is
    g(f) = Sum p * ln(1 + x * f) = 0.4*ln(1+ f*2) + 0.55*ln(1-f*1) + 0.05*ln(1-f*2)

    For finding f that maximizes g(f) we can use the excel solver or any other stand alone optimization algorithm (Nelder Mead algorithm etc.). Using excel solver we calculate Kelly Fraction = 0.067

    - Your first bet will be 0.067 * 10000 = 670$, so you will buy 6 future contracts (risking 100$ at each)

    -Your capital’s exponential growth rate will be g = 0.4*ln(1+ 0.067*2) + 0.55*ln(1-0.067*1) + 0.05*ln(1-0.067*2) = 0.004964 per bet (half percent per bet).

    A more conservative approach is to bet half Kelly (3 contracts) losing 25% of your growth rate (0.0036 instead of 0.0049).
  9. ronblack


    gbos, thanks for the nice quantitative approach, which really explains the geometric growth rate but do you think you can buy 6 contracts with 10K (other than in the grains market possibly)?

    Maybe that's what maxpi is talking about when he says that Kelly does not work with margin.

    Still, most people did not answer my question directly (OP). Answer is (1) or (2)?

    You be surprised that you can find conflicting opinions of this in the literature. I run into this problem lately after I decided to maybe look for another MM method to replace my fixed fractional outdated method. Still, a lots of conflicting views out there about Kelly and optimal f

  10. gbos


    When writing the example I had in mind a specific stock index future in a european market that a point move represents 5 euro profit or loss. 1% move is required to touch the 100 euros stop loss. So 10000 euros are enough to let you open a position with 3 or even 6 contracts. Usually when you set realistic system numbers for the market you are intereted with you will see that the margin requirements for the specific market are not violated.
    #10     Aug 22, 2007