Generating exotic prices based on my own odds - Racing Talk - Racehorse TALK harm-plan

Racehorse TALK



Generating exotic prices based on my own odds - Racing Talk - Racehorse TALK

Author Topic: Generating exotic prices based on my own odds  (Read 1299 times)

0 Members and 1 Guest are viewing this topic.

Offline bascoe

  • Open
  • User 2568
  • Posts: 188
O.P. « 2022-Mar-06, 01:17 PM »
Following on from the previous thread on Market Pricing..

I ran a Monte Carlo sim over my assessed times for dogs at Mount Gambier Race 5 today and arrived at the following array of percentages for each runner running each position:


My question is how to use the percentage price for each runner in with Win and 2nd positions in the calculation of an Exacta.  I know the formulae for creating an exacta is  P1*P2 / (1-P1). I 'could' simply use the Win % for Runner 1 and Runner 2 into the above formulae, but it seems to miss the benefit of having a more accurate assessment for the 2nd place %.

I know it is not a matter of the simple product of %s of any two runners, as this omits the need to specify a finishing order.  I also know that the 2nd position for Runner 2 already assumes the win % is take out, so I cannot substitute that number directly. 

Any tips greatly appreciated.

bascoe


Online fours

  • Group 1
  • User 704
  • Posts: 9960
« 2022-Mar-06, 02:02 PM Reply #1 »
bascoe,

I assume you have Studio access to bother?

Can one account for the after the race starts ( as far as those who are not the z man anyway ) crunching anyway.

With some assumptions you can to a degree assuming a Bot does it for them to a formulae which you can reverse engineer over time.

Fours

Offline Wenona

  • VIP Club
  • Group 1
  • User 175
  • Posts: 7828
« 2022-Mar-06, 02:51 PM Reply #2 »


My question is how to use the percentage price for each runner in with Win and 2nd positions in the calculation of an Exacta.  I know the formulae for creating an exacta is  P1*P2 / (1-P1). I 'could' simply use the Win % for Runner 1 and Runner 2 into the above formulae, but it seems to miss the benefit of having a more accurate assessment for the 2nd place %.


Suggest you undertake a literature review of 'Longshot - Favourite Bias'

Offline bascoe

  • Open
  • User 2568
  • Posts: 188
« 2022-Mar-06, 03:48 PM Reply #3 »
A review of the literature has led me here

"https://math.stackexchange.com/questions/842604/given-every-horses-probability-of-winning-a-race-what-is-the-probability-that"

"INFERRING RELATIVE ABILITY FROM WINNING PROBABILITY IN MULTI-ENTRANT CONTESTS"

https://github.com/microprediction/winning/blob/main/docs/Horse_Race_Problem__SIAM_updated.pdf

my undergraduate maths leaves me stumped as to how to progress very deeply...

Offline Wenona

  • VIP Club
  • Group 1
  • User 175
  • Posts: 7828
« 2022-Mar-06, 04:59 PM Reply #4 »
You basically can't calculate the probability of running second or third by taking the win probability and applying the Harville method.

Why? The win probability reflects the probability of winning considering a multitude of factors. It's not like the probability of drawing a particular coloured ball from a bag.

Extreme examples are often good at illustrating a point. If I tell you in a 11 horse race horse A has a 50% chance of winning and all the others have a 5% chance of winning - what is the probability of horse A running a place? Harville calculations give a 89.47% horse A runs a place. OK, but what if I now tell you that there is a 20% chance horse A refuses to leave the stalls and the 50% win probability accurately includes the probability of that happening. Obviously it can't have a 89% chance of running a place if 20% of the time it stays in the stalls.

You need to determine factors for second and third that are used as an adjustment that reflect the existing longshot-favourite bias. Even then you will be applying a blanket solution to a problem that would have an individual answer for each race,

I can email you an excel spreadsheet that does the calculations - you'll still need to determine the appropriate factors. Send me a message with your email if you want it.

Offline Wenona

  • VIP Club
  • Group 1
  • User 175
  • Posts: 7828
« 2022-Mar-06, 05:15 PM Reply #5 »
When I was doing this sort of thing I was using 0.81 and 0.65 - maybe jfc would offer an opinion on what the factors should be or the best way for you to estimate them.

Offline bascoe

  • Open
  • User 2568
  • Posts: 188
« 2022-Mar-06, 05:29 PM Reply #6 »

