Metadata-Version: 2.4
Name: ntide
Version: 1.3.1
Summary: Research framework for nonlocal trend-inhibition delay dynamics
Author: Haoran Zhang
License-Expression: MIT
Project-URL: Repository, https://github.com/haoranzhang-research/ntide
Project-URL: Article, https://doi.org/10.1016/j.physa.2025.131161
Project-URL: Reproduction, https://github.com/haoranzhang-research/ntide-physica-a-reproduction
Keywords: econophysics,nonlocal-coupling,delay-equations,critical-phenomena,financial-risk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=1.5
Requires-Dist: scipy>=1.9
Requires-Dist: scikit-learn>=1.2
Provides-Extra: plot
Requires-Dist: matplotlib>=3.6; extra == "plot"
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: build>=1; extra == "dev"
Dynamic: license-file

# NTIDE framework

NTIDE is a research implementation of nonlocal trend-inhibition delay dynamics
and physics-informed stability indicators. This framework-only distribution is
designed for user-supplied data and deliberately contains no empirical dataset,
crisis labels, historical processed artifacts or paper result tables.

## Installation

```bash
python -m pip install ntide
```

For a local checkout:

```bash
python -m pip install -e .
```

## Minimal use

```python
import pandas as pd
from ntide import CrisisDetector

data = pd.read_csv("market_data.csv", index_col="date", parse_dates=True)
detector = CrisisDetector(identification_window=160)
components = detector.fit(data).predict_components(data)
print(components.tail())
```

The input must have a unique, increasing `DatetimeIndex` and a positive numeric
`volume` column. Warm-up outputs are `NaN` until enough past observations are
available.

## Included modules

- `ntide.core`: nonlocal kernels, NTIDE field solver and delay stability margin.
- `ntide.data`: causal activity-field preprocessing for user-provided volume.
- `ntide.models`: online parameter identification and component scores.
- `ntide.evaluation`: generic AUROC/AUPRC, RGA and SAFE utilities.

Read [`SCIENTIFIC_SCOPE.md`](SCIENTIFIC_SCOPE.md) before making empirical or
trading claims. The default hazard is a research index, not a calibrated crisis
probability.

## Article

Zhang, H. (2026). *Early Warning of Financial Crises Through Critical Field
Dynamics: A Nonlocal Trend-Inhibition Delay Equation Framework*. Physica A,
682, 131161. https://doi.org/10.1016/j.physa.2025.131161

The article's lightweight computational reproduction is distributed separately
in [`ntide-physica-a-reproduction`](https://github.com/haoranzhang-research/ntide-physica-a-reproduction).
