diff --git a/patches/qlib_experiment_prompts.yaml b/patches/qlib_experiment_prompts.yaml index 1d9160c7..2ce0a5a5 100644 --- a/patches/qlib_experiment_prompts.yaml +++ b/patches/qlib_experiment_prompts.yaml @@ -87,7 +87,7 @@ qlib_factor_strategy: |- qlib_factor_output_format: |- Your output should be a pandas dataframe similar to the following example information: - MultiIndex: 40914 entries, (Timestamp('2020-01-02 00:00:00'), 'SH600000') to (Timestamp('2021-12-31 00:00:00'), 'SZ300059') + MultiIndex: 99904 entries, (Timestamp('2022-03-14 00:00:00'), 'EURUSD') to (Timestamp('2026-03-20 00:00:00'), 'EURUSD') Data columns (total 1 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- @@ -97,7 +97,7 @@ qlib_factor_output_format: |- Notice: The non-null count is OK to be different to the total number of entries since some instruments may not have the factor value on some days. One possible format of `result.h5` may be like following: datetime instrument - 2020-01-02 SZ000001 -0.001796 + 2022-03-14 EURUSD -0.000234 SZ000166 0.005780 SZ000686 0.004228 SZ000712 0.001298 diff --git a/patches/qlib_scenarios_prompts.yaml b/patches/qlib_scenarios_prompts.yaml index 69ceb198..1a43bf7c 100644 --- a/patches/qlib_scenarios_prompts.yaml +++ b/patches/qlib_scenarios_prompts.yaml @@ -174,41 +174,42 @@ model_experiment_output_format: |- factor_feedback_generation: system: |- - You are a professional financial result analysis assistant in data-driven R&D. + You are a professional FX quantitative analyst specializing in EURUSD intraday strategies. The task is described in the following scenario: {{ scenario }} - - You will receive a hypothesis, multiple tasks with their factors, their results, and the SOTA result. - Your feedback should specify whether the current result supports or refutes the hypothesis, compare it with previous SOTA (State of the Art) results, and suggest improvements or new directions. - - Please understand the following operation logic and then make your feedback that is suitable for the scenario: + + You will receive a hypothesis, multiple tasks with their factors, their results, and the SOTA result. + Your feedback should specify whether the current result supports or refutes the hypothesis, compare it with previous SOTA results, and suggest FX-specific improvements. + + **FX-specific evaluation criteria:** + - IC > 0.02 is meaningful for 15min EURUSD data + - Annualized return target: >9.62% (current SOTA to beat) + - Spread cost ~1.5 bps per trade — penalize high-turnover factors + - Factors using $factor column are INVALID — only $open $close $high $low $volume allowed + - Session-aware factors (London/NY) tend to outperform session-agnostic ones + - Mean reversion works in Asian session, momentum in London-NY overlap + + Please understand the following operation logic: 1. Logic Explanation: a) All factors that have surpassed SOTA in previous attempts will be included in the SOTA factor library. - b) New experiments will generate new factors, which will be combined with the factors in the SOTA library. - c) These combined factors will be backtested and compared against the current SOTA to enable continuous iteration. + b) New experiments will generate new factors, combined with the SOTA library factors. + c) These combined factors will be backtested and compared against current SOTA. 2. Development Directions: - a) New Direction: Propose a new factor direction for exploration and development. - b) Optimization of Existing Direction: - - Suggest further improvements to that factor (this can include further optimization of the factor or proposing a direction that combines better with the factor). - - Avoid re-implementing previous factors as those that surpassed SOTA are already included in the factor library and will be used in each run. - 3. Final Goal: To continuously accumulate factors that surpass each iteration to maintain the best SOTA. - - When judging the results: - 1. Any small improvement should be considered for inclusion as SOTA (set `Replace Best Result` as yes). - 2. If the new factor(s) shows an improvement in the annualized return, recommend it to replace the current best result. - 3. Minor variations in other metrics are acceptable as long as the annualized return improves. + a) New Direction: Propose a new FX-specific factor (session filter, volatility regime, volume spike). + b) Optimization: Refine lookback windows (4/8/16/32 bars), add ADX filter, adjust for spread costs. + 3. Final Goal: Beat 9.62% ARR on EURUSD 15min with controlled drawdown (<20%). - Consider Changing Direction for Significant Gaps with SOTA: - - If the new results significantly differ from the SOTA, consider exploring a new direction (write new type factors). - - Avoid re-implementing previous factors as those that surpassed SOTA are already included in the factor library and will be used in each run. + When judging results: + 1. Any small improvement in annualized return → set Replace Best Result as yes. + 2. If IC < 0 consistently → factor has no predictive power, change direction entirely. + 3. High turnover with low return → add volume or volatility filter to reduce trade frequency. - Please provide detailed and constructive feedback for future exploration. - Respond in JSON format. Example JSON structure for Result Analysis: + Respond in JSON format: { "Observations": "Your overall observations here", "Feedback for Hypothesis": "Observations related to the hypothesis", - "New Hypothesis": "Your new hypothesis here", + "New Hypothesis": "Your new FX-specific hypothesis here", "Reasoning": "Reasoning for the new hypothesis", "Replace Best Result": "yes or no" }