| --- |
| license: cc-by-4.0 |
| tags: |
| - forex |
| - finance |
| - ohlcv |
| - historical-data |
| - dukascopy |
| --- |
| |
| # Forex Historical Data |
|
|
| Historical OHLCV+Volume data for 30 forex instruments sourced from DukasCopy tick data via [forexsb.com](https://forexsb.com/historical-forex-data). |
|
|
| ## Data Coverage |
|
|
| - **30 instruments** across majors, crosses, and commodities |
| - **7 timeframes**: M1, M5, M15, M30, H1, H4, D1 |
| - **210 Parquet files** total |
| - **Data source**: DukasCopy real tick data compiled into bar data |
| - **Timezone**: UTC |
|
|
| ## Instruments (30 total) |
|
|
| ### Major Pairs |
| EURUSD, GBPUSD, USDJPY, USDCHF, AUDUSD, NZDUSD, USDCAD |
|
|
| ### Cross Pairs |
| EURJPY, EURGBP, EURAUD, EURNZD, EURCHF, EURCAD, |
| GBPJPY, GBPAUD, GBPNZD, GBPCHF, GBPCAD, |
| AUDJPY, AUDNZD, AUDCHF, AUDCAD, |
| NZDJPY, CHFJPY, CADJPY, CADCHF, |
| NZDCAD, NZDCHF |
|
|
| ### Commodities |
| XAUUSD (Gold), XAGUSD (Silver) |
|
|
| ## File Structure |
|
|
| ``` |
| {symbol}/{SYMBOL}_{TIMEFRAME}.parquet |
| ``` |
|
|
| Example: `EURUSD/EURUSD_M1.parquet` |
|
|
| ## Columns |
|
|
| | Column | Type | Description | |
| |--------|------|-------------| |
| | Time | timestamp[ns, tz=UTC] | Bar open time | |
| | Open | float64 | Open price | |
| | High | float64 | High price | |
| | Low | float64 | Low price | |
| | Close | float64 | Close price | |
| | Volume | int64 | Tick volume | |
| | timestamp_ms | int64 | Unix timestamp in milliseconds | |
| |
| ## Timeframe Ranges |
| |
| - **M1**: ~200,000 bars (~6 months) |
| - **M5**: ~200,000 bars (~2.5 years) |
| - **M15**: ~200,000 bars (~7 years) |
| - **M30**: ~200,000 bars (~14 years) |
| - **H1**: ~100,000 bars (derived from M30) |
| - **H4**: ~25,000 bars (derived from M30) |
| - **D1**: ~5,000 bars (derived from M30) |
| |
| ## Usage |
| |
| ```python |
| from datasets import load_dataset |
|
|
| # Load a specific symbol/timeframe |
| dataset = load_dataset("Yllvar/fx-historical-data", data_files="EURUSD/EURUSD_M1.parquet") |
| |
| # Load all EURUSD data |
| dataset = load_dataset("Yllvar/fx-historical-data", data_files="EURUSD/*.parquet") |
| ``` |
| |
| ## Source |
| |
| Data collected from DukasCopy tick data and compiled by [Forex Software Ltd](https://forexsb.com). |
| |