I can email you an excel spreadsheet that does the calculations - you'll still need to determine the appropriate factors. Send me a message with your email if you want it.

Thanks message sent

Online jfc

  • Group 1
  • User 723
  • Posts: 7726
« 2022-Mar-06, 05:33 PM Reply #7 »
In response to the original question:

I don't know to break it to you, but:

You have effectively answered your own question.

In each trial of a Monte Carlo run you decide all the 8 positions.

Therefore you have an instance of an
Exacta
Trifecta
1st4
1st5
1st6
1st7
1st8

So just bump a number in an appropriate array each time and you end up with the True Odds for whatever Exotics take your fancy.


Offline bascoe

  • Open
  • User 2568
  • Posts: 188
« 2022-Mar-06, 05:54 PM Reply #8 »
So just bump a number in an appropriate array each time and you end up with the True Odds for whatever Exotics take your fancy.

Beg pardon if seem a tad obtruse,,,

in my final array of prices:
Tab1 has a percentage for Win of .036472; Tab4 has a percentage of .273138 for placing 2nd.
Tab4 has a percentage for Win of .360984; Tab1 has a percentage of .07927 for placing 2nd.

I want to find the exacta price for the 1 & 4 . so it is simply the sum of the Win and 2nd Place probabilities respectively?  Or have I missed something?

« Last Edit: 2022-Mar-06, 05:59 PM by bascoe »

Online jfc

  • Group 1
  • User 723
  • Posts: 7726
« 2022-Mar-06, 06:19 PM Reply #9 »
Forget about your final figures.

The calculation is done during each of your 100,000 (or whatever) trials.

For Exactas you need a new 8x8 array X.

If after a trail 1 and 4 fill the Exacta bump the slot in X holding 1&4

Next trial might give 4, 3 so bump that slot in X

So at the end X will hold numbers adding up to 100,000 and each slot count will give you the probability of that Exacta.

Offline bascoe

  • Open
  • User 2568
  • Posts: 188
« 2022-Mar-06, 06:24 PM Reply #10 »
Ok so I now see that I need to calculate the Exacta and Trifecta as the trials are being generated, depending on which combination fills the 1/2/3 spots. 

For the quinella matrix I assume I 'bump' the spot each time 1 and 4 OR 4 and 1 are first or 2nd?

bascoe

Online jfc

  • Group 1
  • User 723
  • Posts: 7726
« 2022-Mar-06, 06:35 PM Reply #11 »
By George he's got it!

The Quinella is a derivative of the Exacta so you can calculate that at the end.

If you have

8,000 1-4 Exacta
6,000 4-1 Exacta

Then the 1-4 Quinella has 14,000 for Implied Odds of $7.14.


The Duet is actually the derivative of a lot of Trifectas.

As is the Place.


Offline Wenona

  • VIP Club
  • Group 1
  • User 175
  • Posts: 7828
« 2022-Mar-06, 07:21 PM Reply #12 »
Wouldn't the Monte Carlo results give probabilities for Exacts and Quinellas that would approximate the results of Harville calculations and ignore longshot-favourite bias.

Online jfc

  • Group 1
  • User 723
  • Posts: 7726
« 2022-Mar-07, 08:48 AM Reply #13 »
The question gets weirder the more I look at it.

The Harville Formula is working off an aggregate. It knows absolutely nothing about the underlying distributions, let alone the important factors contributing to an Exacta outcome.

It's inconceivable it would produce a similar answer to a method where close enough to everything is being considered.

You should easily be able to add the Exacta Array to your program so can then compare the 2 different results.

Offline bascoe

  • Open
  • User 2568
  • Posts: 188
« 2022-Mar-08, 10:03 PM Reply #14 »

You should easily be able to add the Exacta Array to your program so can then compare the 2 different results.

Not as easy as I thought it would be...

I have been working on this for a few days...just found a eureka moment tonight...I have worked out where to count the number of top ratings for each runner -  not where I thought it would be in Carey's borrowed code! - just need the next steps to find out where to add the 2nd etc counts to determine the ex - tri etc

Will def report back on the differences to Harville then

bascoe

Online fours

  • Group 1
  • User 704
  • Posts: 9960
« 2022-Mar-09, 06:42 AM Reply #15 »
 :chin: :chin:

Ever tried simply using your experience and IQ to do all this automatically without need to refer to formulae or use BOTS....

I suppose you need to do this if you will be doing other things while the races are on but is this the best way?

Fours

