pyutss - Python Backtesting Engine for UTSS
A backtesting engine that executes UTSS (Universal Trading Strategy Schema) strategies.
Installation
# Core package
pip install pyutss
# With J-Quants support (Japanese stocks)
pip install pyutss[jquants]
# With Yahoo Finance support
pip install pyutss[yahoo]
# With all data providers
pip install pyutss[all]
Quick Start
from utss import validate_yaml
from pyutss import Engine
from pyutss.data import fetch
# Load strategy
strategy = validate_yaml(open("my_strategy.yaml").read())
# Fetch data and run backtest
data = fetch("AAPL", "2020-01-01", "2024-01-01")
engine = Engine(initial_capital=100_000)
result = engine.backtest(strategy, data=data, symbol="AAPL")
# View results
print(f"Return: {result.total_return_pct:.2f}%")
print(f"Trades: {result.total_trades}")
Features
- UTSS Native: Directly executes UTSS strategy definitions
- Multiple Data Sources: J-Quants (Japan), Yahoo Finance (US/Global)
- Comprehensive Metrics: Sharpe, Sortino, max drawdown, win rate, and more
- Indicator Support: 50+ technical indicators matching UTSS schema
Documentation
Full documentation: https://obichan117.github.io/utss
License
MIT
Metadata
Release files for pyutss 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyutss-0.2.2.tar.gz | 82.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyutss-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 200.1 kB
Release files / pyutss-0.2.2.tar.gz
| Download URL | pyutss-0.2.2.tar.gz |
|---|---|
| Size | 82.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8b1354f4da7f5ff3d33ad200bb3dec0f6e5d613323801e48793868d01561e9b0
|
|
BLAKE2b-256 checksum How to use checksums |
1b9f722220eb7a73523ea9ce14f73f2031422cdf55b7e2f0e2eefe967c053220
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / pyutss-0.2.2-py3-none-any.whl
| Download URL | pyutss-0.2.2-py3-none-any.whl |
|---|---|
| Size | 118.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90768b967e9db1f8c5311a081b12120bde33bd2a037caa378e0f46a74bdabc4a
|
|
BLAKE2b-256 checksum How to use checksums |
e9378c2428285dbb86ba2ca07ddae4b4c2711cf86cf55d39acc253eb849d4e9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Security for pyutss 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.