Skip to main content

composer-trade-common

A collection of common groups used in Composer symphonies. Install with:

pip install composer-trade-common

Then import groups directly:

from composer_trade_common import safe_sectors_or_bonds

Usage

In this example we can import the defined group Safe Sectors or Bonds.

Input:

from composer.client import ComposerClient
from composer.models.common.symphony import *
from composer_trade_common import safe_sectors_or_bonds
import os
from dotenv import load_dotenv

load_dotenv()


symph = SymphonyDefinition(
    name="Example Group Import",
    description="Demonstrates importing a group from the shared collection",
    rebalance="daily",
    children=[
        WeightCashEqual(
            children=[
                safe_sectors_or_bonds
            ]
        ),
    ],
)

client = ComposerClient(
    api_key=os.getenv("COMPOSER_API_KEY"),
    api_secret=os.getenv("COMPOSER_API_SECRET"),
)

res = client.backtest.run_v2(symphony=symph)
print(res)

Output:

BacktestResult(stats=Stats(sharpe=1.71, cumulative=7095.53%, drawdown=18.00%, ann_return=25.53%), final_value=719,553.16, days=6880)

Metadata

Release files for composer-trade-common 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for composer-trade-common 0.1.0
File Size Uploaded Provenance Actions
composer_trade_common-0.1.0.tar.gz 2.5 kB Without provenance Details for composer_trade_common-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for composer-trade-common 0.1.0
File Interpreter ABI Platform Actions
composer_trade_common-0.1.0-py3-none-any.whl Python 3 none any Details for composer_trade_common-0.1.0-py3-none-any.whl

Total release size: 5.5 kB

Release files / composer_trade_common-0.1.0.tar.gz

Download URL composer_trade_common-0.1.0.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b1fc3a27a811c1183889132b07eff23c83e7d818247a952c67ce297e8cb1ae1e
BLAKE2b-256 checksum
How to use checksums
e6c7996247c796b0f29b28d469c386ebbe14b7825173b8867fb87bc85880cfc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / composer_trade_common-0.1.0-py3-none-any.whl

Download URL composer_trade_common-0.1.0-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac6c755a89bb575cfa6db99639b4d47354f2a6909e6e6ecad5ea268b7f55db1d
BLAKE2b-256 checksum
How to use checksums
97b824bee7b7e758380aee3dc4572108f879062e9b4b20b0ef80fa59eedd80f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.10.5 {"installer":{"name":"uv","version":"0.10.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for composer-trade-common 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page