ParlaySize in calcKelly()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • deltap
    SBR Rookie
    • 10-03-08
    • 8

    #1
    ParlaySize in calcKelly()
    Ganchrow,
    I am trying to rewrite in vba your Kelly calculator, but I can not understand what you do with the binary numbers in ParlaySize. Can you please explain this?
    Thanks
  • Ganchrow
    SBR Hall of Famer
    • 08-28-05
    • 5011

    #2
    Originally posted by deltap
    Ganchrow,
    I am trying to rewrite in vba your Kelly calculator, but I can not understand what you do with the binary numbers in ParlaySize. Can you please explain this?
    Thanks
    I assumme you're referring to the ParlaySize function :
    Code:
    function ParlaySize(lParlay) {
    	var sParlay = dec2bin(lParlay,0);
    	var lSize = 0;
    	for (var i = 0; i < sParlay.length; i++) {
    		lSize += parseInt(sParlay.charAt(i));
    	}
    	return lSize;
    }
    Where the function dec2bin(x,m) converts the base-10 value x to a binary string of minimum length m.

    The idea is that a given parlay number (of type long) when converted to binary corresponds to a unique parlay where the '1' digits refer to active games within the parlay.

    So for example for 4 independent events:
    • Parlay #7 (binary 0111) would refer to the 3-team parlay of game #s 1,2, & 3 (counting right-to-left).
    • Parlay #9 (binary 1001) would refer to the 2-team parlay of game #s 1 & 4
    • Parlay #4 (binary 0100) would refer to the 1-team parlay (i.e., the single) only of game # 3.


    All the ParlaySize function does is loop through the digits of of the binary string, count the number of "1"'s, and then return that value.
    Comment
    • deltap
      SBR Rookie
      • 10-03-08
      • 8

      #3
      Thanks Ganchrow, I will send you the code when finished.
      Thanks again
      Comment
      • deltap
        SBR Rookie
        • 10-03-08
        • 8

        #4
        Kelly calculator in VBA for Excel

        Hi Ganchrow,
        Attached is an excel file with the VBA code. This is my first attempt and is a bit slow. Any recomendations welcomed.
        calcKelly5.xls
        Comment
        • Ganchrow
          SBR Hall of Famer
          • 08-28-05
          • 5011

          #5
          Your results don't appear correct for full Kelly.

          Do you want to walk us through what you have?
          Comment
          • Ganchrow
            SBR Hall of Famer
            • 08-28-05
            • 5011

            #6
            Also, is there any particular reason you prefer the unbounded exact algebraic solution to a constrained and optimized one?
            Comment
            • deltap
              SBR Rookie
              • 10-03-08
              • 8

              #7
              Originally posted by Ganchrow
              Your results don't appear correct for full Kelly.

              Do you want to walk us through what you have?
              Ok lets do an example.
              lets suppose o1=1.31, o2=1.21, o3=1.23 and p1=0.83, p2=0.83, p3=0.83.
              then by substitution to Kelly formula (pi*oi)/(pi-1) (i=1,2,3) we get k1=0.29569, k2=0.03968, k3=0,10869 and k1*k2*k3=0.0000012 which does not equal or even close to your Kelly calculator. Most probably I do something wrong with the Kelly Formula.
              What is the Kelly formula I should use?
              I even tried the formula from the Javascript of your Kelly calculator but it gives me the same results.
              Comment
              • deltap
                SBR Rookie
                • 10-03-08
                • 8

                #8
                Originally posted by Ganchrow
                Also, is there any particular reason you prefer the unbounded exact algebraic solution to a constrained and optimized one?
                what is "unbounded exact algebraic solution" and what is "a constrained and optimized"
                Comment
                • Ganchrow
                  SBR Hall of Famer
                  • 08-28-05
                  • 5011

                  #9
                  Originally posted by deltap
                  Ok lets do an example.
                  lets suppose o1=1.31, o2=1.21, o3=1.23 and p1=0.83, p2=0.83, p3=0.83.
                  then by substitution to Kelly formula (pi*oi)/(pi-1) (i=1,2,3) we get k1=0.29569, k2=0.03968, k3=0,10869 and k1*k2*k3=0.0000012 which does not equal or even close to your Kelly calculator. Most probably I do something wrong with the Kelly Formula.
                  What is the Kelly formula I should use?
                  I even tried the formula from the Javascript of your Kelly calculator but it gives me the same results.
                  o1 = 1.31
                  o2 = 1.21
                  o3 = 1.23
                  p1 = p2 = p3 = 0.83

                  The single bet full-Kelly formula is:
                  ki = (pi*oi-1)/(oi-1)

                  Hence:
                  k1 = (0.83*1.31-1)/(1.31-1) ≈ 28.161%
                  k2 ≈ 2.048%
                  k3 ≈ 9.087%

                  So k1 * k3 * k3 ≈ 0.0524%

                  etc.
                  Comment
                  • deltap
                    SBR Rookie
                    • 10-03-08
                    • 8

                    #10
                    Thanks Ganchow
                    Comment
                    • deltap
                      SBR Rookie
                      • 10-03-08
                      • 8

                      #11
                      Thanks again. This is the new file.
                      Attached Files
                      Comment
                      • Ganchrow
                        SBR Hall of Famer
                        • 08-28-05
                        • 5011

                        #12
                        Originally posted by deltap
                        Thanks again. This is the new file.
                        Looks good.
                        Comment
                        Search
                        Collapse
                        SBR Contests
                        Collapse
                        Top-Rated US Sportsbooks
                        Collapse
                        Working...