Datasets:
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 2 new columns ({'symbol', 'sector'}) and 6 missing columns ({'low', 'open', 'volume', 'close', 'date', 'high'}).
This happened while the csv dataset builder was generating data using
hf://datasets/tharu-jwd/cse-market-data/sector_mapping.csv (at revision 669594502b85772c7b7c853067afde91402e3c2a), ['hf://datasets/tharu-jwd/cse-market-data@669594502b85772c7b7c853067afde91402e3c2a/aspi.csv', 'hf://datasets/tharu-jwd/cse-market-data@669594502b85772c7b7c853067afde91402e3c2a/sector_mapping.csv', 'hf://datasets/tharu-jwd/cse-market-data@669594502b85772c7b7c853067afde91402e3c2a/stock_prices.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 1837, 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 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
symbol: string
sector: string
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 503
to
{'date': Value('string'), 'open': Value('float64'), 'high': Value('float64'), 'low': Value('float64'), 'close': Value('float64'), 'volume': Value('float64')}
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 1683, 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 1839, 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 2 new columns ({'symbol', 'sector'}) and 6 missing columns ({'low', 'open', 'volume', 'close', 'date', 'high'}).
This happened while the csv dataset builder was generating data using
hf://datasets/tharu-jwd/cse-market-data/sector_mapping.csv (at revision 669594502b85772c7b7c853067afde91402e3c2a), ['hf://datasets/tharu-jwd/cse-market-data@669594502b85772c7b7c853067afde91402e3c2a/aspi.csv', 'hf://datasets/tharu-jwd/cse-market-data@669594502b85772c7b7c853067afde91402e3c2a/sector_mapping.csv', 'hf://datasets/tharu-jwd/cse-market-data@669594502b85772c7b7c853067afde91402e3c2a/stock_prices.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.
date string | open float64 | high float64 | low float64 | close float64 | volume null |
|---|---|---|---|---|---|
2025-02-03 | 17,122.73 | 17,127.65 | 16,900.36 | 16,956.49 | null |
2025-02-05 | 16,956.49 | 16,974.58 | 16,440.74 | 16,456.1 | null |
2025-02-06 | 16,456.1 | 16,675.8 | 16,295.31 | 16,506.73 | null |
2025-02-07 | 16,506.73 | 16,746.78 | 16,506.38 | 16,734.68 | null |
2025-02-10 | 16,734.68 | 16,794.64 | 16,537.98 | 16,566.27 | null |
2025-02-11 | 16,566.27 | 16,579.41 | 16,304.99 | 16,345.3 | null |
2025-02-13 | 16,345.3 | 16,609.84 | 16,307.98 | 16,578.22 | null |
2025-02-14 | 16,578.22 | 16,950.91 | 16,577.77 | 16,936.69 | null |
2025-02-17 | 16,936.69 | 17,194.34 | 16,936.11 | 17,156.05 | null |
2025-02-18 | 17,156.05 | 17,322.14 | 17,152.98 | 17,193.79 | null |
2025-02-19 | 17,193.79 | 17,262.88 | 17,059 | 17,074.02 | null |
2025-02-20 | 17,074.02 | 17,085.39 | 16,829.19 | 16,858.97 | null |
2025-02-21 | 16,858.97 | 17,002.45 | 16,847.27 | 16,889.31 | null |
2025-02-24 | 16,889.31 | 16,906.84 | 16,648.38 | 16,671.73 | null |
2025-02-25 | 16,671.72 | 16,691.06 | 16,338.96 | 16,345.01 | null |
2025-02-27 | 16,345.01 | 16,483.22 | 16,321.35 | 16,430.77 | null |
2025-02-28 | 16,430.77 | 16,560.53 | 16,430.6 | 16,478.67 | null |
2025-03-03 | 16,478.68 | 16,545.59 | 16,163.26 | 16,167.3 | null |
2025-03-04 | 16,167.3 | 16,178.38 | 15,870.25 | 15,870.25 | null |
2025-03-05 | 15,870.25 | 16,190.51 | 15,866.18 | 16,166.53 | null |
2025-03-06 | 16,166.53 | 16,309.61 | 16,107.83 | 16,123.1 | null |
2025-03-07 | 16,123.1 | 16,154.3 | 16,080.87 | 16,115.47 | null |
2025-03-10 | 16,115.47 | 16,170.83 | 15,990.76 | 16,000.78 | null |
2025-03-11 | 16,000.78 | 16,003.62 | 15,710.57 | 15,710.57 | null |
2025-03-12 | 15,710.58 | 15,910.63 | 15,629.09 | 15,861.14 | null |
2025-03-14 | 15,861.14 | 16,029.29 | 15,852.97 | 15,860.44 | null |
2025-03-17 | 15,860.44 | 15,905.98 | 15,646.12 | 15,649.3 | null |
2025-03-18 | 15,649.3 | 15,649.3 | 15,386.92 | 15,394.16 | null |
2025-03-19 | 15,394.16 | 15,510.29 | 15,391.75 | 15,406.16 | null |
2025-03-20 | 15,406.16 | 15,693.15 | 15,404.45 | 15,662.93 | null |
2025-03-21 | 15,662.93 | 15,909.59 | 15,659.93 | 15,879.33 | null |
2025-03-24 | 15,879.33 | 15,996.93 | 15,846.3 | 15,912.61 | null |
2025-03-25 | 15,912.61 | 15,979.78 | 15,901.31 | 15,908.23 | null |
2025-03-26 | 15,908.23 | 15,959.99 | 15,842.17 | 15,847.8 | null |
2025-03-27 | 15,847.8 | 15,892.75 | 15,847.64 | 15,882.06 | null |
2025-03-28 | 15,882.06 | 15,886.19 | 15,798.35 | 15,814.82 | null |
2025-04-01 | 15,814.8 | 15,949.72 | 15,696.44 | 15,934.38 | null |
2025-04-02 | 15,934.38 | 16,047.53 | 15,934.15 | 16,007.44 | null |
2025-04-03 | 16,007.44 | 16,007.44 | 15,644.61 | 15,657.6 | null |
2025-04-04 | 15,657.6 | 15,657.6 | 15,280.47 | 15,373.35 | null |
2025-04-07 | 15,373.35 | 15,373.61 | 14,570.34 | 14,660.45 | null |
2025-04-08 | 14,660.45 | 15,148.22 | 14,660.45 | 15,127.71 | null |
2025-04-09 | 15,127.71 | 15,127.71 | 14,836.09 | 14,875.95 | null |
2025-04-10 | 14,875.95 | 15,799.22 | 14,875.95 | 15,580.83 | null |
2025-04-11 | 15,580.83 | 15,586.64 | 15,446.18 | 15,526.2 | null |
2025-04-16 | 15,526.2 | 15,646.47 | 15,525.35 | 15,625.88 | null |
2025-04-17 | 15,625.88 | 15,668.96 | 15,567.57 | 15,616.57 | null |
2025-04-21 | 15,616.57 | 15,702.23 | 15,595.29 | 15,599.61 | null |
2025-04-22 | 15,599.61 | 15,633.54 | 15,524.3 | 15,555.86 | null |
2025-04-23 | 15,555.86 | 15,614.25 | 15,543.42 | 15,543.99 | null |
2025-04-24 | 15,543.99 | 15,621.75 | 15,543.91 | 15,615.63 | null |
2025-04-25 | 15,615.63 | 15,770.76 | 15,614.59 | 15,742.04 | null |
2025-04-28 | 15,742.04 | 15,867.99 | 15,741.77 | 15,811.47 | null |
2025-04-29 | 15,811.47 | 15,923.95 | 15,809.75 | 15,867.34 | null |
2025-04-30 | 15,867.34 | 15,873.32 | 15,799.53 | 15,799.94 | null |
2025-05-02 | 15,799.94 | 15,872.32 | 15,796.82 | 15,851.74 | null |
2025-05-05 | 15,851.74 | 15,945.61 | 15,851.74 | 15,916.69 | null |
2025-05-06 | 15,916.69 | 15,985.46 | 15,916.69 | 15,961.59 | null |
2025-05-07 | 15,961.59 | 15,965.59 | 15,833.11 | 15,841.6 | null |
2025-05-08 | 15,841.6 | 15,925.92 | 15,838.36 | 15,925.92 | null |
2025-05-09 | 15,925.92 | 16,005.67 | 15,902.87 | 15,916.17 | null |
2025-05-14 | 15,916.17 | 16,188.91 | 15,916.17 | 16,131.24 | null |
2025-05-15 | 16,131.24 | 16,340.73 | 16,129.45 | 16,314.79 | null |
2025-05-16 | 16,314.79 | 16,417.17 | 16,314.1 | 16,379.39 | null |
2025-05-19 | 16,379.39 | 16,472.66 | 16,379.39 | 16,397.68 | null |
2025-05-20 | 16,397.68 | 16,429.61 | 16,316.4 | 16,336.25 | null |
2025-05-21 | 16,336.25 | 16,368.62 | 16,328.51 | 16,355.91 | null |
2025-05-22 | 16,355.91 | 16,505.13 | 16,355.91 | 16,473.37 | null |
2025-05-23 | 16,473.37 | 16,551.81 | 16,473.37 | 16,494.46 | null |
2025-05-26 | 16,494.46 | 16,556.86 | 16,486.77 | 16,496.24 | null |
2025-05-27 | 16,496.24 | 16,694.38 | 16,496.19 | 16,657.63 | null |
2025-05-28 | 16,657.63 | 16,728.13 | 16,610.62 | 16,712.87 | null |
2025-05-29 | 16,712.87 | 16,855.6 | 16,712.16 | 16,815.6 | null |
2025-05-30 | 16,815.6 | 16,879.37 | 16,798.37 | 16,854.86 | null |
2025-06-02 | 16,854.86 | 17,008.95 | 16,854.22 | 16,979.89 | null |
2025-06-03 | 16,979.89 | 17,256.73 | 16,979.32 | 17,214.39 | null |
2025-06-04 | 17,214.39 | 17,414.55 | 17,214.39 | 17,353.05 | null |
2025-06-05 | 17,353.05 | 17,455.24 | 17,299 | 17,434.94 | null |
2025-06-06 | 17,434.94 | 17,526.56 | 17,380.82 | 17,394.45 | null |
2025-06-09 | 17,394.45 | 17,514.95 | 17,332.97 | 17,500.24 | null |
2025-06-11 | 17,500.24 | 17,672.13 | 17,499.23 | 17,657.6 | null |
2025-06-12 | 17,657.6 | 17,711.77 | 17,559.8 | 17,661.45 | null |
2025-06-13 | 17,661.45 | 17,661.45 | 17,344.06 | 17,427.08 | null |
2025-06-16 | 17,427.08 | 17,427.08 | 17,048.66 | 17,360.19 | null |
2025-06-17 | 17,360.19 | 17,527.17 | 17,266.38 | 17,281.95 | null |
2025-06-18 | 17,281.95 | 17,307.61 | 17,041.34 | 17,071.44 | null |
2025-06-19 | 17,071.44 | 17,105.26 | 16,809.4 | 16,818.21 | null |
2025-06-20 | 16,818.21 | 17,114.85 | 16,817.56 | 17,087.95 | null |
2025-06-23 | 17,087.95 | 17,087.95 | 16,741.43 | 16,765.4 | null |
2025-06-24 | 16,765.4 | 17,318.09 | 16,765.4 | 17,191.2 | null |
2025-06-25 | 17,191.2 | 17,539.28 | 17,191.2 | 17,535.62 | null |
2025-06-26 | 17,535.62 | 17,767.2 | 17,535.62 | 17,740.46 | null |
2025-06-27 | 17,740.46 | 17,883.88 | 17,735.56 | 17,872.74 | null |
2025-06-30 | 17,872.74 | 18,040.28 | 17,872.74 | 18,026.72 | null |
2025-07-01 | 18,026.72 | 18,057.82 | 17,957.37 | 17,996.73 | null |
2025-07-02 | 17,996.73 | 18,144.1 | 17,996.53 | 18,141.79 | null |
2025-07-03 | 18,141.79 | 18,229.34 | 18,100.92 | 18,100.92 | null |
2025-07-04 | 18,100.92 | 18,179.44 | 17,974.25 | 18,148.34 | null |
2025-07-07 | 18,148.34 | 18,160.98 | 18,038.87 | 18,042.2 | null |
2025-07-08 | 18,042.2 | 18,063.23 | 17,882.89 | 18,032.12 | null |
CSE Market Data — Cyclone Ditwah Event Study
Dataset accompanying the paper:
Market Reactions to Natural Disasters: An Event Study of Cyclone Ditwah's Impact on the Colombo Stock Exchange Jayawardana K.P.T., Wickramaratne W.P.G.A., Wijesinghe D.S., Fernando W.T.D., Dinapura H.H.S. Department of Computer Science & Engineering, University of Moratuwa, Sri Lanka (2026)
Code and analysis notebooks: github.com/dehanf/Disaster-Shock-Market-Response
Dataset Description
Daily OHLCV (Open, High, Low, Close, Volume) records for CSE-listed stocks spanning February 2025 to February 2026, centred on the landfall of Cyclone Ditwah on 28 November 2025. The cyclone caused an estimated USD 4.1 billion in damage (~4% of Sri Lanka's GDP) and triggered the CSE's worst weekly decline since November 2022.
The dataset covers the full data pipeline from raw collection through to final filtered data used in the event study.
Files
| File | Description |
|---|---|
stock_prices.csv |
Raw daily OHLCV for 289 CSE-listed stocks, Feb 2025 – Feb 2026 (71,044 rows) |
aspi.csv |
Daily ASPI (All Share Price Index) OHLCV — market benchmark |
sector_mapping.csv |
Ticker-to-sector mapping for CSE stocks across 19 sectors |
pipeline/collect.py |
Python web-scraping script used to collect the raw data |
pipeline/company_mapping.json |
Company name to ticker mapping used during collection |
pipeline/sample/stock_prices.csv |
Sample output from the collection pipeline |
pipeline/sample/aspi.csv |
Sample ASPI output from the collection pipeline |
Data Fields
stock_prices.csv / sample/stock_prices.csv
| Field | Type | Description |
|---|---|---|
symbol |
string | CSE ticker symbol (e.g. JKH.N0000) |
date |
date | Trading date |
open |
float | Opening price (LKR) |
high |
float | Daily high price (LKR) |
low |
float | Daily low price (LKR) |
close |
float | Closing price (LKR) |
volume |
int | Number of shares traded |
sector_mapping.csv
| Field | Type | Description |
|---|---|---|
ticker |
string | Short ticker (e.g. JKH) |
sector |
string | CSE sector (e.g. Diversified Financials) |
Event Details
- Event: Cyclone Ditwah landfall, eastern Sri Lanka
- Event date: 28 November 2025
- Estimation window: [−120, −6] trading days relative to event
- Event windows studied: [−5,−1], [0,0], [0,+5], [−5,+30]
- Stocks in final analysis: 203 (after cleaning and liquidity filtering)
- Sectors: 19 CSE sectors
Collection Method
Data were collected via a custom Python web-scraping pipeline querying the CSE's public data interface. See pipeline/collect.py for the full collection script.
License
This dataset is released under CC BY 4.0. You are free to use, share, and adapt it with attribution.
Citation
@misc{jayawardana2026cyclone,
title={Market Reactions to Natural Disasters: An Event Study of Cyclone Ditwah's Impact on the Colombo Stock Exchange},
author={Jayawardana, K.P.T. and Wickramaratne, W.P.G.A. and Wijesinghe, D.S. and Fernando, W.T.D. and Dinapura, H.H.S.},
year={2026},
institution={Department of Computer Science & Engineering, University of Moratuwa}
}
- Downloads last month
- 47