Skip to content

Latest commit

 

History

History
61 lines (43 loc) · 1.4 KB

File metadata and controls

61 lines (43 loc) · 1.4 KB

Contributing to StratEvo

Thanks for considering a contribution. Here's how to get started.

Setup

git clone https://github.com/NeuZhou/stratevo.git
cd stratevo
pip install -e ".[dev]"
pytest -x -q    # ~3 minutes for core tests

Requirements: Python 3.10+

Adding a Factor

The easiest way to contribute. Each factor is one file with one function.

stratevo scaffold factor --name my_signal --category momentum
# Creates factors/my_signal.py with a template

Edit the generated file, implement compute(), then:

pytest tests/test_alpha_factors.py -k my_signal
git add factors/my_signal.py
git commit -m "feat: add my_signal factor"

Submit a PR. That's it.

Other Contributions

Type Difficulty Example
Factors Easy New technical indicator
Bug fixes Easy Edge case in backtester
Data sources Medium New exchange adapter
Fitness functions Medium Custom scoring metric
Strategy DNA configs Advanced New evolution preset

Running Tests

pytest                    # Full suite (~10 min)
pytest -x -q              # Stop on first failure
pytest tests/test_core*   # Core tests only (~1 min)

Code Style

  • We use ruff for linting
  • Type hints encouraged but not required
  • Docstrings for public functions

Questions?

Open an issue or ask in Discord.