Define concrete 'promising' threshold and enforce indicator diversity in ledger-informed prompt
- Replace vague "promising metrics" with avg_sharpe >= 0.5 AND >= 10 trades per instrument - Add indicator-family diversity rule: if all prior strategies share the same core indicator (e.g. all Bollinger Bands), the first strategy of the new run must use a different family - Give explicit examples of alternative families: MACD, ATR breakout, volume spike, donchian channel breakout, stochastic oscillator - Extend the no-repeat ban to strategies with fewer than 5 trades per instrument Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -500,10 +500,17 @@ pub fn initial_prompt(instruments: &[String], candle_intervals: &[String], prior
|
||||
None => String::new(),
|
||||
};
|
||||
let starting_instruction = if prior_summary.is_some() {
|
||||
"Based on the prior results above: if the best strategy has promising metrics, \
|
||||
refine it. If all prior results were poor (0 trades or deeply negative Sharpe), try a \
|
||||
clearly different indicator family or candle interval than what was already attempted. \
|
||||
Do NOT repeat approaches that consistently produced 0 trades."
|
||||
"Based on the prior results above:\n\
|
||||
- A strategy is \"promising\" if avg_sharpe >= 0.5 AND it traded >= 10 times per instrument. \
|
||||
If the best prior strategy meets both thresholds, refine it (tighten entry conditions, \
|
||||
adjust the exit, or tune the interval).\n\
|
||||
- If no prior strategy reaches avg_sharpe >= 0.5, do NOT repeat the same indicator family. \
|
||||
Scan the best-strategies list: if they all use the same core indicator (e.g. all use \
|
||||
Bollinger Bands, or all use EMA crossovers, or all use RSI threshold), your FIRST strategy \
|
||||
MUST use a completely different indicator family — for example: MACD crossover, ATR \
|
||||
breakout, volume spike, donchian channel breakout, or stochastic oscillator. Only after \
|
||||
that novelty attempt may you refine prior work.\n\
|
||||
- Never repeat an approach that produced 0 trades or fewer than 5 trades per instrument."
|
||||
} else {
|
||||
"Start with a multi-timeframe trend-following approach with proper risk management \
|
||||
(stop-loss, time exit, and ATR-based position sizing)."
|
||||
|
||||
Reference in New Issue
Block a user