1. #1
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Calculation of edge and variance on ternary outcome win/lose/push events

    In reference to this thread a couple of people have asked how to properly calculate the variance on ternary outcomes events, specifically those that may end only in a win, lose, or push (so this wouldn't apply to Asian handicap).

    Without further ado:

    Let pw = win probability
    Let pl = loss probability
    Let pd = 1 - pw - pl = draw probability
    Let f = fractional odds
    Let x = bet size
    Let E = % edge

    E = pw * f - pl
    σ2/x2 = (1 - pd + E) * (f - E) - pd * E


    You'll note that for a push probability of zero (i.e., for pd = 0) this reduces to the familiar formulation of variance:

    σ2/x2 {no push} = (1 + E) * (f - E)

    Another question, of particular relevance when back testing a strategy, would be how to calculate the standard deviation in expectation of an event observed and bet over n occurrences.

    This is actually a less general question than the one answered above (insofar as it constrains payout odds and bet size to be identical for each wager), but because some are most accustomed to the n*p*(1-p) formulation of binomial variance I'll provide the trinomial win/loss/push analogue here. (I'll leave it an exercise to the reader to demonstrate that the formulation in post# 1 is just a generalization of the formulation following.)

    Let N = # of trials
    Let pw = observed win frequency over N trials
    Let pl = observed loss frequency over N trials
    Let pd = 1 - pw - pl = observed draw frequency over N trials

    The variances and covariances for # of wins, # of losses, and # of pushes are then given by:

    Var[# of wins] = N * pw * (1-pw)
    Var[# of losses] = N * pl * (1-pl)
    Var[# of pushes] = N * pd * (1-pd)
    Covar[# of wins, # of losses] = -N * pw * pl
    Covar[# of wins, # of pushes] = -N * pw * pd
    Vovar[# of losses, # of pushes] = -N * pl * pd

    If we further define:

    Let f = fractional odds
    Let x = bet size

    Then the total variance in win amount would be given by:

    σ2/x2 = f2 * Var[# of wins] + Var[# of losses] - 2 * f * Covar[# of wins, # of losses]
    σ2/x2 = N * ( f2*pw*(1-pw) + pl*(1-pl) + 2*f*pw*pl )

  2. #2
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    So here's an example of how to practically use the second formulation above to test for significance.

    Observed:

    260 observations (N = 260)
    all bets at -110 (f = 10 11 )
    wins = 143 (pw = 55%)
    losses = 104 (pl = 40%)
    pushes = 13 (pd = 5%)

    Assuming results were properly obtained out-of-sample, what would be our 95% confidence lower bound for true strategy ROI (using the Central Limit Theorem)?

    Calculating ROI and ROI variance we find:

    absolute ROI = 143 * 10 11 - 104 = +26 units (+10%)
    σ2 = 260 * ( 100 121 *55%*45% + 40%*60% + 2* 10 11 *55%*40%) ≈ 219.58 units2

    or σ = 14.8183 units.

    So taking into account the ternary outcome set, our (frequentist) 95% confidence lower bound on ROI would be 26/260 - 1.6261*14.8183/260 ≈ +0.6254%.

    Let's compare this to the results we'd find using conditional probability with a binary outcome set.

    Let p* = win frequency conditioned on not pushing = 140 (260-13) ≈ 57.895%

    Which would give us a conditional ROI and variance of conditional ROI of:

    conditional ROI = +26 units (that's 26 / (260-13) = +10.526%)
    σ2 = (260-13)*( 100 121 + 1 + 2* 10 11 ) * 57.895%*(1-57.895%) ≈ 14.8137 units2

    So taking into account the binary outcome set, our (frequentist) 95% confidence lower bound on conditional returns would be 26/(260-13) - 1.6261*14.8137/(260-13) ≈ +0.6614%.

    Removing the conditioning would yield a lower bound of +0.6614% * (260-13)/260 ≈ 0.6283% on absolute returns. Pretty close to what we had found above (and the error is certainly less than that introduced by using the Central Limit Theorem in the first place).

    But here's real issue:

    Taking into account the ternary outcome set, how would one go about testing the null hypothesis that the strategy is in reality no better than breakeven?

    Anyone?

    This is straightforward if we condition the results and use binomial variance, but not quite so otherwise. It's exactly this difficulty that leads most practitioners to simply condition out pushes rather than deal with the vagaries of the trinomial distribution.
    Nomination(s):
    This post was nominated 1 time . To view the nominated thread please click here. People who nominated: LucasPortela

  3. #3
    square1
    square1's Avatar Become A Pro!
    Join Date: 01-11-08
    Posts: 37

    Quote Originally Posted by Ganchrow View Post
    But here's real issue:

    Taking into account the ternary outcome set, how would one go about testing the null hypothesis that the strategy is in reality no better than breakeven?

    Anyone?

    This is straightforward if we condition the results and use binomial variance, but not quite so otherwise. It's exactly this difficulty that leads most practitioners to simply condition out pushes rather than deal with the vagaries of the trinomial distribution.
    Well, there are an infinite number of breakeven distributions: choose p(d) on (0,1), and then set p(l)/p(w) = f. I don't believe the problem as stated is well-defined without a prior on the bivariate. So to test, you'd need an additional structural assumption of some kind. If I were doing it I think I'd fix p(d) at its MLE, which is 13/260 in your example, and go from there. Rigorously justifiable? Of course not, but I'd have minor faith in the result.

  4. #4
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by square1 View Post
    Well, there are an infinite number of breakeven distributions: choose p(d) on (0,1), and then set p(l)/p(w) = f. I don't believe the problem as stated is well-defined without a prior on the bivariate. So to test, you'd need an additional structural assumption of some kind. If I were doing it I think I'd fix p(d) at its MLE, which is 13/260 in your example, and go from there. Rigorously justifiable? Of course not, but I'd have minor faith in the result.
    Why restrict yourself by fixing the pd parameter? Why not treat it as a random variable with a uniform prior distribution (say)?

    But yeah, you got the idea.

    It's a pain in the ass.

  5. #5
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    This spreadsheet illustrates what I had in mind. It implicitly assumes a uniform prior distribution of pd and uses the t-distribution to impute the final p-value (in both the binomial and trinomial cases).

    Assuming I didn't make an error, the trinomial p-value of the null-hypothesis (that population EV ≤ 0%) actually turns out to be slightly lower than the binomial p-value (4.168% vs. 4.199%), and coming up with the latter is a whole lot easier.
    Attached Files

  6. #6
    square1
    square1's Avatar Become A Pro!
    Join Date: 01-11-08
    Posts: 37

    Quote Originally Posted by Ganchrow View Post
    Why restrict yourself by fixing the pd parameter? Why not treat it as a random variable with a uniform prior distribution (say)?

    But yeah, you got the idea.

    It's a pain in the ass.
    There's nothing wrong with the uniform, and it's probably not going to have a huge impact on the result.

    I like the MLE because the essence of hypo-testing is to ask, "How objectionable does our data find these probabilities?". Since we are presumably a lot more interested in the win/loss ratio than the draw probability, I chose the draw probability the data finds least "objectionable", which is the essence of the MLE. So if we reject, we know the data has no issues with our pd parameter, and thus is telling us the null-hypo win/loss ratio is the part of the null that is causing our result to be improbable under the null.

  7. #7
    Ganchrow
    Nolite te bastardes carborundorum.
    Ganchrow's Avatar Become A Pro!
    Join Date: 08-28-05
    Posts: 5,011
    Betpoints: 1088

    Quote Originally Posted by square1 View Post
    I like the MLE because the essence of hypo-testing is to ask, "How objectionable does our data find these probabilities?". Since we are presumably a lot more interested in the win/loss ratio than the draw probability, I chose the draw probability the data finds least "objectionable", which is the essence of the MLE. So if we reject, we know the data has no issues with our pd parameter, and thus is telling us the null-hypo win/loss ratio is the part of the null that is causing our result to be improbable under the null.
    Well I'd say we're less concerned with the win/loss ratio per se, and more concerned simply with the model return. Win/loss ratio is just so ... binomial.

    Regardless, I think we can both readily agree that it's not going to change the results much at all one way or the other and that the best easiest solution is probably clearly to go with binomial modeling coupled with conditional-form model parameters.

Top