Skip to content

Contributing to QuantWave

First off, thank you for considering contributing to QuantWave! It's people like you who make it such a great tool.

Development Workflow

Prerequisites

  • Rust (2024 edition)
  • Python 3.12+
  • cargo-nextest

Local Setup

  1. Clone the repository:
    git clone https://github.com/lavs9/quantwave
    cd quantwave
    
  2. Set up the virtual environment:
    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements-docs.txt
    
  3. Build the project:
    cargo build
    

Running Tests

We use nextest for Rust tests:

cargo nextest run
For Python tests:
pytest

Adding a New Indicator

  1. Implement Core Logic: Add the indicator to quantwave-core/src/indicators/ implementing the Next<T> trait.
  2. Add Polars Expression: Expose the indicator in quantwave-plugins or quantwave-polars.
  3. Write Tests:
  4. Unit tests in quantwave-core.
  5. Parity tests (Streaming vs. Batch).
  6. Add to gold_standard if applicable.
  7. Document: Add a new page in docs/guides/indicators/ following the established template.

Style Guidelines

  • Follow idiomatic Rust (run cargo clippy).
  • Ensure all public functions have docstrings.
  • Keep performance in mind; avoid unnecessary allocations.

Reporting Issues

Please use the GitHub issue tracker to report bugs or request features.