quantwave_core/indicators/metadata.rs
1//! Indicator metadata definition.
2//!
3//! IMPORTANT PROCESS RULE (see AGENTS.md + task quantwave-i9dn):
4//! When adding a new indicator or making significant changes to an existing one,
5//! you MUST also create/update its corresponding `XXX_METADATA` constant in the
6//! same session, before landing the plane / doing the final git push.
7//!
8//! This metadata is the single source of truth used by:
9//! - Documentation generation (mkdocs)
10//! - Python package DX features
11//!
12//! Python metadata is codegen'd from this registry (quantwave-iqq7):
13//! python scripts/regenerate_metadata_registry.py
14//! python scripts/generate_indicator_metadata.py
15
16#[derive(Debug, Clone, serde::Serialize)]
17pub struct ParamDef {
18 pub name: &'static str,
19 pub default: &'static str,
20 pub description: &'static str,
21}
22
23#[derive(Debug, Clone, serde::Serialize)]
24pub struct IndicatorMetadata {
25 pub name: &'static str,
26 /// One-sentence plain-English description of what the indicator computes.
27 pub description: &'static str,
28 /// Practical usage: when and why a trader would apply this indicator.
29 pub usage: &'static str,
30 /// Searchable topic tags (e.g. "momentum", "oscillator", "ehlers", "dsp").
31 pub keywords: &'static [&'static str],
32 /// 3-4 line authoritative summary from Ehlers' papers/books or StockCharts.
33 pub ehlers_summary: &'static str,
34 pub params: &'static [ParamDef],
35 pub formula_source: &'static str,
36 pub formula_latex: &'static str,
37 pub gold_standard_file: &'static str,
38 pub category: &'static str,
39}