mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
feat: migrate to 1min EURUSD data (2020-2026)
- data_config.yaml: frequency 15min -> 1min, path -> eurusd_1min_data - patches/generate.py: updated qlib.init path and freq - patches/eva_utils.py: updated intraday label to 1min - all prompts/configs: replaced 15min references with 1min - fx_validator config, trader, graph: 1min intraday trading context
This commit is contained in:
@@ -243,7 +243,7 @@ class FactorDatetimeDailyEvaluator(FactorEvaluator):
|
||||
False,
|
||||
)
|
||||
if min_diff <= pd.Timedelta(minutes=30):
|
||||
return "The generated dataframe is intraday (15min bars). This is correct for EURUSD.", True
|
||||
return "The generated dataframe is intraday (1min bars). This is correct for EURUSD.", True
|
||||
return "The generated dataframe is daily.", True
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -7,12 +7,12 @@ result = subprocess.run(
|
||||
["/home/nico/miniconda3/envs/rdagent4qlib/bin/python3", "-c", """
|
||||
import qlib
|
||||
from qlib.data import D
|
||||
qlib.init(provider_uri="~/.qlib/qlib_data/eurusd_data")
|
||||
qlib.init(provider_uri="~/.qlib/qlib_data/eurusd_1min_data")
|
||||
fields = ["$open", "$close", "$high", "$low", "$volume"]
|
||||
data = (D.features(["EURUSD"], fields, start_time="2022-03-14", end_time="2026-03-20", freq="15min")
|
||||
data = (D.features(["EURUSD"], fields, start_time="2022-03-14", end_time="2026-03-20", freq="1min")
|
||||
.swaplevel().sort_index())
|
||||
data.to_hdf("./daily_pv_all.h5", key="data")
|
||||
data_debug = (D.features(["EURUSD"], fields, start_time="2024-01-01", end_time="2026-03-20", freq="15min")
|
||||
data_debug = (D.features(["EURUSD"], fields, start_time="2024-01-01", end_time="2026-03-20", freq="1min")
|
||||
.swaplevel().sort_index())
|
||||
data_debug.to_hdf("./daily_pv_debug.h5", key="data")
|
||||
print(f"Done: {data.shape[0]} rows")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
hypothesis_generation:
|
||||
system: |-
|
||||
You are an expert in FX and quantitative trading, specialized in EURUSD intraday strategies.
|
||||
Your task is to generate a well-reasoned hypothesis for new alpha factors based on EURUSD 15min OHLCV data.
|
||||
Your task is to generate a well-reasoned hypothesis for new alpha factors based on EURUSD 1min OHLCV data.
|
||||
|
||||
Key market knowledge:
|
||||
- EURUSD trades 24h with three main sessions: Asian (00:00-08:00 UTC), London (08:00-16:00 UTC), NY (13:00-21:00 UTC)
|
||||
|
||||
@@ -101,7 +101,7 @@ factor_hypothesis_specification: |-
|
||||
- Asian session shows mean reversion tendencies
|
||||
- Spread cost ~1.5 bps per trade — avoid high-turnover factors
|
||||
- No $factor column exists — use only $open, $close, $high, $low, $volume
|
||||
- Each "instrument" is EURUSD, each "day" is a 15min bar
|
||||
- Each "instrument" is EURUSD, each "day" is a 1min bar
|
||||
|
||||
**Factor Generation Rules:**
|
||||
1. **3-5 Factors per Generation** — cover different signal types per round
|
||||
@@ -183,7 +183,7 @@ factor_feedback_generation:
|
||||
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
|
||||
- IC > 0.02 is meaningful for 1min 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
|
||||
@@ -198,7 +198,7 @@ factor_feedback_generation:
|
||||
2. Development Directions:
|
||||
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%).
|
||||
3. Final Goal: Beat 9.62% ARR on EURUSD 1min with controlled drawdown (<20%).
|
||||
|
||||
When judging results:
|
||||
1. Any small improvement in annualized return → set Replace Best Result as yes.
|
||||
|
||||
Reference in New Issue
Block a user