# win/lose calculator

Orçamento $30-300 USD

VB Application to analyse horse racing results data either manually entered or imported from a .CSV file and perform several calculations on the available information. This is an application for the sports market. The calculations will be different for back and lay bets so I would prefer this project to go to someone with experience of these terms.

## Deliverables

VB Application to analyse horse racing results data either manually entered or imported from a .CSV file and perform several calculations on the available information. This is an application for the sports market. The calculations will be different for back and lay bets so I would prefer this project to go to someone with experience of these terms.

If the information is entered manually the user will need to enter:

1. The number of selections.

2. The number of winners or losers

3. Average odds or the average winning odds or both.

Before any interpretation you will have to ask if these are lay or back selections.

The CSV will have a 2 or 3 fields that need to be analysed but the user may have different ideas of how these fields are presented so the software must allow the user to define these fields.

It is likely that the CSV to be imported will have a number of pieces of information so the software needs to ask some questions before any calculation is made.

1. How is a winner defined?

2. How is a Loser defined?

3. Does the file contain Non Runners? If so how are they defined?

4. Traditional odds or Fractions. If traditional odds are they in one column or two?

If decimal are they Betfair prices (including 1)?

Here are some examples of what may have to be handled.

Example 1.

The file contains 5 columns but we are only interested in column C and E. Column E is the result "Win" or "Lose" This file contains no Non Runners (NR selections that didn’t run in the end). Column C contains the odds as a decimal which is not in a betfair format.

Example 2.

Is exactly the same as example one but this time contains NR's and Betfair prices which have 1 added to the odds (explained later)

Example 3.

The file contains 6 columns but we are only interested in column C and E. Column E is the result "Win" or "Lose" This file contains no Non Runners (NR selections that didn't run in the end). Column C contains the odds as a fraction eg 3/1, 5/6, 10/1, 10/11 etc. This format is unusual as you can not easily add in these figures to a spreadsheet without spaces.

The best way to handle these is to divide the left figure by the right figure to get the decimal equivalent. Eg 10/11 = 0.91 or 10/1 = 10

Example 4.

In this example the fractional odds are in two (C and D) columns but the above still applies.

By coming up with away that allows the user to define the columns during initial import (much like normal csv importers) give the user flexibility.

Once the file is imported then the following calculations need to be made on the records.

NOS: Number of selections (Get rid of NR’s from any results)

NWS: Number of winning selections.

Strike Rate. (NWS/NOS) as a percentage.

AO: Average odds (The best way to do this is turn all odds in to a decimal add them all together and then divide that figure by NOS)

AWO: Average winning Odds (far more important than AO for profit calculations. Add up all the odds from the winner’s only then divide by the NWS) Please Note: the lay calculations will be the other way around.

ELLS : Expected Longest Losing Sequence

I only have this calculation for excel and it uses the math LN but VB does not have this, the nearest seems to be “Log?? but this is doesn't give the same result so whoever takes on the project must understand how to do this.

RSR: Required Strike Rare. Need to know if our average winning odds will return a profit after we take into account the losers.

The calculation is:

Edge = ((Average Winning Odds*1-1)*(Strikerate/100))-(1*(1-(Strikerate/100)))

SDO= Standard Deviation of all the odds. The standard deviation is a measure of how spread out a set of numbers are. A high standard deviation indicates a wide spread range of odds where as a small deviation indicates a small range of odds used. The standard deviation can in one glance indicate the size of the range of odds in the selection system. For a normal distribution of data it is known that 68.27~% of members lie within 1 S.D. of the mean, 95.45~% within 2 S.D. and 99.73~% within 3 S.D.

I haven't got a clue how to work this out!

The spreadsheet and picture are in zip file attached