The DCA package
The dca package contains core mathematical routines for decline curve analysis.
This part of the code is meant to be used by developers and tech-savvy engineers who want to build their own DCA on top of our building blocks.
The best way to get started might be to look at the example gallery.
DCA and the improved loss function
Decline Curve Analysis (DCA) is the process of fitting curves to well production time series data.
Two commonly used curves are Arps and Exponential.
The purpose of DCA can be to analyze past well behavior, or to predict future well behavior.
This Python package implements fast and robust DCA. Instead of fitting a curve \(f(t; \boldsymbol{\theta})\) to the standard least-squares loss function
we use a loss function implemented as CurveLoss, which generalizes least-squares and has better out-of-sample predictions.
Taking this idea further, to a probabilistic setting where we account for autocorrelation, we implement AR1Model.
This model joins an AR(1) process with a non-linear regression.
The forward simulation equations are:
Main features of the DCA package
Lightning fast. Fits around 1000 wells per minute.
Beats least-squares. Typically 25% reduction in forecasting RMSE compared to least squares. Measured as out-of-sample error on real well data.
Robustness. Robust to outliers since we allow \(1 \leq p \leq 2\) in the loss, as well as fitting on the log scale.
Proven performance. Tested against engineering estimates on several fields, typically outperforms engineering forecasts by 20% or so.
The user must decide on the following to get the most out of the method:
What is the forecasting horizon? A year? Ten years? etc.
What should the hyper-parameters be set to? Decided by either manually fixing parameters, or by running cross validation on a time-based train/test split.
Note
The dca package implements low-level building blocks.
Users will have to pre-process data correctly, connect to a numerical optimizer, implement hyperparameter search if relevant, etc.
A user can avoid all of this by using adca instead.