Krok Odds
Models · Edge

Building Your First Betting Model: A Step-by-Step Guide

You do not need machine learning or a computer science degree to build a betting model that finds edges. A simple Elo-based model with good data and disciplined evaluation will identify mispriced markets. This guide walks through the entire process — sport selection, data gathering, model construction, evaluation, and conversion to bet decisions.

18 min read·Published 25 Oct 2025

You do not need a machine learning pipeline to build a betting model that finds edges. You need a spreadsheet or a basic Python script, clean data, a simple rating system, and the discipline to evaluate honestly. The model will not be as sophisticated as the bookmaker's. It does not need to be. It only needs to be calibrated differently — to produce probability estimates that sometimes disagree with the market price in ways that are profitable over the long term.

This guide walks through building a first betting model from scratch. The approach is a sport-agnostic Elo rating system — the simplest model that produces useful probability estimates. Starting with the fundamentals is not a compromise. Complex models added before the fundamentals are solid add complexity faster than they add accuracy. Build the simple model first. Get it working. Then iterate.

Choose your sport and market

Start with one sport and one market. The best choices for a first model:

  • AFL head-to-head. Good data availability (AFL Tables), 18 teams, 23-round season = 207 games per year. Two-outcome market (draws are rare enough to treat as noise). Moderate scoring means the better team wins more often than in lower-scoring sports — Elo models work well.
  • NRL head-to-head. Good data, 17 teams, ~200 games per year. Two-outcome market. Lower scoring than AFL means more variance per game — the model will be less accurate but the market may also be less efficient, creating edge opportunities.
  • NBA head-to-head. Rich data environment but highly efficient market. More games (1,230 per season) means models can be evaluated faster but the edge from a simple model will be smaller because the market is more sophisticated. Good for learning model mechanics. Harder to find edges.

Start with AFL head-to-head. The data is good, the market is moderately efficient, and 207 games per season gives enough observations to evaluate model performance within a single season. Avoid: player prop markets (more complex, more dimensions, harder to model), multi-leg markets (the correlation structure is complicated), and in-play markets (speed requirements make systematic betting difficult).

Gather your data

You need: game date, home team, away team, home score, away score. Minimum three seasons. Five seasons gives better parameter estimation. AFL Tables has this data back to 1897 — use 2018 onward to keep the data relevant to the current competition structure (post-COVID seasons may need separate treatment — the 2020 season with shortened quarters and hubs is structurally different from other seasons).

Build your dataset as a CSV with one row per game and these columns:

  • date (YYYY-MM-DD)
  • home_team (standardised name)
  • away_team (standardised name)
  • home_score (integer)
  • away_score (integer)
  • home_margin (home_score - away_score, positive = home win)
  • season (year)
  • round (round number within season)

The standardised team names matter — "Collingwood" must be spelled identically in every row. "Collingwood Magpies" and "Collingwood" in the same dataset will be treated as different teams. Standardise at the point of data entry.

Build a baseline model: Elo ratings

Elo ratings were developed for chess but adapt naturally to sports. Each team has a rating (a number, typically starting around 1500). After each game, the ratings are updated: the winner gains points, the loser loses points. The amount transferred depends on the margin of victory (a big win transfers more points than a close win) and the rating difference (beating a strong team transfers more points than beating a weak team).

Elo is not the most sophisticated rating system available. It is the right place to start because:

  • It is simple enough to implement in a spreadsheet
  • It produces probability estimates, not just rankings
  • It is transparent — you can see exactly why the rating changed after each game
  • It serves as a baseline — if your more complex model cannot beat Elo, the complexity is not adding value

How Elo works for sports betting

The Elo formula for the expected win probability of Team A vs Team B:

P(A wins) = 1 / (1 + 10^((rating_B - rating_A) / 400))

The 400 is a scaling factor. A 400-point rating difference corresponds to a 10:1 win probability ratio (the higher-rated team wins ~91% of the time). For AFL, a lower scaling factor (around 200-300) typically produces better calibration because AFL has fewer decisive rating gaps than chess — the best team might beat the worst team 80-85% of the time, not 99.9%.

After each game, the ratings update:

new_rating = old_rating + K × margin_multiplier × (result - expected_result)

Where:

  • K is the update speed (higher K = faster reaction to new results, but also more noise). Typical AFL range: 20-40.
  • margin_multiplier accounts for victory margin. A 60-point win should adjust ratings more than a 1-point win. Typical formula: margin_multiplier = log(margin + 1) × 0.8. This means a 1-point win has multiplier ~0.55, a 10-point win ~1.9, a 60-point win ~3.3.
  • result is 1 for a win, 0 for a loss (and 0.5 for a draw, though AFL draws are very rare).
  • expected_result is P(A wins) from the formula above before the game.

Home ground advantage: add a fixed number of rating points to the home team before calculating win probability. In AFL, home ground advantage varies by venue — Geelong at GMHBA is worth more than a neutral MCG game between two MCG tenants. A simple starting point: add 30-50 rating points for home advantage. A better approach: add venue-specific bonuses (GMHBA: +60, Optus: +40, MCG tenant vs non-tenant: +20, etc.).

Implementing Elo in a spreadsheet

You can build a working Elo model in Excel or Google Sheets. The setup:

  1. Team ratings tab. One row per team. Starting rating (1500 for all teams at the beginning of your data). These ratings update after each game.
  2. Games tab. All games in chronological order. Columns: date, home team, away team, home rating (lookup from ratings tab), away rating (lookup), expected home win probability (Elo formula), home margin, actual result (1/0), new home rating (update formula), new away rating (update formula).
  3. Prediction tab. Upcoming games. For each game, look up the current ratings, calculate the expected win probability, convert to fair odds. Compare to market odds. Flag discrepancies.

The spreadsheet approach works for up to a few thousand games. Beyond that, the formulas become unwieldy and the file becomes slow. At that point, migrate to Python (the logic is identical — pandas DataFrames replace spreadsheet tabs, and the Elo update becomes a loop).

Evaluate your model

How good is your model? The evaluation framework:

Calibration. When the model says Team A has a 60% chance of winning, do they actually win 60% of the time? Group your predictions into probability buckets (50-55%, 55-60%, 60-65%, etc.). For each bucket, calculate the actual win rate. If the model is well calibrated, the actual win rate should be close to the bucket midpoint. A model that says 60% and wins 55% of the time is overconfident — it is overestimating the probability of the favourite winning. A model that says 60% and wins 65% is underconfident. Both are miscalibrated. Calibration matters because your bet sizing depends on your probability estimate. An overconfident model produces probability estimates that are too extreme, leading to oversized bets.

Discrimination. Can the model tell winners from losers? The standard metric: Brier score (mean squared error between predicted probability and actual outcome). Lower is better. A model that predicts 50% for every game has a Brier score of 0.25 (the baseline). A model with a Brier score of 0.21 is doing meaningfully better than random. A model with 0.23 is only marginally better. A model with 0.26 is worse than random — it is systematically wrong, which is actually useful (bet the opposite of what the model says) but usually indicates a bug.

Out-of-sample testing. Train the model on 2018-2023 data. Test it on 2024 data. The out-of-sample performance is your best estimate of how the model will perform on future games. In-sample performance is always better than out-of-sample — sometimes dramatically better. Never trust in-sample results. They are inflated by overfitting.

Profitability simulation. Using your out-of-sample predictions and the market prices for those games, simulate what would have happened if you had bet every game where the model's fair price differed from the market price by more than your edge threshold. Calculate the return on turnover. This is your best estimate of the model's betting value. It is almost always lower than you hope. That is normal. A 2-3% ROT from a simple Elo model on AFL head-to-head is a very good result.

Convert predictions to fair prices

The model outputs a win probability. Convert to fair decimal odds:

Fair odds = 1 / win_probability

If the model says Collingwood has a 58% chance: fair odds = 1 / 0.58 = $1.72. If the market is offering $1.90, the edge is (1.90 / 1.72) - 1 = 10.5%. This is a bet. If the market is offering $1.65, the edge is negative. This is a pass.

The edge threshold — how large an edge you require before betting — depends on your model's uncertainty. If your model's probability estimates have a typical error of ±3%, you need an edge larger than 3% to be confident the edge is real and not model error. A conservative approach: require an edge of at least 5% — twice your typical model error. As your model improves and its error shrinks, you can lower the threshold. Start conservative. Missing a marginal +EV bet costs you nothing. Betting a false +EV bet costs you real money.

Iterate: adding variables without overfitting

Once the baseline Elo model is working, you can add variables to improve it. The rule: add one variable at a time, test out-of-sample after each addition, and remove the variable if out-of-sample performance does not improve.

Variables worth testing for AFL:

  • Recent form adjustment (weight last 5 games more heavily than older games in the Elo update)
  • Venue-specific home ground advantage (different bonus for each venue)
  • Rest differential (team coming off a 6-day break vs 8-day break)
  • Travel distance (interstate travel, especially Perth trips)
  • Key player availability (binary flag for missing key forwards/midfielders — requires manual data collection)
  • Weather (rain reduces scoring, which favours the team with the stronger defence — requires weather data)

Each variable you add should improve out-of-sample Brier score or calibration. If a variable improves in-sample performance but not out-of-sample, it is overfitting — remove it. This discipline is non-negotiable. The most common failure mode in betting model building is adding variables until the model fits the historical data beautifully and then failing completely on live games. The defence is ruthless out-of-sample testing after every change.

Live testing before real money

Before betting real money on the model's output:

  1. Paper trade for at least 50 bets. Record the model's predictions, the market prices, the bets you would have placed, and the outcomes. Do not bet real money. After 50 paper bets, calculate the ROT. If it is positive, proceed. If it is negative, the model needs more work.
  2. Start with minimum stakes. When you go live, bet the minimum the bookmaker allows ($1-$5). The goal is to verify that the model's live performance matches its paper-trading performance. Small discrepancies are normal (market impact, price movement between prediction and bet placement). Large discrepancies indicate a problem — possible look-ahead bias in the paper trading or data pipeline errors.
  3. Scale gradually. After 50 live bets at minimum stakes, if the ROT is positive and roughly matches paper trading, increase to 25% of your target stake size. After 100 more bets, increase to 50%. After 200 bets, go to full stakes. The gradual scaling limits the damage if the model breaks down in live conditions. It also gives you time to identify and fix operational issues (data pipeline failures, price execution delays) before they cost significant money.

Knowing what your model cannot do

A simple Elo-based model will not beat the market on major AFL markets by large margins. If it produces a 2-3% ROT on head-to-head bets, that is a very good result — professional operations with far more sophisticated models and better data might achieve 3-5% on the same markets. The edge from a first model is modest. The value of building it is:

  • You understand exactly where your probability estimates come from. Every bet has an analytical foundation, not a gut feel.
  • You have a baseline that tells you when you have no edge. If the model says fair price is $1.75 and the market is $1.72, the model is telling you not to bet. Without a model, you might bet anyway because Collingwood "feels like value." The model's most valuable output is often the bets it tells you NOT to place.
  • You have a platform for improvement. Each variable you add, each methodological improvement, moves the model incrementally closer to profitability. The first version probably will not be profitable. The fifth version might be.

The model is not a money printer. It is a disciplined way of asking the question "does this bet have positive expected value?" and getting an answer that is transparent, testable, and improvable. Most punters never ask the question systematically. Building a model forces you to.