thecharttruth commited on
Commit
fec42f1
·
verified ·
1 Parent(s): 1112786

Publish ETF dataset

Browse files
README.md CHANGED
@@ -2,73 +2,160 @@
2
  license: other
3
  language:
4
  - en
5
- pretty_name: ETF Data
6
  tags:
7
  - finance
8
  - etf
9
  - portfolio-optimization
10
  - skfolio
 
11
  - parquet
12
  - education
 
 
 
13
  ---
14
 
15
- # ETF Data
16
 
17
- This dataset provides cleaned, table-shaped ETF data for educational portfolio-analysis workflows, especially notebooks that teach diversification, liquidity, return transformation, correlation, drawdowns, and skfolio-based portfolio construction.
18
 
19
- ## Independence
20
 
21
- This dataset is independent educational material. It is not endorsed by, sponsored by, or affiliated with any broker, ETF issuer, index provider, exchange, or data provider.
22
 
23
- ## Access and Updates
 
 
 
 
 
24
 
25
- This dataset is currently provided free for educational and research use. While it is free, the maintainer may publish periodic updates derived from a maintained data pipeline.
26
 
27
- The maintainer may stop updating this free dataset at a later, unspecified date. Future updates, expanded files, or premium versions may be offered through a paid or gated distribution channel.
28
 
29
- Existing public files may remain available, but continued free updates are not guaranteed.
30
-
31
- ## Community Data Suggestions
 
32
 
33
- Learners and researchers may suggest additional ETF fields, derived columns, or documentation improvements for future versions of this dataset. Suggestions are welcome, but there is no guarantee that a requested field will be added.
34
 
35
- Requests will be considered based on educational value, licensing and redistribution limits, privacy, data quality, maintainability, and whether the field fits the cleaned teaching-data scope. Raw provider responses, account-specific information, balances, holdings, transactions, orders, and API credentials will not be published.
 
 
 
 
36
 
37
- ## Files
 
 
 
 
 
38
 
39
- - `etf_daily_prices.parquet`: canonical daily ETF price and volume table.
40
- - `instrument_metadata.parquet`: symbol metadata and tradeability fields.
41
- - `etf_liquidity_365d.parquet`: 365-day average volume and dollar-volume liquidity ranking.
42
- - `manifest.json`: row counts and transformation summary.
43
 
44
- The dataset intentionally does not include raw API responses, account data, balances, holdings, transactions, orders, or API keys.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  ## Intended Use
47
 
48
- This dataset is meant for education, research, and reproducible examples. A teaching notebook can load prices, then convert them to returns as part of the lesson:
49
 
50
- ```python
51
- import pandas as pd
52
- from skfolio.preprocessing import prices_to_returns
 
53
 
54
- BASE = "https://huggingface.co/datasets/thecharttruth/etf-data/resolve/main"
55
 
56
- prices_long = pd.read_parquet(f"{BASE}/etf_daily_prices.parquet")
57
- prices = prices_long.pivot(index="date", columns="symbol", values="close").sort_index()
58
- returns = prices_to_returns(prices)
59
- ```
 
 
 
 
 
 
 
60
 
61
- ## Data Shape
62
 
63
- Current initial processed layer:
64
 
65
- - ETF price rows: 117,864
66
- - ETF symbols: 95
67
- - Date range: 2021-05-12 to 2026-05-12
68
- - Liquidity rows: 95
69
 
70
- ## Important Notices
71
 
72
- This dataset is not financial, investment, tax, or legal advice. It is not a recommendation to buy, sell, or hold any security. Data may contain errors, omissions, stale values, adjusted values, vendor quirks, or transformation mistakes. Users are responsible for validating data before relying on it.
 
 
 
 
73
 
74
  Redistribution, resale, and commercial use are not permitted without written permission from the maintainer and any applicable upstream rights holders.
 
 
 
 
 
2
  license: other
3
  language:
4
  - en
5
+ pretty_name: skfolio Masterclass ETF Teaching Data
6
  tags:
7
  - finance
8
  - etf
9
  - portfolio-optimization
10
  - skfolio
11
+ - time-series
12
  - parquet
13
  - education
14
+ - google-colab
15
+ size_categories:
16
+ - 100K<n<1M
17
  ---
18
 
19
+ # skfolio Masterclass ETF Teaching Data
20
 
21
+ This dataset provides cleaned ETF price, metadata, and liquidity tables for educational portfolio-research notebooks, especially the **skfolio Masterclass by The Chart Truth**.
22
 
23
+ The goal is to give learners a public, no-login data source that can be loaded in Google Colab and transformed into the return matrices used by skfolio portfolio workflows. It is designed for teaching diversification, liquidity screening, price-to-return transformation, risk, correlation, drawdowns, and allocation research.
24
 
25
+ ## What Is Included
26
 
