Estimating an Oil Well's Remaining Reserves from its Decline Curve

Time Series · Hard · Free problem

Each oil well comes as a pandas DataFrame of its monthly production history:

| column | meaning | |---|---| | month | months since first production | | oil_rate | barrels/day that month | | water_cut | fraction of produced fluid that is water | | gas_oil_ratio | produced gas per barrel of oil |

The oil_rate series is a *decline curve*: it spikes early and decays. Your target is the booked remaining reserves (estimated ultimate recovery minus cumulative production) that reservoir engineers reported for each well. Train on labelled wells, predict for new ones.

Work through it:

  1. How do you turn a decline history into features? A purely nonparametric model wastes the strong physical structure here.
  2. Plot a histogram of the reserve labels, and plot model residuals against each well's first-production date. What artifacts appear, and what do they tell you about how the labels were generated?
  3. How would you validate, given wells are drilled in correlated batches?

Hints

  1. Decline curves are well described by the Arps model: rate(t) = q0 / (1 + b*Di*t)^(1/b). Fitting q0, Di, b per well gives you physically meaningful features and an extrapolated cumulative.
  2. The reserve labels are produced by humans. A histogram will show spikes at round numbers; residuals will correlate with drilling vintage because each program shares a type-curve prior.
  3. High initial-rate wells tend to be over-booked when reserves are extrapolated naively from early production. Do not let early rate dominate your features.

Worked Solution

How to Think About It: This is regression with strong physical priors and a messy human label. The production history is well modelled by the Arps decline, so the smart move is to fit that per well and use its parameters and extrapolation as features, then learn a correction. But the *label* — booked remaining reserves — is produced by reservoir engineers, so it carries their process artifacts. The interview is whether you treat the label critically.

Key Insight: Reserves bookings are rounded, vintage-clustered, and economic-limit-truncated. Engineers fit type curves shared across a drilling program and book to round numbers, so the label is not a clean function of the curve.

The Method: 1. Fit the physics. For each well fit the Arps model $q(t) = q_0 / (1 + b\,D_i t)^{1/b}$ (a nonlinear least-squares fit). Use $q_0$, $D_i$, $b$, the implied EUR from integrating to an economic limit, and the fit residual as features. 2. Empirical features. IP30/IP90 (early cumulative), current cumulative production, decline rate over the last 6–12 months, water-cut slope and current level, GOR trend, and counts of rate jumps (workover restarts). 3. Vintage features. First-production date / program ID — these absorb the shared type-curve prior in the labels. 4. Model. Gradient-boosted trees on the engineered features, or a hybrid that predicts a multiplicative correction to the Arps EUR. 5. Validate. Group cross-validation by drilling program / pad, because wells in a batch are highly correlated; a random split leaks.

Practical Considerations: The naive trap is over-trusting early rate — high-IP wells get over-booked, and a model that keys on $q_0$ inherits that bias. Plot residuals vs. vintage to expose the program effect, and inspect the label histogram for round-number quantisation (you may want to predict a de-quantised target). Censoring matters too: young wells have little curve to fit, so flag short histories and widen their uncertainty. Be explicit that you are predicting *booked* reserves, with the engineering biases that implies.

Answer: Fit an Arps decline per well to get physical features, add empirical decline/water-cut/GOR and drilling-vintage features, learn a correction with gradient-boosted trees, and validate with program-grouped CV — while treating the round, vintage-clustered label as engineer-generated rather than ground truth.

Intuition

The physics gives you a great parametric backbone (the Arps decline), so the modelling reduces to fitting a few interpretable parameters and adding a learned correction. But the label is a human booking, not a measurement: engineers round to round numbers, share type-curve priors within a drilling program, and truncate at a fixed economic limit. So the target has vintage clustering and round-number quantisation that a residual plot reveals. The candidate who fits Arps, then notices the label is engineer-generated and adds vintage features (instead of over-trusting early rate), has the insight.

Open the full interactive solver →