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 ({'total_loss_usd'}) and 1 missing columns ({'occurrences'}).
This happened while the csv dataset builder was generating data using
hf://datasets/tekkick/xauusd-losing-streaks/worst_streaks_by_usd.csv (at revision 7894dc60c3acf3a42d0fb8fdf01ad8dd374a28bc), ['hf://datasets/tekkick/xauusd-losing-streaks@7894dc60c3acf3a42d0fb8fdf01ad8dd374a28bc/streak_length_counts.csv', 'hf://datasets/tekkick/xauusd-losing-streaks@7894dc60c3acf3a42d0fb8fdf01ad8dd374a28bc/worst_streaks_by_usd.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
streak_length_days: int64
total_loss_usd: double
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 539
to
{'streak_length_days': Value('int64'), 'occurrences': 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 ({'total_loss_usd'}) and 1 missing columns ({'occurrences'}).
This happened while the csv dataset builder was generating data using
hf://datasets/tekkick/xauusd-losing-streaks/worst_streaks_by_usd.csv (at revision 7894dc60c3acf3a42d0fb8fdf01ad8dd374a28bc), ['hf://datasets/tekkick/xauusd-losing-streaks@7894dc60c3acf3a42d0fb8fdf01ad8dd374a28bc/streak_length_counts.csv', 'hf://datasets/tekkick/xauusd-losing-streaks@7894dc60c3acf3a42d0fb8fdf01ad8dd374a28bc/worst_streaks_by_usd.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.
streak_length_days int64 | occurrences int64 |
|---|---|
1 | 31 |
2 | 16 |
3 | 7 |
4 | 5 |
5 | 1 |
9 | 1 |
9 | null |
3 | null |
4 | null |
1 | null |
2 | null |
XAUUSD Losing Streaks (2025-2026)
How long consecutive losing days actually run on gold, and what they cost, measured across 257 full trading sessions.
What this measures
Consecutive down-day runs on XAUUSD: how many occurred, how long each ran, and the total loss in USD attributable to each run. Down days are counted on the session close in broker server time.
Headline finding
61 separate losing streaks occurred in 257 sessions. The longest ran 9 days and cost $755.70. The worst three-day run cost $738.84, almost exactly as much in a third of the time, so a drawdown limit is met by the size of the move rather than by the duration of the run.
Method
70,952 five-minute bars aggregated to server days, 2025-07-31 to 2026-08-04. 257 sessions used, 56 partial sessions dropped.
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
streak_length_counts.csv— how many streaks of each length occurredworst_streaks_by_usd.csv— the five most expensive streaks and their durations
Full write-up
The complete analysis, including the charts and the caveats, is published at https://techkick.me/research/xauusd-losing-streaks.
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
- 39