TradePose Models
Shared Pydantic contracts, enums, indicator calculations, and Polars schemas for TradePose packages.
Installation
pip install tradepose-models
Python 3.13 or newer is required.
Indicator specification
Indicator is the public calculation factory. IndicatorSpec adds canonical source
provenance and resolved wire identity.
from tradepose_models.enums import Freq
from tradepose_models.indicators import Indicator
from tradepose_models.strategy import IndicatorSpec, SourceDescriptor
source = SourceDescriptor(instrument="NAS100", freq=Freq.DAY_1)
atr_spec = IndicatorSpec(
source=source,
shift=1,
indicator=Indicator.atr(period=14, shift=1).config,
)
assert atr_spec.instrument == "NAS100"
assert atr_spec.column_id.startswith("ind_v1_")
Typed authoring dependencies
Authoring dependencies use IndicatorRef; resolved IndicatorOutputRef values belong
only to compiled IndicatorSpec wire data. Do not substitute readable labels or
physical ind_v1_* column identities for typed references.
from tradepose_models.indicators import Indicator
from tradepose_models.strategy import IndicatorRef
atr = Indicator.atr(period=14, shift=1)
atr_quantile = Indicator.atr_quantile(
IndicatorRef(name="atr"),
window=252,
quantile=0.5,
shift=0,
)
supertrend = Indicator.supertrend(
3.0,
IndicatorRef(name="atr"),
shift=1,
)
For open-driven decisions, indicators reading high, low, close, or volume
require shift >= 1. A literal current-bar column="open" may use shift=0.
Core modules
tradepose_models.strategy: strategy, graph, authoring, manifest, and portfolio data contracts.tradepose_models.indicators: calculation models and theIndicatorfactory.tradepose_models.enums: shared frequencies and trading enums.tradepose_models.schemas: trades and timezone-aware OHLCV schemas.tradepose_models.export: typed export request and response contracts.
Experiment catalogs, workspace lifecycle, execution, and portfolio promotion are
owned by tradepose-client; Models does not provide a Python strategy registry.
Development
From the repository python/ directory:
uv run --project packages/models pytest packages/models/tests
uv run ruff check packages/models
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tradepose_models-2.6.0.tar.gz.
File metadata
- Download URL: tradepose_models-2.6.0.tar.gz
- Upload date:
- Size: 150.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed9396265a830c083931ac33a51218d73077f928a07b2d9d79a3a152c7ac1d4b
|
|
| MD5 |
8b8927f4a8c0ba4a38fd96f0f3342295
|
|
| BLAKE2b-256 |
f00517ca97dfd20b03270bde237f0ff0ab44a3d23af1d17d3307043b5b85db27
|
File details
Details for the file tradepose_models-2.6.0-py3-none-any.whl.
File metadata
- Download URL: tradepose_models-2.6.0-py3-none-any.whl
- Upload date:
- Size: 162.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e16890062e87249e1749fd0e0a327d28cd06e5e9eddf36a3a127d6cc79c4057
|
|
| MD5 |
86d297b9055da419758ea43a60479577
|
|
| BLAKE2b-256 |
a1f1402312fa00484964e86abc59d70e5cc7d878c7fec0c87b483f74a375ad5c
|