MCPcopy Create free account
hub / github.com/Open-Quant/openquant / default

Method default

crates/openquant/src/synthetic_backtesting.rs:49–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47//! // Expecting reversion, a wide stop beats a tight one.
48//! let wide = TradingRule { profit_taking: 2.0, stop_loss: 8.0 };
49//! let tight = TradingRule { profit_taking: 2.0, stop_loss: 0.5 };
50//! let wide = evaluate_rule_on_paths(&paths, wide, 59, 1.0)?;
51//! let tight = evaluate_rule_on_paths(&paths, tight, 59, 1.0)?;
52//! assert!(wide.sharpe > tight.sharpe && wide.win_rate > 0.95);
53//! # Ok(())
54//! # }
55//! ```
56
57use crate::util::stats;
58use rand::rngs::StdRng;
59use rand::SeedableRng;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected