Adding Indicators¶
To add a new technical indicator to the backtest pipeline, follow this pattern.
Steps¶
-
Add the method to
TechnicalAnalysisinsrc/strat.py: -
Add signal mapping — if the indicator is bounded (0–100 like RSI), set
IS_BOUNDED_IND = 'Y'in REFDATA. The backend auto-selects bounded vs band signal functions. -
Seed REFDATA — create a Liquibase changeset to insert into
REFDATA.INDICATOR: -
Write tests in
tests/unit/test_strat.py— verify output shape, edge cases, NaN handling. -
Run all tests:
python -m pytest tests/ -v
Note
See the add-indicator skill at .github/skills/add-indicator/SKILL.md for the full checklist.