249aafdb0f
One process-global intern pool (intern_port/cost_port, the COL_PORTS LazyLock pattern) in the cost module is now the single source of the cost[k].<port>/cost[k].<field> names; CostSum::builder and cost_graph consume it and the per-build .leak()s in cost_graph are gone — the prerequisite before cost is rebuilt per member across a sweep. Two unit pins (same pointer for the same pair, dedup for bare names). Verified: aura-std 166/0, cost_graph 4/4, zero .leak() in the two sites, full workspace suite green, clippy -D warnings clean. closes #152 refs #234
100 lines
2.7 KiB
Rust
100 lines
2.7 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, the legacy `SimBroker` pip yardstick, and cost-model
|
|
//! nodes authored against the [`CostNode`] trait + [`CostRunner`] adapter
|
|
//! (`ConstantCost`, `VolSlippageCost`, …, in R — C10). 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 abs;
|
|
mod add;
|
|
mod and;
|
|
mod bias;
|
|
mod carry_cost;
|
|
mod const_node;
|
|
mod constant_cost;
|
|
mod cost;
|
|
mod cost_sum;
|
|
mod delay;
|
|
mod div;
|
|
mod ema;
|
|
mod eqconst;
|
|
mod gated_recorder;
|
|
mod gt;
|
|
mod latch;
|
|
mod lincomb;
|
|
mod longonly;
|
|
mod max;
|
|
mod min;
|
|
mod mul;
|
|
mod position_management;
|
|
mod recorder;
|
|
mod resample;
|
|
mod rolling_max;
|
|
mod rolling_min;
|
|
mod scale;
|
|
mod series_reducer;
|
|
mod session;
|
|
mod sim_broker;
|
|
mod sizer;
|
|
mod sma;
|
|
mod sqrt;
|
|
mod stop_rule;
|
|
mod sub;
|
|
mod vocabulary;
|
|
mod vol_slippage_cost;
|
|
pub use abs::Abs;
|
|
pub use add::Add;
|
|
pub use and::And;
|
|
pub use bias::Bias;
|
|
pub use carry_cost::CarryCost;
|
|
pub use const_node::Const;
|
|
pub use constant_cost::ConstantCost;
|
|
pub use cost::{
|
|
cost_node_builder, cost_port, intern_port, ChargeMode, CostNode, CostRunner,
|
|
COST_FIELD_NAMES, COST_WIDTH, GEOMETRY_WIDTH,
|
|
};
|
|
pub use cost_sum::CostSum;
|
|
pub use delay::Delay;
|
|
pub use div::Div;
|
|
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 max::Max;
|
|
pub use min::Min;
|
|
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 scale::Scale;
|
|
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;
|
|
pub use vocabulary::{std_vocabulary, std_vocabulary_types};
|
|
pub use vol_slippage_cost::VolSlippageCost;
|