27
+ | File | Rows | What it contains | Main teaching use |
28
+ |---|---:|---|---|
29
+ | `etf_daily_prices.parquet` | 117,864 | Daily ETF OHLCV-style price and volume records for 95 ETF symbols | Raw market history used to teach price checks and return conversion |
30
+ | `instrument_metadata.parquet` | 98 | Symbol-level metadata and trading-status fields | Universe inspection, labeling, and practical data-quality checks |
31
+ | `etf_liquidity_365d.parquet` | 95 | Average and median volume and dollar-volume rankings | Liquidity screening and realistic universe design |
32
+ | `manifest.json` | 1 | Public snapshot metadata and row counts | Lightweight audit trail for notebooks and examples |
33
 
34
+ The dataset intentionally does **not** include raw API responses, account data, balances, holdings, transactions, orders, credentials, or trading instructions.
35
 
36
+ ## Quick Start
37
 
38
+ ```python
39
+ import pandas as pd
40
+ from huggingface_hub import hf_hub_download
41
+ from skfolio.preprocessing import prices_to_returns
42
 
43
+ repo_id = "thecharttruth/etf-data"
44
 
45
+ prices_path = hf_hub_download(
46
+ repo_id=repo_id,
47
+ repo_type="dataset",
48
+ filename="etf_daily_prices.parquet",
49
+ )
50
 
51
+ prices_long = pd.read_parquet(prices_path)
52
+ prices_wide = (
53
+ prices_long
54
+ .pivot(index="date", columns="symbol", values="close")
55
+ .sort_index()
56
+ )
57
 
58
+ returns = prices_to_returns(prices_wide)
59
+ ```
 
 
60
 
61
+ No Hugging Face token is required for the public dataset.
62
+
63
+ ## Current Snapshot
64
+
65
+ | Item | Value |
66
+ |---|---:|
67
+ | ETF symbols with price history | 95 |
68
+ | Price rows | 117,864 |
69
+ | Metadata rows | 98 |
70
+ | Liquidity rows | 95 |
71
+ | Date range | 2021-05-12 to 2026-05-12 |
72
+ | Default file format | Parquet |
73
+
74
+ The metadata table can contain symbols that are not present in the current price table. That is useful for teaching real-world data checks: not every instrument discovered by a data source is automatically suitable for a clean portfolio universe.
75
+
76
+ ## Table Schemas
77
+
78
+ ### `etf_daily_prices.parquet`
79
+
80
+ | Column | Meaning |
81
+ |---|---|
82
+ | `date` | Trading date used for analysis and pivoting |
83
+ | `timestamp` | Source timestamp value |
84
+ | `symbol` | ETF ticker symbol |
85
+ | `asset_type` | Asset label, currently `ETF` for this file |
86
+ | `period` | Source period used by the collector |
87
+ | `source_run` | Public run label for traceability |
88
+ | `open`, `high`, `low`, `close` | Daily price fields |
89
+ | `value` | Source value field when provided |
90
+ | `volume` | Daily volume |
91
+ | `gain_amount`, `gain_percentage` | Source-provided daily change fields |
92
+
93
+ ### `instrument_metadata.parquet`
94
+
95
+ | Column | Meaning |
96
+ |---|---|
97
+ | `symbol` | Instrument ticker symbol |
98
+ | `asset_type` | Asset label |
99
+ | `name`, `type`, `exchange`, `exchange_name` | Descriptive fields from the source |
100
+ | `trading` | Trading-status field from the source |
101
+ | `fractional_trading` | Fractional-trading status field from the source, when available |
102
+ | `option_trading`, `option_spread_trading`, `shorting_availability` | Instrument capability fields from the source |
103
+ | `source_run` | Public run label for traceability |
104
+
105
+ Some descriptive metadata fields may be blank. Treat metadata as a practical teaching aid, not as a complete security master.
106
+
107
+ ### `etf_liquidity_365d.parquet`
108
+
109
+ | Column | Meaning |
110
+ |---|---|
111
+ | `rank_avg_daily_volume` | Rank by average daily share volume |
112
+ | `rank_avg_daily_dollar_volume` | Rank by average daily dollar volume |
113
+ | `symbol` | ETF ticker symbol |
114
+ | `avg_daily_volume`, `median_daily_volume` | Share-volume liquidity estimates |
115
+ | `avg_daily_dollar_volume`, `median_daily_dollar_volume` | Dollar-volume liquidity estimates |
116
+ | `latest_volume`, `latest_close`, `latest_date` | Most recent values in the lookback window |
117
+ | `lookback_bars`, `lookback_days` | Liquidity lookback settings |
118
+ | `history_bars`, `history_start`, `history_end` | Available history summary |
119
 
120
  ## Intended Use
121
 
122
+ This dataset is meant for:
123
 
124
+ - educational notebooks
125
+ - reproducible portfolio-research examples
126
+ - skfolio tutorials and demonstrations
127
+ - learning how to inspect, reshape, and validate market data before optimization
128
 
