Skip to main content

Decline Curve Analysis: A comprehensive Python library for decline curve analysis with multi-phase forecasting, data utilities, and ML models

Project description

Decline Curve Analysis

A Python library for forecasting oil and gas production using traditional decline models and modern machine learning.

What this is

Decline curve analysis is essential for petroleum engineers, reservoir analysts, and energy economists who need to predict future production from oil and gas wells. This library provides both classical Arps decline models and state-of-the-art forecasting methods in a single, easy-to-use package.

The library helps you forecast production rates, estimate reserves, and evaluate economic performance. It supports exponential, harmonic, and hyperbolic decline curves, plus machine learning models like ARIMA, Chronos, and TimesFM for more complex patterns. Monte Carlo simulation provides probabilistic forecasts with P10/P50/P90 ranges for risk assessment.

Whether you're analyzing a single well or benchmarking hundreds across a field, the library handles data processing, model fitting, and visualization automatically. It's designed for both quick analyses and production workflows that need reproducibility and uncertainty quantification.

Highlights

The library combines traditional petroleum engineering methods with modern forecasting techniques. It covers the full evaluation workflow from raw production data to reserves, economics, and risk — without stitching together multiple packages.

Feature comparison

Capability decline-curve petbox-dca DCApy
Arps (exp / harmonic / hyperbolic)
Modified Hyperbolic (SEC standard)
Duong model
Power-Law Exponential (PLE / Ilk)
Stretched Exponential (SEPD)
EUR — closed form (SEPD)
Model auto-recommender
Full-cycle economics (royalty, WI, taxes)
CAPEX / IRR / payout / ROI
Breakeven price (Brent's method)
Price scenario analysis (low/base/high)
PRMS 1P/2P/3P reserves classification
Type curve normalization (Fetkovich)
Probabilistic P10/P50/P90
NPV risk report (VaR, CVaR)
ARIMA / TimesFM / Chronos
Multi-phase (oil + gas + water)
Numba JIT acceleration
Batch / portfolio analysis
CLI (dca fit …)

Installation

pip install decline-curve

Optional Dependencies

For additional features, install optional extras:

# Statistical models (ARIMA)
pip install decline-curve[stats]

# Large language models (Chronos, TimesFM)
pip install decline-curve[llm]

# Spatial analysis (kriging)
pip install decline-curve[spatial]

# Ecosystem integrations (pygeomodeling, geosuite)
pip install decline-curve[integrations]

# All optional features
pip install decline-curve[all]

Quick start

import pandas as pd
import numpy as np
from decline_curve import dca

# Create sample production data
dates = pd.date_range('2020-01-01', periods=24, freq='MS')
production = 1000 * np.exp(-0.05 * np.arange(24))
series = pd.Series(production, index=dates, name='oil_bbl')

# Generate forecast
forecast = dca.forecast(series, model='arps', kind='hyperbolic', horizon=12)

Command line interface:

dca fit production.csv --well WELL_001 --model arps

Examples

See examples/01_basic_dca_analysis.ipynb for a complete workflow and examples/02_economic_evaluation.ipynb for economic analysis.

Project status

The library is in active development with core functionality stable. Current focus is on expanding machine learning model support and improving uncertainty quantification methods.

Roadmap

We're adding support for more foundation models and ensemble forecasting methods. Data quality tools and automated segmentation are being enhanced. The batch processing pipeline is being optimized for larger field datasets.

Ecosystem Integration

This library integrates with other tools in the ecosystem:

  • signalplot: Minimalist plotting design for publication-ready figures (used by default)
  • pygeomodeling: Advanced Gaussian Process Regression and Kriging for spatial EUR interpolation
  • geosuite: Professional subsurface analysis tools for petrophysics and geomechanics

All plots use signalplot's minimalist aesthetic by default when available. See examples/10_ecosystem_integration_example.py for integration examples.

Contributing

We welcome contributions. Please see CONTRIBUTING.md for guidelines.

License

Licensed under the Apache License 2.0. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decline_curve-0.6.0.tar.gz (331.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decline_curve-0.6.0-py3-none-any.whl (281.8 kB view details)

Uploaded Python 3

File details

Details for the file decline_curve-0.6.0.tar.gz.

File metadata

  • Download URL: decline_curve-0.6.0.tar.gz
  • Upload date:
  • Size: 331.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for decline_curve-0.6.0.tar.gz
Algorithm Hash digest
SHA256 9b93566372473baec79fabc9542b5594048e614f6fb209b1ec94e8d1c2f40309
MD5 07521d25d9aa5654441a3a0a00c8968d
BLAKE2b-256 7877528ffca90a8e0308a2fc1d15da84ed2cad99bbf1473f7f4cd5cfe8d8d7d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for decline_curve-0.6.0.tar.gz:

Publisher: workflow.yml on kylejones200/pydca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file decline_curve-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: decline_curve-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 281.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for decline_curve-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2865fbb97868b3ef910aaa96b567e9fc488780a3524acd1fc67e4fad89850225
MD5 cf048511a38b5905f73bf79923d355dd
BLAKE2b-256 78c244622961adcefdaa11347fae8d139ff67041af993b0967c6f5cff1463d28

See more details on using hashes here.

Provenance

The following attestation bundles were made for decline_curve-0.6.0-py3-none-any.whl:

Publisher: workflow.yml on kylejones200/pydca

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page