Open Side Menu Go to the Top
Register
Help deriving gradient for expected return of series of bets in a horse race Help deriving gradient for expected return of series of bets in a horse race

06-25-2020 , 12:05 PM
Hey all, I'd apprecate any help deriving the gradient of the expected return for a series of bets in a horse race (or any parimutuel pool). The ER can be defined as:



Here, Q is the % of the pool returned to customers after track commision i.e. 1 - track take, where track take is the track's fee for putting on the race. N is the total number of combinations in the pool, W is the total money bet into the pool prior to our bets, w_i is the money bet on a single combination prior to our bet, b_i is our proposed bet on a combination, and p_i is the likelihood of combination i winning.

The part that is giving me trouble (I think) is the nested summation, specifically the partial deriviative with respect to b_i of

Help deriving gradient for expected return of series of bets in a horse race Quote
06-25-2020 , 12:49 PM
My own attempt at the solution is:



However, I'm attempting to verify in python using scipy's check_grad function, and the dervided gradient is significantly different from the numerically approximated gradient.
Help deriving gradient for expected return of series of bets in a horse race Quote
06-26-2020 , 11:04 AM
Quote:
Originally Posted by dollarbillstern
My own attempt at the solution is:



However, I'm attempting to verify in python using scipy's check_grad function, and the dervided gradient is significantly different from the numerically approximated gradient.
With some help, I've figured out the correct derivative of the numerator, which is:



However, when taken with the denominator of the gradient is very different from the numerically approximated derivative. That is, I'd expect the derivative of



to be



which is an application of the quotient rule. However, that doesn't seem to be the case. Anyone have any idea where I messed up?
Help deriving gradient for expected return of series of bets in a horse race Quote
07-01-2020 , 08:09 AM
After bashing my head against a wall for days, I think I've figured it out. The solution I've coded up passes the scipy check_grad test, so I'm fairly confident it's accurate. However, I'm not confident in my ability to convert that to a proper latex formula, so apologies if what's posted below is inaccurate. Please let me know and I'll modify.

It helped to write out some explicit cases for a small number of bets i.e. N=2. From there it was clear that what I was missing were a given bet's impact on the ER when considering a separate bet. The i=k vs i\ne k case. The solution is:

\sum_{i=1}^N(Q(\frac{(Wp_i+\sum_{j=1}^N(b_jp_i)+b_ ip_i)(w_i+b_i)-(Wb_ip_i+\sum_{j=1}^N(b_j)(b_ip_i))}{(w_i + b_i)^2}+\sum_{j\ne i}^N(\frac{b_jp_j}{w_j+b_j}))-1)


Apologies for the raw latex, but can't seem to get the parser to work.
Help deriving gradient for expected return of series of bets in a horse race Quote

      
m