129
+ The recommended teaching flow is:
130
 
131
+ 1. Load the long price table.
132
+ 2. Validate symbols, dates, duplicates, and missing values.
133
+ 3. Pivot prices into a date-by-symbol matrix.
134
+ 4. Convert prices to linear returns.
135
+ 5. Use returns for risk, correlation, optimization, and validation.
136
+
137
+ ## Limitations
138
+
139
+ This dataset is intentionally compact and teaching-oriented. It may contain errors, omissions, stale values, adjusted values, vendor quirks, transformation mistakes, missing metadata, survivorship bias, or incomplete histories. It is not a complete market database and should not be treated as a live trading feed.
140
+
141
+ The dataset is suitable for learning a research process. It is not suitable as the only source for real-money trading, tax reporting, regulatory reporting, or production investment operations.
142
 
143
+ ## Independence And Responsible Use
144
 
145
+ This dataset is independent educational material. It is not endorsed by, sponsored by, or affiliated with any broker, ETF issuer, index provider, exchange, data provider, Hugging Face, Google Colab, or the skfolio project maintainers.
146
 
147
+ Nothing in this dataset is financial, investment, tax, or legal advice. Nothing here is a recommendation to buy, sell, short, hold, or allocate to any security. Historical data cannot guarantee future results.
 
 
 
148
 
149
+ Users are responsible for validating data quality, confirming rights and licenses, and deciding whether any use is appropriate for their own situation.
150
 
151
+ ## Access, Updates, And License
152
+
153
+ The public files are provided for educational and research use under the custom terms in `LICENSE`.
154
+
155
+ Updates may be published periodically from a maintained data pipeline, but no update cadence is guaranteed. Existing files may remain available even if future refreshes pause or change.
156
 
157
  Redistribution, resale, and commercial use are not permitted without written permission from the maintainer and any applicable upstream rights holders.
158
+
159
+ ## Suggestions
160
+
161
+ Learners and researchers may suggest additional ETF fields, documentation improvements, or derived teaching tables. Suggestions are evaluated based on educational value, licensing and redistribution limits, privacy, data quality, maintainability, and fit with the cleaned teaching-data scope.
etf_daily_prices.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f868ff7bf5ef71e85d0e1c79cd91dc651aa0969f93178cf06e6f4b40498a5977
3
- size 3197114
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b643991d1267d8d15ff244c975e2dbab1364ca2d16d7859d0bb4ce4be8657c6e
3
+ size 3196139
instrument_metadata.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dce7f1cfe0810973eca0f351e683f04c26db86c026f474075c18961276367553
3
  size 8265
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49f9931df03ee413db3360c91cee7ee024a82d1cd4f5e3e756fbf46998950b8b
3
  size 8265
manifest.json CHANGED
@@ -1,9 +1,25 @@
1
  {
2
- "run_dir": "/var/lib/skfolio-etf-data-collector/runs/20260512T172023Z_initial_backfill,/var/lib/skfolio-etf-data-collector/runs/20260512T184432Z_scheduled_daily,/var/lib/skfolio-etf-data-collector/runs/20260512T184834Z_scheduled_daily,/var/lib/skfolio-etf-data-collector/runs/20260512T203007Z_scheduled_daily,/var/lib/skfolio-etf-data-collector/runs/20260513T203004Z_scheduled_daily",
3
- "output_dir": "/var/lib/skfolio-etf-data-collector/processed",
4
- "etf_daily_prices_rows": 117959,
5
- "etf_daily_returns_rows": 117864,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  "etf_metadata_rows": 98,
7
  "etf_liquidity_rows": 95,
8
- "index_daily_prices_rows": 5
9
- }
 
 
 
1
  {
2
+ "dataset_name": "skfolio Masterclass ETF Teaching Data",
3
+ "dataset_repo_id": "thecharttruth/etf-data",
4
+ "processed_at_utc": "2026-05-12T18:48:34Z",
5
+ "source_run_labels": [
6
+ "20260512T172023Z_initial_backfill",
7
+ "20260512T184432Z_scheduled_daily",
8
+ "20260512T184834Z_scheduled_daily"
9
+ ],
10
+ "published_files": [
11
+ "etf_daily_prices.parquet",
12
+ "instrument_metadata.parquet",
13
+ "etf_liquidity_365d.parquet",
14
+ "manifest.json"
15
+ ],
16
+ "mode": "full",
17
+ "update_start_date": null,
18
+ "etf_daily_prices_rows": 117864,
19
+ "etf_daily_returns_rows": 117769,
20
  "etf_metadata_rows": 98,
21
  "etf_liquidity_rows": 95,
22
+ "index_daily_prices_rows": 5,
23
+ "new_etf_daily_price_rows": 117864,
24
+ "new_index_daily_price_rows": 5
25
+ }