XAUUSD Cleaned H1 Training Dataset (2009-2026)
Gold (XAUUSD) hourly bars with scale-free features, a verified US news calendar, lagged macro data and buy / sell / no-trade labels, ready for walk-forward model training. All timestamps are real UTC. Everything is real recorded market or official data; nothing is simulated.
Generated 2026-09-24T13:25:03+00:00. Total size 183 MB.
Files
| File | Rows | Content |
|---|---|---|
data/training/xauusd_H1_train.parquet |
98,634 | Main training table: 60 features + target, 2009-09-04 to 2026-09-24 |
data/training/xauusd_H1_labeled.parquet |
100,000 | Full H1 table before feature engineering: MT5 OHLC, spread, news flags, FRED values, labels |
data/training/feature_list.json |
- | Feature names, target classes, build stats |
data/training/xauusd_H1_walk_forward.json |
- | Walk-forward folds (test 2018...2025) and the 2026 final holdout |
data/events/high_impact_events.parquet (+ .csv) |
637 | CPI, NFP, FOMC 2009-2027 in UTC |
data/bars_reference/xauusd_M1.parquet |
5,942,606 | UTC reference M1 bars (HistData + Pcitycrypto) |
data/bars_reference/xauusd_M5.parquet |
1,196,624 | UTC reference M5 bars (HistData + Pcitycrypto) |
data/bars_reference/xauusd_M15.parquet |
399,965 | UTC reference M15 bars (HistData + Pcitycrypto) |
data/bars_reference/xauusd_M30.parquet |
200,527 | UTC reference M30 bars (HistData + Pcitycrypto) |
data/bars_reference/xauusd_H1.parquet |
100,861 | UTC reference H1 bars (HistData + Pcitycrypto) |
data/bars_reference/xauusd_H4.parquet |
26,007 | UTC reference H4 bars (HistData + Pcitycrypto) |
data/bars_reference/xauusd_D1.parquet |
4,355 | UTC reference D1 bars (HistData + Pcitycrypto) |
reports/ |
- | Data quality report for the reference bars |
manifest.json |
- | Row counts, date ranges and SHA-256 of every file |
data/bars_reference/ is the UTC reference series built from two public Hugging Face datasets
(HistData M1 and a broker M1 feed). It was used to verify the MT5 timestamps; the model trains on MT5 data.
Quick start
from datasets import load_dataset
train = load_dataset("<your-user>/<this-repo>", "h1_training", split="train").to_pandas()
or with pandas after downloading: pd.read_parquet("data/training/xauusd_H1_train.parquet").
Main training table
- Column
time_utc: H1 bar open time, UTC (first column; D1 bars usesession_date). - Target
target: 0 = sell, 1 = no trade, 2 = buy. Share: sell 28.9%, no trade 42.6%, buy 28.5%. - Features (60):
ret_1h,ret_3h,ret_6h,ret_12h,ret_24h,ret_120h,vol_24h,vol_120h,vol_ratio,atr_pct,atr_ratio_120,range_atr,body_atr,upper_wick_atr,lower_wick_atr,dist_ema20_atr,dist_ema50_atr,dist_ema200_atr,ema20_slope_atr,rsi_14,dist_high24_atr,dist_low24_atr,dist_high120_atr,dist_low120_atr,tick_volume_ratio,hour_sin,hour_cos,day_of_week,session_asia,session_london,session_london_ny_overlap,session_ny_late,news_any_window,news_cpi_window,news_nfp_window,news_fomc_window,hours_to_next_news,hours_since_prev_news,macro_DFII10,macro_DGS10,macro_T10YIE,macro_DFF,macro_VIXCLS,macro_UNRATE,macro_DFII10_chg7d,macro_DFII10_chg30d,macro_DGS10_chg7d,macro_DGS10_chg30d,macro_T10YIE_chg7d,macro_T10YIE_chg30d,macro_VIXCLS_chg7d,macro_DFF_chg90d,macro_UNRATE_chg90d,macro_DTWEXBGS_pct7d,macro_DTWEXBGS_pct30d,macro_DCOILBRENTEU_pct7d,macro_DCOILBRENTEU_pct30d,macro_CPIAUCSL_yoy,macro_CPILFESL_yoy,macro_PAYEMS_chg90d - Backtest-only columns (never use as features):
open, high, low, close, atr_14, spread, label, planned_entry_price, planned_stop_price, planned_target_price.
Label rule
Entry at the H1 close. Buy if price reaches +1.5 x ATR14 + $0.30 before -1.0 x ATR14 - $0.30 within 8 bars;
sell is the mirror; otherwise no trade. When stop and target are both touched in one bar, the stop counts first.
$0.30 covers spread and slippage (the MT5 bar spread is the minimum of the hour and too optimistic).
No-lookahead rules
- Every price feature uses only past bars (returns, EMA/ATR distances, RSI, rolling highs/lows).
- FRED values are joined only after publication: daily series +1 day, dollar index and Brent +7 days, monthly series +45 days.
- News windows (1 h before to 3 h after) come from official schedules published in advance.
- Walk-forward folds end 8 bars before each test year so no label window crosses into the test data.
Sources and processing
| Data | Source | Processing |
|---|---|---|
| XAUUSD H1 | MetaTrader 5 broker history (100,000 bars) | Broker server time is Eastern European time (UTC+2/+3, EU DST); converted to UTC and verified 0 h offset against the reference bars |
| Reference M1 | fokan/xauusd-2009-2026 (HistData), Pcitycrypto/xauusd | Clock offsets verified on FOMC 14:00 NY price spikes; duplicates removed; merged; resampled to M5-D1 aligned to the 18:00 NY session open |
| Macro | FRED: DFII10, DGS10, T10YIE, DFF, VIXCLS, UNRATE, DTWEXBGS, DCOILBRENTEU, CPIAUCSL, CPILFESL, PAYEMS | Publication lags as above; changes instead of trending levels |
| CPI, NFP dates | BLS release archives | 89% show a gold spike at exactly 08:30 NY |
| FOMC dates | Federal Reserve | 94% show a spike at the statement minute; 2026-10 onward are scheduled, not yet held |
Known limitations
- PCE releases and Fed speeches are not in the calendar.
- MT5 spread is the minimum spread per hour; real costs are higher.
- One broker's price feed; other brokers differ by a few cents.
atr_14is a simple 14-bar average of the true range.- Gold's 2018-2025 uptrend means "always buy" was profitable (+0.022 R per trade after costs); compare models against that baseline.
Expected model performance
On 2018-2025, always-buy wins 45.0% of trades and always-no-trade scores 42.0% 3-class accuracy. A realistic good model reaches 47-52% win rate on the trades it takes. Accuracy above about 60% usually means lookahead.
License
See LICENSE.md. Mixed sources: check each provider's terms before public or commercial use.
Not financial advice.
- Downloads last month
- 74