上海期货交易所公告标签与风险参数事件数据库
上海期货交易所公告标签与风险参数事件数据库。项目基于上海期货交易所公开公告,构建可按“调整原因、调整参数、时间、品种/合约”组合查询的SQLite数据库,并提供Excel入口、Python查询工具、参数事件候选和人工复核机制。
Independent research project. This repository is not affiliated with or endorsed by the Shanghai Futures Exchange (SHFE). It does not constitute investment advice.
2000-10-08 to 2026-08-104,9636,473258 adjustment categories plus code 0013 parameter types372, P1 580, P2 748, P3 3,263AU), silver (AG), copper (CU), rebar (RB), fuel oil (FU)The database is not limited to the five priority products. Other SHFE/INE products can also be queried; the five-product list only determines the current manual-review priority.
database/
SHFE_notice_event_database_v2.2.sqlite3
SHFE_notice_query_v2.1.xlsx
five_products_P0_review_queue.csv
docs/
SHFE公告标签与参数事件数据库使用说明_v2.1.docx
scripts/
query_shfe_notices.py
query_shfe_parameter_events.py
upgrade_shfe_notice_db.py
upgrade_notice_event_layer.py
preserve_notice_manual_work.py
data_dictionary/
REASON_CODES.md
PARAMETER_CODES.md
DATABASE_SCHEMA.md
examples/
example_queries.sql
audits/
research_outputs/
2026-09-02_evidence_audit/
2026-09-15_parameter_change_alignment/The original HTML pages, attachments and large archive packages are intentionally excluded from Git history. Versioned full-data packages should be distributed through GitHub Releases.
The folder research_outputs/2026-09-02_evidence_audit adds a transparent research-reporting layer for the EC/SN notice-event study. It contains:
These files distinguish descriptive statistics, event studies, dynamic regressions, robust inference and prediction. Associations and temporal ordering are not presented as causal effects. The database release remains v2.2.0; this research-output update does not replace or delete v2.1/v2.2 history.
The folder research_outputs/2026-09-15_parameter_change_alignment adds a synchronous correspondence layer for source-verified AO/BU margin and price-limit notices.
The full v0.15 SQLite database is about 805 MB and is not committed to ordinary Git history. Review-sized CSV/JSON results and reproducible scripts are published instead. This layer remains descriptive: it does not perform prediction or causal attribution.
database/SHFE_notice_event_database_v2.2.sqlite3.v_notice_query for notice-level search, or parameter_events for event candidates.product_codes, parameter_codes, primary_reason_code or date fields.Example: query fuel-oil price-limit events.
SELECT *
FROM parameter_events
WHERE product_code = 'FU'
AND parameter_code = 'price_limit'
ORDER BY announcement_date DESC;More examples are available in examples/example_queries.sql.
| Question | Main fields | Meaning |
|---|---|---|
| Why was it adjusted? | primary_reason_code, reason_code |
Holiday, temporary risk control, consecutive limit moves, listing, delivery, limits, rule change, other special handling |
| What was adjusted? | parameter_code, parameter_name |
Price limit, margin, trading/position/opening limits, hours, listing, delivery, fees, options |
| When was it adjusted? | publish_date, announcement_date, effective_date_candidate |
Publication date is confirmed; effective/restore dates remain candidates until reviewed |
| Which product/contract? | product_code, contract_codes |
Product-level and contract-level identification |
notices: all notice metadata and extracted text.notice_products: product and contract tags with evidence.notice_parameters: parameter tags, candidate values and evidence.notice_dates: dates extracted from notice text.parameter_events: product-by-parameter event candidates.review_tasks: P0-P3 manual-review queue.manual_overrides: persistent manual corrections.v_notice_query: recommended notice-level query view.v_final_products, v_final_parameters: automatic tags merged with manual overrides.v_event_research_ready: manually confirmed events with effective dates.The query scripts use only the Python standard library.
python scripts/query_shfe_notices.py `
--db database/SHFE_notice_event_database_v2.2.sqlite3 `
--product FU --parameter price_limit `
--from-date 2020-01-01 --to-date 2026-12-31 `
--out fuel_oil_notices.csvpython scripts/query_shfe_parameter_events.py `
--db database/SHFE_notice_event_database_v2.2.sqlite3 `
--product FU --parameter price_limit `
--out fuel_oil_events.csvAutomatic labels and parameter_events are research-screening candidates, not verified facts. Before an event is used in formal analysis, users should verify:
At this release, v_event_research_ready contains no records because formal manual confirmation has not yet been completed.
Source notices originate from the official SHFE website: . Official notice text, attachments, trademarks and website content remain the property of their respective rights holders. See DATA_NOTICE.md.
The MIT license in this repository applies to the original source code and project documentation, not to third-party official notices or attachments.
If you use this project, please cite the repository and record the database version and access date. A formal citation file can be added after the first public release and DOI assignment.
This project is for academic and technical research only. It is not an official SHFE database, and no warranty is provided regarding completeness, classification accuracy or fitness for trading and investment decisions.
Version 2.2 adds notice-body recovery, source provenance, body-resource archiving, and reproducible completeness checks.
4,9632000-10-08 to 2026-08-106,473040402797.88%okPASS_WITH_DOCUMENTED_GAPSThe 27 research-relevant empty-body records are monthly settlement-parameter notices from 2003-05 through 2005-08. They precede the confirmed starting boundary of the parallel official monthly structured dataset. Parameter-value analyses should therefore use 2005-09 as the recommended starting boundary unless independent primary-source validation is completed.
All 6,473 parameter events remain automatically generated candidates. The v_event_research_ready view remains empty until event-level manual validation is completed.
See:
audits/v22_completeness_gate.jsonaudits/v22_completeness_gate_full_hash.jsonaudits/remaining_empty_body_gap_classification.csvaudits/v2.2_body_gap_classification.md暂无开放 Issues,或尚未同步最近议题。