dataset_info:
features:
- name: Date
dtype: string
- name: Close
dtype: float64
- name: High
dtype: float64
- name: Low
dtype: float64
- name: Open
dtype: float64
- name: Volume
dtype: float64
- name: volume_adi
dtype: float64
- name: volume_obv
dtype: float64
- name: volume_cmf
dtype: float64
- name: volume_fi
dtype: float64
- name: volume_em
dtype: float64
- name: volume_sma_em
dtype: float64
- name: volume_vpt
dtype: float64
- name: volume_vwap
dtype: float64
- name: volume_mfi
dtype: float64
- name: volume_nvi
dtype: float64
- name: volatility_bbm
dtype: float64
- name: volatility_bbh
dtype: float64
- name: volatility_bbl
dtype: float64
- name: volatility_bbw
dtype: float64
- name: volatility_bbp
dtype: float64
- name: volatility_bbhi
dtype: float64
- name: volatility_bbli
dtype: float64
- name: volatility_kcc
dtype: float64
- name: volatility_kch
dtype: float64
- name: volatility_kcl
dtype: float64
- name: volatility_kcw
dtype: float64
- name: volatility_kcp
dtype: float64
- name: volatility_kchi
dtype: float64
- name: volatility_kcli
dtype: float64
- name: volatility_dcl
dtype: float64
- name: volatility_dch
dtype: float64
- name: volatility_dcm
dtype: float64
- name: volatility_dcw
dtype: float64
- name: volatility_dcp
dtype: float64
- name: volatility_atr
dtype: float64
- name: volatility_ui
dtype: float64
- name: trend_macd
dtype: float64
- name: trend_macd_signal
dtype: float64
- name: trend_macd_diff
dtype: float64
- name: trend_sma_fast
dtype: float64
- name: trend_sma_slow
dtype: float64
- name: trend_ema_fast
dtype: float64
- name: trend_ema_slow
dtype: float64
- name: trend_vortex_ind_pos
dtype: float64
- name: trend_vortex_ind_neg
dtype: float64
- name: trend_vortex_ind_diff
dtype: float64
- name: trend_trix
dtype: float64
- name: trend_mass_index
dtype: float64
- name: trend_dpo
dtype: float64
- name: trend_kst
dtype: float64
- name: trend_kst_sig
dtype: float64
- name: trend_kst_diff
dtype: float64
- name: trend_ichimoku_conv
dtype: float64
- name: trend_ichimoku_base
dtype: float64
- name: trend_ichimoku_a
dtype: float64
- name: trend_ichimoku_b
dtype: float64
- name: trend_stc
dtype: float64
- name: trend_adx
dtype: float64
- name: trend_adx_pos
dtype: float64
- name: trend_adx_neg
dtype: float64
- name: trend_cci
dtype: float64
- name: trend_visual_ichimoku_a
dtype: float64
- name: trend_visual_ichimoku_b
dtype: float64
- name: trend_aroon_up
dtype: float64
- name: trend_aroon_down
dtype: float64
- name: trend_aroon_ind
dtype: float64
- name: trend_psar_up
dtype: float64
- name: trend_psar_down
dtype: float64
- name: trend_psar_up_indicator
dtype: float64
- name: trend_psar_down_indicator
dtype: float64
- name: momentum_rsi
dtype: float64
- name: momentum_stoch_rsi
dtype: float64
- name: momentum_stoch_rsi_k
dtype: float64
- name: momentum_stoch_rsi_d
dtype: float64
- name: momentum_tsi
dtype: float64
- name: momentum_uo
dtype: float64
- name: momentum_stoch
dtype: float64
- name: momentum_stoch_signal
dtype: float64
- name: momentum_wr
dtype: float64
- name: momentum_ao
dtype: float64
- name: momentum_roc
dtype: float64
- name: momentum_ppo
dtype: float64
- name: momentum_ppo_signal
dtype: float64
- name: momentum_ppo_hist
dtype: float64
- name: momentum_pvo
dtype: float64
- name: momentum_pvo_signal
dtype: float64
- name: momentum_pvo_hist
dtype: float64
- name: momentum_kama
dtype: float64
- name: others_dr
dtype: float64
- name: others_dlr
dtype: float64
- name: others_cr
dtype: float64
- name: Price_Change
dtype: float64
- name: Price_Change_5d
dtype: float64
- name: Price_Change_20d
dtype: float64
- name: Volatility_5d
dtype: float64
- name: Volatility_20d
dtype: float64
- name: Volume_Change
dtype: float64
- name: Volume_MA_5
dtype: float64
- name: Volume_MA_20
dtype: float64
- name: Daily_Range
dtype: float64
- name: Daily_Range_Pct
dtype: float64
- name: Gap_Up
dtype: bool
- name: Gap_Down
dtype: bool
- name: ROC_5
dtype: float64
- name: ROC_20
dtype: float64
- name: Rolling_Max_20
dtype: float64
- name: Rolling_Min_20
dtype: float64
- name: DXY
dtype: float64
- name: DXY_Change
dtype: float64
- name: US_10Y_Yield
dtype: float64
- name: US_10Y_Change
dtype: float64
- name: WTI_Oil
dtype: float64
- name: Oil_Change
dtype: float64
- name: Silver
dtype: float64
- name: Gold_Silver_Ratio
dtype: float64
- name: Target_1d
dtype: float64
- name: Target_5d
dtype: float64
- name: Price_Change_1d_Pct
dtype: float64
- name: Price_Change_5d_Pct
dtype: float64
- name: USD_Strength_Change
dtype: float64
- name: Real_Yield_Proxy
dtype: float64
- name: Gold_Oil_Ratio
dtype: float64
- name: Copper_Price
dtype: float64
- name: Gold_Copper_Ratio
dtype: float64
- name: BTC_Price
dtype: float64
- name: Gold_BTC_Ratio
dtype: float64
- name: Close_Lag_1
dtype: float64
- name: Return_Lag_1
dtype: float64
- name: Close_Lag_2
dtype: float64
- name: Return_Lag_2
dtype: float64
- name: Close_Lag_3
dtype: float64
- name: Return_Lag_3
dtype: float64
- name: Close_Lag_5
dtype: float64
- name: Return_Lag_5
dtype: float64
- name: Close_Lag_10
dtype: float64
- name: Return_Lag_10
dtype: float64
- name: Close_Lag_20
dtype: float64
- name: Return_Lag_20
dtype: float64
- name: Rolling_Mean_5
dtype: float64
- name: Rolling_Std_5
dtype: float64
- name: Rolling_Skew_5
dtype: float64
- name: Rolling_Kurt_5
dtype: float64
- name: Rolling_Mean_10
dtype: float64
- name: Rolling_Std_10
dtype: float64
- name: Rolling_Skew_10
dtype: float64
- name: Rolling_Kurt_10
dtype: float64
- name: Rolling_Mean_20
dtype: float64
- name: Rolling_Std_20
dtype: float64
- name: Rolling_Skew_20
dtype: float64
- name: Rolling_Kurt_20
dtype: float64
- name: Rolling_Mean_50
dtype: float64
- name: Rolling_Std_50
dtype: float64
- name: Rolling_Skew_50
dtype: float64
- name: Rolling_Kurt_50
dtype: float64
- name: Momentum_1M
dtype: float64
- name: Momentum_3M
dtype: float64
- name: Momentum_6M
dtype: float64
- name: Realized_Vol_5d
dtype: float64
- name: Realized_Vol_20d
dtype: float64
- name: Volume_MA_Ratio
dtype: float64
- name: Volume_Change_Rate
dtype: float64
- name: Day_of_Week
dtype: float64
- name: Month
dtype: float64
- name: Quarter
dtype: float64
- name: Sin_Day
dtype: float64
- name: Cos_Day
dtype: float64
- name: VaR_95
dtype: float64
- name: VaR_99
dtype: float64
- name: CVaR_95
dtype: float64
- name: Excess_Return
dtype: float64
- name: Rolling_Sharpe
dtype: float64
- name: Max_Drawdown
dtype: float64
splits:
- name: train
num_bytes: 2007880
num_examples: 708
download_size: 2007880
dataset_size: 2007880
XAUUSD Enhanced ML Dataset
Comprehensive machine learning dataset for XAUUSD (Gold vs US Dollar) price prediction with 172 advanced features.
Dataset Description
This dataset contains cleaned and processed XAUUSD price data optimized for machine learning applications. It includes 172 features covering technical indicators, economic variables, statistical measures, and temporal features.
Key Features:
- Time Period: 2023-2025 (708 observations)
- Features: 172 advanced technical and economic indicators
- Data Quality: Cleaned, no missing values, processed for ML
- Target Variables: Binary classification for price direction prediction
- ML Performance: 47.3% directional accuracy with ensemble models
Feature Categories:
Technical Indicators (85+ features):
- Volume Indicators: ADI, OBV, CMF, FI, EM, SMA_EM, VPT, VWAP, MFI, NVI
- Volatility Measures: Bollinger Bands, Keltner Channels, Donchian Channels, ATR, UI
- Trend Indicators: MACD, SMA, EMA, Vortex, TRIX, Mass Index, DPO, KST, Ichimoku, STC, ADX, CCI, Aroon, Parabolic SAR
- Momentum Indicators: RSI, Stochastic RSI, TSI, Ultimate Oscillator, Stochastic, Williams %R, AO, ROC, PPO, PVO, KAMA
- Other: DR, DLR, CR
Economic & Market Data:
- Currency: DXY (US Dollar Index)
- Bonds: US 10Y Treasury Yield
- Commodities: WTI Oil, Silver, Copper, BTC
- Ratios: Gold/Silver, Gold/Oil, Gold/Copper, Gold/BTC
Statistical & Temporal Features:
- Price Changes: 1d, 5d, 20d percentage changes
- Volatility: Rolling volatility (5d, 20d), Realized volatility
- Rolling Statistics: Mean, Std, Skew, Kurtosis (5, 10, 20, 50 periods)
- Lagged Features: Price and return lags (1, 2, 3, 5, 10, 20 days)
- Risk Metrics: VaR (95%, 99%), CVaR, Sharpe ratio, Max drawdown
- Seasonal: Day of week, month, quarter, sine/cosine transformations
Machine Learning Target:
- Binary Classification: Price direction prediction (up/down)
- Directional Accuracy: 47.3% achieved with ensemble models
- Cross-validation: Time series split with expanding window
Usage
Load with Pandas (Recommended):
import pandas as pd
# Load the enhanced ML dataset
df = pd.read_csv("https://huggingface.co/datasets/JonusNattapong/xauusd-dataset/resolve/main/XAUUSD_enhanced_ml_dataset_clean.csv")
print(f"Dataset shape: {df.shape}")
print(f"Features: {len(df.columns)}")
Load with Hugging Face Datasets:
Note: Due to multiple CSV files with different schemas in this repository, the HF datasets library may encounter compatibility issues. Direct CSV loading (above) is recommended for best results.
If you prefer to use the datasets library, you can load the CSV directly:
from datasets import load_dataset
# Load the specific CSV file
dataset = load_dataset('csv', data_files="https://huggingface.co/datasets/JonusNattapong/xauusd-dataset/resolve/main/XAUUSD_enhanced_ml_dataset_clean.csv")
print(dataset['train'].column_names)
print(dataset['train'][0])
Example ML Workflow:
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score
# Load data
df = pd.read_csv("https://huggingface.co/datasets/JonusNattapong/xauusd-dataset/resolve/main/XAUUSD_enhanced_ml_dataset_clean.csv")
# Prepare features and target
feature_cols = [col for col in df.columns if col not in ['Date', 'Target_1d', 'Target_5d']]
X = df[feature_cols]
y = df['Target_1d']
# Split data (time series aware)
split_idx = int(len(df) * 0.8)
X_train, X_test = X[:split_idx], X[split_idx:]
y_train, y_test = y[:split_idx], y[split_idx:]
# Train model
model = RandomForestClassifier(n_estimators=100, random_state=42)
model.fit(X_train, y_train)
# Evaluate
y_pred = model.predict(X_test)
accuracy = accuracy_score(y_test, y_pred)
print(f"Accuracy: {accuracy:.3f}")
Performance Benchmark
The dataset was used to train ensemble models achieving:
- Directional Accuracy: 47.3%
- Top Features: Rolling volatility, momentum indicators, RSI, MACD
- Cross-validation: Time series split with expanding window
Citation
If you use this dataset in your research, please cite:
@misc{{tapachoom2025xauusd,
title={{XAUUSD Enhanced ML Dataset}},
author={{Tapachoom, Nattapong}},
year={{2025}},
publisher={{Hugging Face}},
url={{https://huggingface.co/datasets/JonusNattapong/xauusd-dataset}}
}}
License
This dataset is available under the MIT License for educational and research purposes.