> For the complete documentation index, see [llms.txt](https://docs.thesports.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thesports.com/reference/odds-concepts.md).

# Odds concepts

## Odds concepts

These formulas use decimal home win, draw, and away win odds. They compare one market with market-average probabilities.

### Notation

| Symbol                                                                                | Definition                                                                      |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| $$h$$, $$d$$, $$a$$                                                                   | Home win, draw, and away win outcomes.                                          |
| $$O\_{h,i}$$, $$O\_{d,i}$$, $$O\_{a,i}$$                                              | Odds Company $$i$$'s decimal odds for the same football 1X2 market snapshot.    |
| $$R\_i$$                                                                              | Return rate for Odds Company $$i$$.                                             |
| $$P\_{h,i}$$, $$P\_{d,i}$$, $$P\_{a,i}$$                                              | Implied probabilities for home win, draw, and away win for Odds Company $$i$$.  |
| $$i$$                                                                                 | Odds Company index.                                                             |
| $$n$$                                                                                 | Number of Odds Companies included in the market average.                        |
| $$\bar{P}\_h$$, $$\bar{P}\_d$$, $$\bar{P}\_a$$                                        | Market-average implied probabilities for home win, draw, and away win.          |
| $$O\_{h,\mathrm{current}}$$, $$O\_{d,\mathrm{current}}$$, $$O\_{a,\mathrm{current}}$$ | Evaluated Odds Company's current decimal odds for home win, draw, and away win. |
| $$K\_h$$, $$K\_d$$, $$K\_a$$                                                          | Kelly indices for home win, draw, and away win.                                 |

All odds used in one calculation must belong to the same football 1X2 market and the same snapshot.

### Kelly index (football)

The Kelly index reflects the payout risk embedded in the current odds for an outcome. It indicates the payout difference between the dynamic market and the previously established payout rate.

For each outcome, the Kelly index is the product of an Odds Company's current decimal odds and the corresponding market-average implied probability.

This TheSports metric is not the Kelly criterion and is not a stake-sizing recommendation.

### Return rate for each Odds Company $$i$$

$$
R\_i = \frac{O\_{h,i} \times O\_{d,i} \times O\_{a,i}}{O\_{h,i} \times O\_{d,i} + O\_{d,i} \times O\_{a,i} + O\_{h,i} \times O\_{a,i}}
$$

### Implied probabilities

$$
P\_{h,i} = \frac{R\_i}{O\_{h,i}}
$$

$$
P\_{d,i} = \frac{R\_i}{O\_{d,i}}
$$

$$
P\_{a,i} = \frac{R\_i}{O\_{a,i}}
$$

### Market-average probabilities

$$
\bar{P}*h = \frac{P*{h,1} + P\_{h,2} + \ldots + P\_{h,n}}{n}
$$

$$\bar{P}\_d$$ and $$\bar{P}\_a$$ follow the same pattern.

### Kelly index formula

$$
K\_h = O\_{h,\mathrm{current}} \times \bar{P}\_h
$$

$$
K\_d = O\_{d,\mathrm{current}} \times \bar{P}\_d
$$

$$
K\_a = O\_{a,\mathrm{current}} \times \bar{P}\_a
$$

### Football odds conversion

TheSports football handicap-line conversion uses quarter-goal increments. Negative values represent receiving the handicap.

| Numeric value | Handicap line |
| ------------- | ------------- |
| `0`           | `0`           |
| `0.25`        | `0/0.5`       |
| `0.5`         | `0.5`         |
| `0.75`        | `0.5/1`       |
| `1`           | `1`           |
| `1.25`        | `1/1.5`       |

```python
# Odds conversion python code example (football)

# Convert to text type (Asian disk)
def odds_to_text(goal):
    goal_cn = [
        "Tie", "flat/half", "half ball", "half/one", "one ball", "one/half ball", "ball half", "ball half/two", "two balls", " Two/two balls and a half", "two balls and a half", "two balls and a half/three", "three balls", "three/three balls and a half",
        "Three balls and a half", "Three balls and a half/four balls", "Four balls", "Four/four balls and a half", "Four balls and a half", "Four balls and a half/five", "Five balls", "Five/five balls and a half", "Five balls and a half", "Five balls and a half/six", "Six balls", "six/six balls and a half", "Six balls and a half",
        "Six balls and a half/seven", "Seven balls", "Seven/seven balls and a half", "Seven balls and a half", "Seven balls and a half/eight", "Eight balls", "Eight/eight balls and a half", "Eight Half ball", "Eight ball half/nine", "Nine ball", "Nine ball and half", "Nine ball and half", "Nine ball and half/ten",
        "Ten Balls"
    ]
    if not goal or goal == '.':
        return ''
    else:
        if goal > 10 or goal < -10:
            return '%sball' % goal
        elif goal >= 0:
            return goal_cn[abs(int(goal * 4))]
        else:
            return 'receive%s' % goal_cn[abs(int(goal * 4))]


# Convert to digital type (large and small balls)
def odds_to_num(goal):
    goal_cn = [
        "0", "0/0.5", "0.5", "0.5/1", "1", "1/1.5", "1.5", "1.5/2", "2", "2/2.5", "2.5", "2.5/3", "3", "3/3.5",
        "3.5", "3.5/4", "4", "4/4.5", "4.5", "4.5/5", "5", "5/5.5", "5.5", "5.5/6", "6", "6/6.5", "6.5",
        "6.5/7", "7", "7/7.5", "7.5", "7.5/8", "8", "8/8.5", "8.5", "8.5/9", "9", "9/9.5", "9.5", "9.5/10",
        "10", "10/10.5", "10.5", "10.5/11", "11", "11/11.5", "11.5", "11.5/12", "12", "12/12.5", "12.5",
        "12.5/13", "13", "13/13.5", "13.5", "13.5/14", "14"
    ]
    if not goal or goal == '.':
        return ''
    else:
        if goal > 14:
            return '%s' % goal
        else:
            return goal_cn[abs(int(goal * 4))]
```

### Next steps

Use the endpoint schema to identify the odds fields available for each sport. Store ids as strings as described in [Timestamps and ids](broken://spaces/dosu4ynmwSCtMBPWJpmP/pages/TbY3v7vP9McI0mJmAPNJ).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thesports.com/reference/odds-concepts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
