FerroSpread
Getting started
Construct, rank, and explain a first defined-risk spread.
FerroSpread turns enriched equity, option, and eligibility rows into explained spread candidates. Pricing and volatility assumptions come from upstream analytics; FerroSpread owns construction, candidate summaries, scenario analytics, and leg-level accounting.
Construct
use spread_builder::{build_spread_candidates, SpreadBuilderInput};
let input = SpreadBuilderInput::legacy(
snapshot_date,
&equity_rows,
&option_rows,
&eligibility_rows,
);
let output = build_spread_candidates(&config.spread_builder, &input)?;
for summary in &output.summaries {
println!(
"{} {} {} {:?}",
summary.symbol,
summary.strategy_family,
summary.strategy_code,
summary.tradeable_resolution_reason
);
}
# Ok::<(), Box<dyn std::error::Error>>(())Analyze
use spread_analytics::{compute_candidate_analytics, CandidateAnalytics};
let analytics: CandidateAnalytics = compute_candidate_analytics(&candidate_inputs)?;
println!(
"pop={} expected_value={} stress_loss={}",
analytics.probability_of_profit,
analytics.expected_value,
analytics.stress_loss
);
# Ok::<(), Box<dyn std::error::Error>>(())Every output should be treated as an explainable candidate: construction inputs, leg rows, analytics inputs, and scenario assumptions stay separate so the application layer can rank or filter without hiding provenance.
Next
- Read the builder API.
- Read the analytics API.
- Start with the bull call debit example.