d845c509d3
A second Stage-1 R strategy candidate for the edge-research milestone, a structurally
different trend mechanic than the refuted SMA-momentum: a Donchian channel breakout.
Swaps only the signal leg of the stage1-r graph —
close -> Delay(1) -> {RollingMax,RollingMin}(N) -> {Gt,Gt} -> {Latch,Latch} ->
Sub = bias in {-1,0,+1} — keeping the vol-stop R definition unchanged, so it screens
under the identical R yardstick (clean A/B vs momentum).
- aura-std: new RollingMax / RollingMin nodes (sliding-window extremum via a monotonic
deque, O(1) amortized; mirror the Sma/Delay ring-buffer shape, warm-up skip-emit,
C7/C8). The +/-1 direction latch composes from two existing Latch nodes + Sub (no new
latch type).
- aura-cli: stage1_breakout_graph + a manual-grid stage1_breakout_sweep_family
(fully-bound graph per point, sidestepping parameter-ganging since one channel length
drives both rolling nodes); --strategy stage1-breakout + --channel grid flag; usage
strings updated.
- Causality (C2): one Delay(1) on close feeds both rolling nodes, so each channel covers
close[t-N..t-1] — the current bar is excluded. Pinned by a contrastive e2e test (a
strictly rising series up-breaks every warmed bar; a window including the current bar
never could) plus a +/-1-latch-hold test.
All existing goldens byte-identical (stage1-r/sma/momentum untouched); folded-no-trace
== raw-trace metrics; workspace tests + clippy green.
refs #137
71 lines
1.9 KiB
Rust
71 lines
1.9 KiB
Rust
//! `aura-std` — the standard node library shipped with the engine.
|
|
//!
|
|
//! The universal, batteries-included building blocks every project gets for
|
|
//! free: common indicators (SMA, ATR, RSI, …), resamplers, the `SessionNode`,
|
|
//! standard combinators, and broker nodes (the sim-optimal broker + realistic
|
|
//! broker profiles). Depends only on `aura-core` (the shared contract).
|
|
//!
|
|
//! This is the top tier of the three-tier node-reuse model (contract C16):
|
|
//!
|
|
//! - `aura-std` — universal blocks, here, ship with the engine;
|
|
//! - shared node crates — cross-project-reusable blocks, in their own repos,
|
|
//! pulled in as cargo git dependencies;
|
|
//! - project-local `nodes/` — experimental, project-specific blocks.
|
|
//!
|
|
//! The first block lands with the walking skeleton: [`Sma`], the simple moving
|
|
//! average — a worked producer node proving the `aura-core` `Node` contract.
|
|
|
|
mod add;
|
|
mod and;
|
|
mod bias;
|
|
mod delay;
|
|
mod ema;
|
|
mod eqconst;
|
|
mod gated_recorder;
|
|
mod gt;
|
|
mod latch;
|
|
mod lincomb;
|
|
mod longonly;
|
|
mod mul;
|
|
mod position_management;
|
|
mod recorder;
|
|
mod resample;
|
|
mod rolling_max;
|
|
mod rolling_min;
|
|
mod series_reducer;
|
|
mod session;
|
|
mod sim_broker;
|
|
mod sizer;
|
|
mod sma;
|
|
mod sqrt;
|
|
mod stop_rule;
|
|
mod sub;
|
|
pub use add::Add;
|
|
pub use and::And;
|
|
pub use bias::Bias;
|
|
pub use delay::Delay;
|
|
pub use ema::Ema;
|
|
pub use eqconst::EqConst;
|
|
pub use gated_recorder::GatedRecorder;
|
|
pub use gt::Gt;
|
|
pub use latch::Latch;
|
|
pub use lincomb::LinComb;
|
|
pub use longonly::LongOnly;
|
|
pub use mul::Mul;
|
|
pub use position_management::{
|
|
ExitReason, FIELD_NAMES as PM_FIELD_NAMES, PositionManagement, RECORD_KINDS as PM_RECORD_KINDS,
|
|
WIDTH as PM_WIDTH,
|
|
};
|
|
pub use recorder::Recorder;
|
|
pub use resample::Resample;
|
|
pub use rolling_max::RollingMax;
|
|
pub use rolling_min::RollingMin;
|
|
pub use series_reducer::SeriesReducer;
|
|
pub use session::Session;
|
|
pub use sim_broker::SimBroker;
|
|
pub use sizer::Sizer;
|
|
pub use sma::Sma;
|
|
pub use sqrt::Sqrt;
|
|
pub use stop_rule::FixedStop;
|
|
pub use sub::Sub;
|