the holy grail. untill next time
This commit is contained in:
@@ -819,13 +819,9 @@ impl Backtester {
|
||||
|
||||
// Apply regime threshold bump: in Caution, require stronger conviction
|
||||
let effective_buy = if buy_threshold_bump > 0.0 {
|
||||
// Re-evaluate: the signal score is buy_score - sell_score.
|
||||
// We need to check if the score exceeds the bumped threshold.
|
||||
// Since we don't have the raw score, use confidence as a proxy:
|
||||
// confidence = score.abs() / 12.0, so score = confidence * 12.0
|
||||
// A Buy signal means score >= 4.0 (our threshold).
|
||||
// In Caution, we require score >= 4.0 + bump (6.0 → StrongBuy territory).
|
||||
let approx_score = signal.confidence * 12.0;
|
||||
// Reverse confidence back to score: confidence = score / 10.0
|
||||
// In Caution, require score >= 4.0 + bump (7.0 → StrongBuy territory).
|
||||
let approx_score = signal.confidence * 10.0;
|
||||
approx_score >= (4.0 + buy_threshold_bump) && signal.signal.is_buy()
|
||||
} else {
|
||||
signal.signal.is_buy()
|
||||
|
||||
Reference in New Issue
Block a user