Page 1 of 2 12 LastLast
Results 1 to 13 of 15

Thread: paranoid android: applying Kelly to stock market

  1. #1
    paranoid android
    Guest

    paranoid android: applying Kelly to stock market

    I'm trying to apply Kelly betting to the stock market, but I'm sure I'm doing some things wrong. A sampling of a trading system shows an average gain per trade of 3.54% with a variance of 0.33%. How do I compute how much of my bankroll I can use per trade? My understanding is that the formula is edge/variance. This gives us 3.54%/.33% = 1065.94% which is more than 10x my bankroll. If I could get this kind of leverage, any trade that lost more than 10% would leave me broke (right?). As this is not all that uncommon in my sampling, I figure I must be doing something wrong. My understanding is that proper Kelly betting should insure I never go broke. Where am I wrong? Thanks.

  2. #2
    Don Schlesinger
    Guest

    Don Schlesinger: Re: applying Kelly to stock market

    > I'm trying to apply Kelly betting to the
    > stock market, but I'm sure I'm doing some
    > things wrong. A sampling of a trading system
    > shows an average gain per trade of 3.54%
    > with a variance of 0.33%. How do I compute
    > how much of my bankroll I can use per trade?
    > My understanding is that the formula is
    > edge/variance. This gives us 3.54%/.33% =
    > 1065.94% which is more than 10x my bankroll.
    > If I could get this kind of leverage, any
    > trade that lost more than 10% would leave me
    > broke (right?). As this is not all that
    > uncommon in my sampling, I figure I must be
    > doing something wrong. My understanding is
    > that proper Kelly betting should insure I
    > never go broke. Where am I wrong? Thanks.

    The variance seems ridiculously low. It isn't possible to have one-third of one percent for the variance.

    Also, if your winning trades average more than your losing ones, then you have to divide not by the variance, but rather by the payoff for a winner divided by the payoff for a loser.

    Don

  3. #3
    paranoid android
    Guest

    paranoid android: Re: applying Kelly to stock market

    > The variance seems ridiculously low.

    Perhaps I am taking the variance of the wrong thing. Assume the following is the history of the trades:

    +5%
    +5%
    +5%
    -8%

    I was taking the variance of these numbers which my spreadsheet says is 0.42%. Is that not the variance of these numbers? Or should I be taking the variance of something else?

    Regardless, using this data, what should the Kelly equation look like?

    avg trade = 1.75%
    avg win = 5%
    avg loss = 8%
    probability of win = 75%
    probability of loss = 25%

    Thanks.

  4. #4
    Don Schlesinger
    Guest

    Don Schlesinger: Re: applying Kelly to stock market

    > Perhaps I am taking the variance of the
    > wrong thing. Assume the following is the
    > history of the trades:

    > +5%
    > +5%
    > +5%
    > -8%

    > I was taking the variance of these numbers
    > which my spreadsheet says is 0.42%. Is that
    > not the variance of these numbers? Or should
    > I be taking the variance of something else?

    I get 0.32%, but you certainly need more than four samples!

    > Regardless, using this data, what should the
    > Kelly equation look like?

    > avg trade = 1.75%
    > avg win = 5%
    > avg loss = 8%
    > probability of win = 75%
    > probability of loss = 25%

    Looks like you should be betting just under 3% for each trade (.0175/(5/8) = 2.8%).

    But again, I hope you don't think that four trades represent any kind of reliable data!

    Don


  5. #5
    paranoid android
    Guest

    paranoid android: Re: applying Kelly to stock market

    > I get 0.32%, but you certainly need more
    > than four samples!

    Are you certain 0.32% is the variance? I still get 0.42%. I realize 4 samples is far from sufficient, I just wanted to keep things simple for my post.

    > Looks like you should be betting just under
    > 3% for each trade (.0175/(5/8) = 2.8%).

    So Kelly is telling me the fastest way to grow my money is to only trade 2.8% of my bankroll per trade? Or am I misunderstanding the use of Kelly. After the 4 trades above with an initial $100 bankroll and betting 2.8% of my bankroll per trade, I'm left with only $100.20. If I were to trade 100% of my bankroll on each trade, I would have $106.50. If trading 200% of my bankroll, I'd be left with $111.80. So, 2.8% seems very low. What am I missing?

    Don, thanks for indulging this thread. I apoligize if this isn't the appropriate forum for these questions, but it's greatly appreciated.

  6. #6
    Don Schlesinger
    Guest

    Don Schlesinger: Re: applying Kelly to stock market

    > Are you certain 0.32% is the variance? I
    > still get 0.42%. I realize 4 samples is far
    > from sufficient, I just wanted to keep
    > things simple for my post.

    I did it quickly. The variance is the average squared result, E(X^2), minus the square of the average result, or E(X)^2. When I did it before, I got that the average squared result was 1/4(3*.05^2 + (-.08^2)) and the square of the average result was [1/4((3*.05) + (-.08))]^2.

    This gives .003475 - .0003062 = .0031688 = .32%.

    > So Kelly is telling me the fastest way to
    > grow my money is to only trade 2.8% of my
    > bankroll per trade?

    Yes.

    > Or am I misunderstanding
    > the use of Kelly.

    No.

    > After the 4 trades above
    > with an initial $100 bankroll and betting
    > 2.8% of my bankroll per trade, I'm left with
    > only $100.20.

    I'm not sure what you would want me to say. You have an average edge of 1.75% per trade, and you want to bet 100% of your bank on each trade?? What sense are you making???

    > If I were to trade 100% of my
    > bankroll on each trade, I would have
    > $106.50. If trading 200% of my bankroll, I'd
    > be left with $111.80. So, 2.8% seems very
    > low. What am I missing?

    Nothing. Presumably, you are going to make hundreds upon hundreds of trades, right? For now, you have no information on which to judge anything. Four sample points are next to useless.

    > Don, thanks for indulging this thread. I
    > apoligize if this isn't the appropriate
    > forum for these questions, but it's greatly
    > appreciated.

    No problem.

    Don

  7. #7
    paranoid android
    Guest

    paranoid android: Re: applying Kelly to stock market

    > This gives .003475 - .0003062 = .0031688 =
    > .32%.

    I was using the Excel function VAR() to compute my variance which estimates variance assuming the input is a sample. Using VARP() I got what you got by hand.

    > I'm not sure what you would want me to say.
    > You have an average edge of 1.75% per trade,
    > and you want to bet 100% of your bank on
    > each trade?? What sense are you making???

    In blackjack, my understanding is the proper Kelly bet is equal to our edge, so we would be betting 1.75% with a 1.75% edge. However, our risk on each blackjack bet is 100% of our bet, while in my example, the risk was only 8% of our bet. So, I guess it's hard for me to accept with such radically reduced risk per bet, I'm only allowed to bet slightly over double what I would be allowed to bet on blackjack with the same edge and 100% risk per bet. But, if that's the way it is, I'll accept it and move on. Thanks.

  8. #8
    Don Schlesinger
    Guest

    Don Schlesinger: Re: applying Kelly to stock market

    > I was using the Excel function VAR() to
    > compute my variance which estimates variance
    > assuming the input is a sample. Using VARP()
    > I got what you got by hand.

    Ah, right. There's the old dividing by n-1, instead of n, to form an unbiased sample. In this case, the data are worthless in any event, so it doesn't much matter.

    > In blackjack, my understanding is the proper
    > Kelly bet is equal to our edge, so we would
    > be betting 1.75% with a 1.75% edge.

    No, not true. You have to divide by the variance. So, if you have a 2% edge, and the variance is, say, 1.33, you bet 1.5%.

    > However,
    > our risk on each blackjack bet is 100% of
    > our bet, while in my example, the risk was
    > only 8% of our bet.

    I don't understand. 100% of your bet is still only a very small fraction of your total bankroll.

    > So, I guess it's hard
    > for me to accept with such radically reduced
    > risk per bet, I'm only allowed to bet
    > slightly over double what I would be allowed
    > to bet on blackjack with the same edge and
    > 100% risk per bet. But, if that's the way it
    > is, I'll accept it and move on. Thanks.

    You're not understanding. If my blackjack bankroll is, say, 1,000 units, and a place a one-unit bet, how is that risk "100%" of anything? What are thinking of?

    Don

  9. #9
    paranoid android
    Guest

    paranoid android: Re: applying Kelly to stock market

    > You're not understanding. If my blackjack
    > bankroll is, say, 1,000 units, and a place a
    > one-unit bet, how is that risk
    > "100%" of anything? What are
    > thinking of?

    If you lose a blackjack bet, you lose 100% of what you wagered (I realize that it will be a very small percentage of your bankroll if you're playing correctly). If you have a losing trade in the market, you would only lose 8% of what was wagered (using my example), and you get 92% back. That's what I was referring to.

  10. #10
    Don Schlesinger
    Guest

    Don Schlesinger: Re: applying Kelly to stock market

    > If you lose a blackjack bet, you lose 100%
    > of what you wagered (I realize that it will
    > be a very small percentage of your bankroll
    > if you're playing correctly). If you have a
    > losing trade in the market, you would only
    > lose 8% of what was wagered (using my
    > example), and you get 92% back. That's what
    > I was referring to.

    I'm having a mental block as to the proper way to handle this. I'm not sure what to apply the 2-3% edge to. Obviously, if when you put on a trade, you can never lose more than 8% of the capital risked, then this is different from what I've been advising you to do.

    I just can't imagine that you have enough data to draw any conclusions. What kind of investments are these that don't make or lose more than 8% of what is risked? Doesn't sound like anything that I'm familar with, unless you're just trading stock or futures with incredibly tight stops.

    Don

  11. #11
    paranoid android
    Guest

    paranoid android: Re: applying Kelly to stock market

    > I just can't imagine that you have enough
    > data to draw any conclusions.

    Like I said, the 4 data points were only created for simplicity in asking the question. They are not the real data and yes I have more than 4 items of data. I have 5!! ;-)

    > What kind of
    > investments are these that don't make or
    > lose more than 8% of what is risked? Doesn't
    > sound like anything that I'm familar with,
    > unless you're just trading stock or futures
    > with incredibly tight stops.

    I'm investigating short term trading strategies of index funds. My stated risk per trade (8% in my example) was actually the average amount lost on a losing trade, not the exact amount I'd lose on every losing trade.

  12. #12
    Don Schlesinger
    Guest

    Don Schlesinger: Re: applying Kelly to stock market

    > I'm investigating short term trading
    > strategies of index funds. My stated risk
    > per trade (8% in my example) was actually
    > the average amount lost on a losing trade,
    > not the exact amount I'd lose on every
    > losing trade.

    As I think about it, I would imagine that the bet (trade) size operates on the entirety of your bankroll. Don't forget commissions and slippage.

    Don

  13. #13
    paranoid android
    Guest

    paranoid android: Re: applying Kelly to stock market

    > Looks like you should be betting just under
    > 3% for each trade (.0175/(5/8) = 2.8%).

    Something seems wrong with this equation. As my average losing trade get bigger, the Kelly value also gets bigger, not smaller as I would assume.

    I thought I commented on this yesterday, but I don't see that post anywhere.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

About Blackjack: The Forum

BJTF is an advantage player site based on the principles of comity. That is, civil and considerate behavior for the mutual benefit of all involved. The goal of advantage play is the legal extraction of funds from gaming establishments by gaining a mathematic advantage and developing the skills required to use that advantage. To maximize our success, it is important to understand that we are all on the same side. Personal conflicts simply get in the way of our goals.