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

Method validate

crates/openquant/src/backtesting_engine.rs:20–37  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

18
19impl BacktestSafeguards {
20 pub fn validate(&self) -> Result<(), String> {
21 if self.survivorship_bias_control.trim().is_empty() {
22 return Err("survivorship_bias_control cannot be empty".to_string());
23 }
24 if self.look_ahead_control.trim().is_empty() {
25 return Err("look_ahead_control cannot be empty".to_string());
26 }
27 if self.data_mining_control.trim().is_empty() {
28 return Err("data_mining_control cannot be empty".to_string());
29 }
30 if self.cost_assumption.trim().is_empty() {
31 return Err("cost_assumption cannot be empty".to_string());
32 }
33 if self.multiple_testing_control.trim().is_empty() {
34 return Err("multiple_testing_control cannot be empty".to_string());
35 }
36 Ok(())
37 }
38}
39
40#[derive(Debug, Clone, PartialEq)]

Callers 4

run_walk_forwardFunction · 0.45
run_cross_validationFunction · 0.45
run_cpcvFunction · 0.45
solveMethod · 0.45

Calls 2

is_emptyMethod · 0.80
lenMethod · 0.80

Tested by

no test coverage detected