# NBA offense/defense Elo

Each team has an offense rating and a defense rating, both starting at 1500. Higher offense means stronger scoring; higher defense means stronger scoring prevention. Overall Elo is `(offense + defense) / 2`, a display ordering, not a separately fitted model.

## Prediction and updates

Expected home points are `max(0, league average + (home offense + 0.85 × home boost - away defense) / 25)`. Expected away points are `max(0, league average + (away offense - home defense - 0.15 × home boost) / 25)`. Neutral-site games use zero boost. The league average pools both teams' scores over the preceding seven seasons, and starts at 68 points for the first season.

For each team, offense gains `1.55 × clamp(actual points - expected points, -16, 16)`. The opposing defense loses `1.65 ×` that same capped residual. These changes apply only after a game is final.

Because the scoring baseline comes from earlier seasons, a league-wide change in scoring during a season moves every team's offense and defense ratings in opposite directions. Overall Elo is nearly unaffected, so compare offense with offense and defense with defense within a season, not across them.

The home boost starts at 68 Elo and adds a team-specific deviation capped at ±89. The deviation uses the preceding three seasons' home and away wins above opponent-adjusted expectation (log5), measured against the league-average home effect over the same seasons, and shrunk by `home games / (home games + 466)`. The home-court conversion divisor is 300. Because 25 Elo equal one point, a boost of 68 is worth about 2.7 points of expected margin.

At a season boundary, offense and defense each keep 65% of a team's distance from 1500 at the end of the prior season. A team with no prior rating starts at 1500. Franchises that moved or changed names keep one rating history and are shown under the name they used that season. Conference and division labels show each franchise's current alignment in every season; franchises that no longer exist are labeled Defunct.

## Probability and timing

`P(home wins) = 1 / (1 + exp(-(intercept + slope × expected margin)))`; away probability is its complement. For each displayed season the intercept and slope are fit only to decisive games from the three seasons before it. A trailing window is used because NBA home-court advantage has shrunk over time, so a curve fit to the full history predicts too many home wins in recent seasons. For 2025-26 the calibration uses 3,960 games from 2022-23 through 2024-25, with intercept -0.038 and slope 0.111.

Pregame ratings are reconstructed chronologically, ordered by game date and game ID. A completed game's probabilities never use subsequent results from its season. Future games use every team's current rating at the time of the data update, without simulating intervening games.

## Tuning

Eleven parameters were chosen by a 400-point space-filling grid search; the points divisor was fixed at 25 because it only sets the scale of the ratings. Each candidate was scored on the first eight weeks of the 2021-22 through 2025-26 seasons (about 1,990 games), where offseason carryover matters most, using log loss; the calibration curve for scoring was fit only on later weeks of those seasons. The best candidates were close to one another, so individual values are not precisely determined. The settings fit the recent era; the base home boost in particular is lower than the home advantage of earlier decades. Older seasons shown here are retrospective analyses, not out-of-sample validation. Changing the data or parameters can revise reconstructed forecasts.

## Data coverage

The season selector covers 1946-47 onward, the first BAA/NBA season. It includes regular-season, play-in and playoff games and the NBA Cup championship game; preseason and All-Star games are excluded. 1946-47 has no earlier season to train the probability curve on, so its win probabilities are unavailable; its ratings and results remain available. Only game dates are available, not tip-off times.

Neutral-site games are those the league's game log lists without a home team, plus the 2020 Orlando bubble. Other games played away from the home team's arena (for example international games that list a home team) are treated as ordinary home games.

Weeks are seven-day blocks counted from the first game of the regular season, and separately from the first play-in or playoff game. The top-10 charts show Elo after completed games before the next listed week's first game. Weekly changes use the start of the same window; season-to-date changes subtract the preseason rating after the offseason carryover. Future weeks keep the latest completed-game ratings and have zero weekly changes until games finish. The full-season view uses the latest ratings and the latest week containing a completed game. Game cards always retain their own actual pregame and postgame values.

Source: NBA Stats API through the [hoopR](https://hoopr.sportsdataverse.org/) R package. Unplayed games whose date has passed are labeled “Awaiting final.”
