Metadata-Version: 2.4
Name: utss
Version: 1.1.0
Summary: Universal Trading Strategy Schema - A composable schema for expressing any trading strategy
Project-URL: Homepage, https://github.com/obichan117/utss
Project-URL: Documentation, https://obichan117.github.io/utss
Project-URL: Repository, https://github.com/obichan117/utss
Project-URL: Issues, https://github.com/obichan117/utss/issues
Author: obichan117
License: MIT
Keywords: algorithmic-trading,backtesting,json-schema,llm,pydantic,quantitative-finance,schema,strategy,trading
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Description-Content-Type: text/markdown

# UTSS - Universal Trading Strategy Schema

A comprehensive, composable schema for expressing any trading strategy.

## Installation

```bash
pip install utss
```

## Quick Start

```python
from utss import validate_yaml, Strategy

# Load and validate a strategy from YAML
strategy = validate_yaml("""
info:
  id: rsi-reversal
  name: RSI Reversal Strategy
  version: "1.0"

universe:
  type: static
  symbols: ["AAPL", "GOOGL"]

rules:
  - name: buy-oversold
    when:
      type: comparison
      left:
        type: indicator
        indicator: RSI
        params:
          period: 14
      operator: "<"
      right:
        type: constant
        value: 30
    then:
      type: trade
      direction: buy
      sizing:
        type: percent_of_equity
        percent: 10
""")

print(f"Strategy: {strategy.info.name}")
print(f"Universe: {strategy.universe}")
print(f"Rules: {len(strategy.rules)}")
```

## Features

- **LLM-friendly**: Predictable structure, clear type discriminators
- **Composable**: Signals → Conditions → Rules → Strategy
- **Extensible**: Support for custom indicators, metrics, and events
- **Validated**: Full Pydantic v2 validation

## Documentation

Full documentation: https://obichan117.github.io/utss

## License

MIT
