Expand description
Plausibility check between an indicator’s data requirements and a series’ capabilities.
Plausibility check between what an indicator’s calculation needs from a bar series
(crate::applicability::DataRequirements) and what a series actually provides
(crate::model::SeriesCapabilities).
build_checked (see crate::indicator::registry) validates parameters — periods in
range, threshold ordering. It says nothing about whether the data fits the indicator: a
volume-profile indicator run on tick-volume CFD data will compute a POC/VAH/VAL that looks
plausible and measures nothing meaningful. Nothing in the type system prevents that. This
module is the check that catches it: crate::applicability::check_applicability compares an
indicator’s declared crate::applicability::DataRequirements against a series’
crate::model::SeriesCapabilities and returns a three-valued verdict
(crate::applicability::Applicability) with factual, publication-ready explanations
attached.
(Note: this module-level doc comment uses fully-qualified crate:: paths for its own items
rather than bare names — rustdoc resolves intra-doc links here against the crate-root scope,
not this module’s, because pub mod applicability; in lib.rs also carries an outer ///
doc comment that gets merged with this file’s //! comment into one doc block for the module.)
Structs§
- Applicability
Note - A single applicability finding: which rule fired, and a publication-ready explanation.
- Data
Requirements - What an indicator’s calculation needs from the bar series it runs over, beyond plain OHLC
prices. All-
false(theDefault) is the right value for pure price indicators — the effort of declaring requirements is only spent on the indicators where it matters. - Rule
Description - Static description of one rule in
check_applicability’s table: which reason it produces, which tier it falls into, and its publication-ready explanation.rule_catalogexposes all of them for the doc export (see the plan’s “Export für die Doku” section) — this is the single source bothcheck_applicabilityand the export pull from, so the exported table can never drift from the rules actually enforced.
Enums§
- Applicability
- Three-valued result of matching an indicator’s
DataRequirementsagainst a series’SeriesCapabilities. - Applicability
Reason - Which rule in
check_applicabilityproduced a givenApplicabilityNote. - Applicability
Tier - Which of the two non-
Applicablebuckets a rule belongs to.
Functions§
- check_
applicability - Matches
requirementsagainstcapabilitiesand classifies the result. - data_
requirements - Looks up the
DataRequirementsfor a registry/catalog indicator name (case-insensitive, matching the.to_lowercase()convention used bycrate::indicator::registry::build_checked/build_typed). - rule_
catalog - All rules in
check_applicability’s table, in the same order they are evaluated — the source the doc export (see the plan’s “Export für die Doku” section) reads from.