Skip to content

Add first-class strategies API with standardized signal contracts #17

@TDamiao

Description

@TDamiao

Goal

Promote strategy playbooks from examples into a supported API module with consistent signal contracts.

Why

Examples exist, but production users need reusable/parameterized strategy primitives.

Implementation prompt

Add strategies/ exports for baseline strategies:

  • MA cross
  • RSI mean-reversion
  • BB squeeze
  • Donchian breakout

Common output contract:

  • signal: -1 | 0 | 1
  • confidence?
  • meta (inputs used, warmup status)

APIs should accept both batch arrays and candle-based inputs where applicable.

Scope

  • Pure strategy signal generation (no execution/backtest side effects)
  • Config objects with defaults and strict validation
  • Shared helper utilities for warmup and null-safe behavior

Acceptance criteria

  • At least 4 strategy builders available via ta-crypto/strategies
  • Consistent typed return contract across all strategies
  • README strategy section with usage examples
  • Unit tests for warmup, parameter bounds, and deterministic outputs

Test plan

  • Golden fixtures for each strategy baseline
  • Cross-check one strategy against an external notebook/reference script
  • Smoke tests combining strategy -> backtest integration (when backtest module exists)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements to docs, onboarding, and examples.help wantedExtra help is welcome from the community.v0.4Release gate work required before shipping v0.4.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions