Downloads · 30 days
0
JonusNattapong/xauusd-scalping-models
xauusd-scalping-models is a machine learning model from JonusNattapong. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
license: mit tags: - trading - finance - forex - xauusd - gold - scalping - machine-learning - deep-learning - lstm - transformer - xgboost - ensemble - quantitative-finance - algorithmic-trading datasets: - ZombitX64…
Downloads · 30 days
0
Access
Public
Updated Oct 22, 2025
Repo size
3.2 MB
Likes
20
Public
Click a slice to open those files.
.pt712 KB · 38%
From the Hugging Face model README
A professional XAU/USD scalping system that combines rule-based moving average crossover signals with advanced backtesting and live trading capabilities. Achieves consistent monthly profits through trend-following scalping with robust risk management.
Optimal Configuration (2022-2025 Forward Test):
Risk Metrics:
git clone https://github.com/yourusername/xauusd-scalping-ai.git
cd xauusd-scalping-ai
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your API keys and trading credentials
from huggingface_hub import hf_hub_download
import joblib
# Download models
models = ['entry_clf.joblib', 'lstm.pt', 'transformer.pt', 'xgb.model', 'meta.joblib']
for model in models:
hf_hub_download(repo_id="JonusNattapong/xauusd-scalping-models",
filename=model,
local_dir="./models")
Run comprehensive backtests with different parameter combinations:
# Grid search optimization
python scripts/forward_hybrid_2024_2025.py
# Small capital testing ($100-$1,000)
python scripts/backtest_small_capital.py
# Custom backtest
python scripts/run_backtests.py
Train new models on updated data:
# Advanced training with hyperparameter tuning
python scripts/advanced_train.py
# Basic training
python src/train.py
⚠️ WARNING: Live trading involves real financial risk. Start with small positions.
Setup MT5:
.envStart live trading:
python scripts/live_trading.py
Features:
# Generate performance plots
python scripts/generate_plots.py
# Compute detailed metrics
python scripts/compute_metrics.py
# Test data integrity
python scripts/test_data.py
├── data/ # Historical price data
│ ├── XAU_1h_data.jsonl # Primary 1-hour data
│ └── *.jsonl # Multi-timeframe data
├── models/ # Pre-trained models
│ ├── entry_clf.joblib # Entry signal classifier
│ ├── lstm.pt # LSTM model
│ ├── transformer.pt # Transformer model
│ ├── xgb.model # XGBoost model
│ └── meta.joblib # Meta-model
├── output/ # Backtest results & analysis
│ ├── forward_hybrid_summary_*.csv
│ ├── best_trades.csv
│ └── *.npy # Forward test arrays
├── scripts/ # Executable scripts
│ ├── live_trading.py # MT5 live trading
│ ├── forward_hybrid_*.py # Backtesting
│ ├── generate_plots.py # Visualization
│ └── *.py # Analysis tools
├── src/ # Core source code
│ ├── backtest.py # Advanced backtest engine
│ ├── data_loader.py # Data loading utilities
│ ├── features.py # Feature engineering
│ ├── models.py # Model definitions
│ └── utils.py # Helper functions
├── tests/ # Unit tests
├── white_paper.pdf # Comprehensive documentation
├── requirements.txt # Python dependencies
├── .env # Environment variables
└── README.md # This file
# Hugging Face
HF_TOKEN=your_hf_token
# Trading APIs
EXNESS_API_KEY=your_api_key
EXNESS_SERVER_API=Exness-MT5Trial
EXNESS_PASSWORD_API=your_password
# Data APIs
FINNHUB_API_KEY=your_key
GOLDAPI_KEY=your_key
ALPHA_VANTAGE_KEY=your_key
TWELVE_DATA_KEY=your_key
# Notifications
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
# Paths
DATA_PATH=data/
MODEL_PATH=models/
Key parameters in src/backtest.py:
ENTRY_THRESH: Signal confidence thresholdSTOP_LOSS: Stop loss in pointsTAKE_PROFIT: Take profit in pointsPOSITION_SIZE: Capital allocation percentageDownload from: https://huggingface.co/JonusNattapong/xauusd-scalping-models
Run the test suite:
python -m pytest tests/
Or run smoke tests:
python scripts/smoke_test.py
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
This software is for educational and research purposes only. Trading cryptocurrencies and forex involves substantial risk of loss and is not suitable for every investor. Past performance does not guarantee future results. Please trade responsibly and never risk more than you can afford to lose.
Happy Trading! 🚀📈