The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'episodes_reaching_it'}) and 1 missing columns ({'sessions_below_that_peak'}).
This happened while the csv dataset builder was generating data using
hf://datasets/tekkick/xauusd-trailing-drawdown/episodes_reaching_threshold.csv (at revision a2bf2ef689cae89c8aea3a027dcd51ada183fe34), ['hf://datasets/tekkick/xauusd-trailing-drawdown@a2bf2ef689cae89c8aea3a027dcd51ada183fe34/days_below_peak_by_threshold.csv', 'hf://datasets/tekkick/xauusd-trailing-drawdown@a2bf2ef689cae89c8aea3a027dcd51ada183fe34/episodes_reaching_threshold.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1848, in _prepare_split_single
writer.write_table(table)
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
self._write_table(pa_table, writer_batch_size=writer_batch_size)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
pa_table = table_cast(pa_table, self._schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2378, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2306, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
drawdown_threshold_pct: int64
episodes_reaching_it: int64
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 555
to
{'drawdown_threshold_pct': Value('int64'), 'sessions_below_that_peak': Value('int64')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1694, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1850, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
...<4 lines>...
)
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'episodes_reaching_it'}) and 1 missing columns ({'sessions_below_that_peak'}).
This happened while the csv dataset builder was generating data using
hf://datasets/tekkick/xauusd-trailing-drawdown/episodes_reaching_threshold.csv (at revision a2bf2ef689cae89c8aea3a027dcd51ada183fe34), ['hf://datasets/tekkick/xauusd-trailing-drawdown@a2bf2ef689cae89c8aea3a027dcd51ada183fe34/days_below_peak_by_threshold.csv', 'hf://datasets/tekkick/xauusd-trailing-drawdown@a2bf2ef689cae89c8aea3a027dcd51ada183fe34/episodes_reaching_threshold.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
drawdown_threshold_pct int64 | sessions_below_that_peak int64 |
|---|---|
2 | 197 |
3 | 180 |
4 | 171 |
5 | 161 |
6 | 155 |
8 | 135 |
10 | 113 |
2 | null |
3 | null |
4 | null |
5 | null |
6 | null |
8 | null |
10 | null |
XAUUSD Retracement From Running High (2025-2026)
How much of its time gold spends below its own running peak, and how deep those retracements go. The shape a trailing drawdown rule is actually set against.
What this measures
Peak-to-trough retracement on XAUUSD measured from the running high of the price series, plus how many sessions sat below a given retracement threshold and how many distinct episodes reached each depth.
Headline finding
Gold closed below its own running high on 84.5% of sessions. The median retracement was 9.47% and the deepest was 27.7%. A 5% trailing limit is therefore set against an instrument whose typical retracement is roughly twice that.
Method
70,952 five-minute bars aggregated to server days, 2025-07-31 to 2026-08-04. 258 sessions used, 56 partial sessions dropped. Retracement is measured on the price series itself, not on an account equity curve — an account trading it inherits at least this shape, and usually a worse one.
Source data is a single archive of five-minute XAUUSD bars recorded from a live MetaTrader 5 feed on a raw-spread account. Nothing here is simulated. Sessions that were partially recorded were dropped rather than padded, and the count of dropped sessions is stated above.
Files
days_below_peak_by_threshold.csv— sessions spent below each retracement depthepisodes_reaching_threshold.csv— how many distinct episodes reached each depth
Full write-up
The complete analysis, including the charts and the caveats, is published at https://techkick.me/blog/trailing-drawdown.
Citation
The underlying bar archive is deposited on Zenodo with a permanent identifier.
@dataset{techkick_xauusd,
author = {Tech Kick},
title = {XAUUSD hourly bar archive},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.21973215},
url = {https://doi.org/10.5281/zenodo.21973215}
}
Licensed CC BY 4.0. Reuse commercially, attribute, no permission needed.
- Downloads last month
- 28