Metadata-Version: 2.4
Name: mif-foundation
Version: 0.1.0
Summary: Metric and strategy qualification layer for the Metric Integrity Framework
Author: Symbioticode
License-Expression: MIT
Project-URL: Homepage, https://github.com/symbioticode/mif-core
Project-URL: Repository, https://github.com/symbioticode/mif-core
Project-URL: Issues, https://github.com/symbioticode/mif-core/issues
Keywords: metric-integrity,strategy-validation,quantitative-finance,mif
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: <3.13,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mif-dal<1.0.0,>=0.1.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
Requires-Dist: mypy>=1.9.0; extra == "dev"
Requires-Dist: ruff>=0.4.0; extra == "dev"
Dynamic: license-file

# mif-core

[![CI](https://github.com/symbioticode/mif-core/actions/workflows/ci.yml/badge.svg)](https://github.com/symbioticode/mif-core/actions/workflows/ci.yml)

The metric and strategy qualification layer of the Metric Integrity Framework.

`mif-core` sits above the two canonical infrastructure projects:

```text
mif-dqf  → certifies data quality
mif-dal  → assembles and hands off certified data
mif-core → qualifies metrics and strategies
```

This first increment defines explicit contracts and a deterministic offline
catalogue. Tests are selected explicitly; no hidden one-size-fits-all protocol
is applied.

## Included test catalogue

The package currently ships six offline checks: DAL handoff readiness, signal
shape, adaptive positive-return stability, return integrity, configurable
rolling out-of-sample consistency, and prefix causality (look-ahead detection). They
are deliberately small building blocks, not a complete profitability
guarantee.

## Development

```bash
python -m pip install -e '.[dev]'
python -m pytest
python -m build
```

The published distribution is named `mif-foundation` on PyPI. The
import package and command remain `core` and `mif-core` respectively; the
longer distribution name makes the PyPI project unambiguous.

## Supported Python versions

The current release supports Python 3.11 and 3.12. Python 3.13 support is
deferred because the canonical `mif-dal` dependency currently requires a
NumPy version without a compatible Python 3.13 distribution.

```bash
mif-core catalog
mif-core --version
mif-core demo
mif-core metric-demo
mif-core demo --format text
mif-core metric-demo --format text
mif-core demo --tests T_HANDOFF_001,T_LOOKAHEAD_001
```

An external strategy can implement `StrategyAdapter` and be certified against
an explicit list of tests. See `examples/certify_strategy.py` for an offline
example; production callers should supply the real `DALHandoff` from
`mif-dal-en`.

`examples/certify_metric.py` shows the corresponding metric contract.

See [`docs/API.md`](docs/API.md) for the supported public surface.
See [`docs/ROADMAP.md`](docs/ROADMAP.md) for current limits and next phases.
See [`docs/PUBLISHING.md`](docs/PUBLISHING.md) for the PyPI release path.

## Status

Development implementation based on the documented MIF v5 architecture. The
architecture file contains a historical brainstorming version marker; the
provenance decision is recorded in `docs/PROVENANCE.md`.

## Test

```bash
python3 -m unittest discover -s tests -v
```