Offline bascoe

  • Open
  • User 2568
  • Posts: 188
« 2022-Mar-09, 01:01 PM Reply #16 »
:chin: :chin:

Ever tried simply using your experience and IQ to do all this automatically without need to refer to formulae or use BOTS....

Fours

Yes I have.That's one way but you are limited to the number of races/events you can analyse - using an automated system (that works!) allows you to bet on every event that there is data for.

Online jfc

  • Group 1
  • User 723
  • Posts: 7726
« 2022-Mar-09, 01:34 PM Reply #17 »

Dim X(runners,runners) As Integer

X(sortedList.IndexOf(0), sortedList.IndexOf(1)) += 1



Insert 1st line along with the other Dims.

Insert 2nd line after
sortedlist.Reverse()

Note, I don't actually know Visual Basic, and Carey appears to have done some weird things,
but I'm guessing those 2 lines might do the trick.

X is a 2 dimensional array holding Exacta counts.

The "+= 1" statement increments the count in the appropriate slot.

Then you need to display all the elements of X.


Offline Wenona

  • VIP Club
  • Group 1
  • User 175
  • Posts: 7828
« 2022-Mar-09, 03:14 PM Reply #18 »
:chin: :chin:

Ever tried simply using your experience and IQ to do all this automatically without need to refer to formulae or use BOTS....

I suppose you need to do this if you will be doing other things while the races are on but is this the best way?

Fours

That's a bit like asking a chef if they have ever thought about just buying prepared meals and save all that time cooking ...............

Online fours

  • Group 1
  • User 704
  • Posts: 9960
« 2022-Mar-09, 06:39 PM Reply #19 »
Wenona,

I disagree strongly.

You can hand good chefs almost any combination of goods at short noice and they will use their judgement to provide a decent tasty meal.

No hand book required or prior preparation.

Fours

Online wily ole dog

  • Group 1
  • User 218
  • Posts: 30455
« 2022-Mar-10, 09:17 AM Reply #20 »
Yes I have.That's one way but you are limited to the number of races/events you can analyse - using an automated system (that works!) allows you to bet on every event that there is data for.


I manage to do that without a bot program   :lol:   :lol:  :p

Offline bascoe

  • Open
  • User 2568
  • Posts: 188
« 2022-Mar-10, 11:15 AM Reply #21 »

Dim X(runners,runners) As Integer

X(sortedList.IndexOf(0), sortedList.IndexOf(1)) += 1



Insert 1st line along with the other Dims.

Insert 2nd line after
sortedlist.Reverse()


jfc - this is seriously doing my head in.

I have the win counts and probabilities working fine.  Dogs 4 and 6 with the fastest times are about $2.70  In the attached image the first matrix shows the counts and probabilities for each runner in each position

The 2nd matrix shows the count of X(sortedList.IndexOf(0), sortedList.IndexOf(1))   ( which is actually EXcount(sortedlist.IndexOf(list(0)), sortedlist.IndexOf(list(1))) += 1)
The counts are not anything like what I expect, with the 4/6 combo expected to be shortest.

Code: [Select]
For aa = 1 To iterations
            For zz = 0 To runners
                SCORE = rating(zz) + MathFunc.InverseCumulativeDistribution(Rnd()) * SD
                list.Add(SCORE)
            Next zz
            sortedlist.AddRange(list)
            sortedlist.Sort()
            sortedlist.Reverse()
            EXcount(sortedlist.IndexOf(list(0)), sortedlist.IndexOf(list(1))) += 1

            For zz = 0 To runners
                ranklist(zz).Add(sortedlist.IndexOf(list(zz)) + 1)
            Next zz
            list.Clear()
            sortedlist.Clear()
        Next aa

 :mad:


Online jfc

  • Group 1
  • User 723
  • Posts: 7726
« 2022-Mar-10, 01:07 PM Reply #22 »
No guarantees, but calmly try:

           EXcount(list.IndexOf(sortedlist(0)), list.IndexOf(sortedlist(1))) += 1

Offline bascoe

  • Open
  • User 2568
  • Posts: 188
« 2022-Mar-10, 02:40 PM Reply #23 »
No guarantees, but calmly try:

           EXcount(list.IndexOf(sortedlist(0)), list.IndexOf(sortedlist(1))) += 1

many thanks...sanity restored.  In the end taking a short cut using another's code resulted in much extra time.  I was just about to rewrite it from scratch.


BACK TO ALL TOPICS
Sitemap