(&self)
| 18 | |
| 19 | impl 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)] |
no test coverage detected