Skip to content

Commit fc1e0aa

Browse files
committed
Use synthetic fixtures instead of article seed
1 parent 2996210 commit fc1e0aa

11 files changed

Lines changed: 68 additions & 109 deletions

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Research-only political event and public disclosure tracking for US equities.
66

7-
This repository asks whether the event-tracking effect described in the Longbridge article
8-
["国会山股神?戴尔暴涨 38% 的背后,是基本面还是……"](https://longbridge.com/zh-CN/topics/41260998.md)
9-
can be tracked in a repeatable, point-in-time way.
7+
This repository asks whether public disclosure, official remarks, policy capital,
8+
procurement, and other political/public events can be tracked in a repeatable,
9+
point-in-time way.
1010

1111
## Repository Role
1212

@@ -24,9 +24,8 @@ The initial research scope is:
2424

2525
## Current Status
2626

27-
The first committed dataset is a seed extracted from the Longbridge topic above.
28-
It is intentionally small and should be treated as a hypothesis registry, not as
29-
verified investment evidence.
27+
The committed CSV files under `examples/` are synthetic schema fixtures only.
28+
They are not investment evidence and are not derived from any article.
3029

3130
Tracked event families:
3231

@@ -43,16 +42,16 @@ Build the seed tracker:
4342

4443
```bash
4544
python scripts/build_tracker.py \
46-
--watchlist data/seed/article_41260998_watchlist.csv \
47-
--events data/seed/article_41260998_events.csv \
48-
--output data/output/article_41260998_tracker.csv
45+
--watchlist examples/political_watchlist.example.csv \
46+
--events examples/political_events.example.csv \
47+
--output data/output/political_tracker.example.csv
4948
```
5049

5150
Run the synthetic event study:
5251

5352
```bash
5453
python scripts/run_event_study.py \
55-
--events data/seed/article_41260998_events.csv \
54+
--events examples/political_events.example.csv \
5655
--prices examples/price_history.example.csv \
5756
--windows 1,2 \
5857
--output data/output/event_study.example.csv
@@ -75,7 +74,7 @@ event_id,event_date,symbol,event_type,direction,confidence,source_url,notes
7574
Watchlist input schema:
7675

7776
```text
78-
symbol,name,bucket,article_status,thesis,source_url
77+
symbol,name,bucket,research_status,thesis,source_url
7978
```
8079

8180
Price input schema:
@@ -106,7 +105,7 @@ This repo does not own:
106105

107106
## Next Work
108107

109-
1. Replace article-derived seed events with official-source extraction.
108+
1. Add official-source extraction.
110109
2. Add a source adapter for OGE disclosure PDFs or normalized public datasets.
111110
3. Add public-remarks ingestion from White House pages and social-media exports.
112111
4. Backfill enough point-in-time events to evaluate hit rate, lag, and false

README.zh-CN.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
QuantStrategyLab 的确定性研究仓库,用来验证“公开持仓/交易披露 + 公开讲话/社媒点名 + 政策资金事件”能否形成可追踪的美股事件线索。
66

7-
首个样本来自长桥文章:[《国会山股神?戴尔暴涨 38% 的背后,是基本面还是……》](https://longbridge.com/zh-CN/topics/41260998.md)
8-
97
## 仓库定位
108

119
这是研究证据仓库,不是 AI 仓库,也不是交易执行仓库。
@@ -28,7 +26,7 @@ QuantStrategyLab 的确定性研究仓库,用来验证“公开持仓/交易
2826

2927
## 当前状态
3028

31-
当前只提交了一份文章种子样本。它用于定义研究问题和跑通工具链,不应视为已经验证过的投资证据
29+
当前提交的 `examples/` 数据是完全合成的 schema fixture,只用于跑通工具链,不是投资证据,也不是从任何文章抽取出来的样本
3230

3331
事件类型:
3432

@@ -39,20 +37,20 @@ QuantStrategyLab 的确定性研究仓库,用来验证“公开持仓/交易
3937

4038
## 本地验证
4139

42-
生成文章种子追踪表
40+
生成合成示例追踪表
4341

4442
```bash
4543
python scripts/build_tracker.py \
46-
--watchlist data/seed/article_41260998_watchlist.csv \
47-
--events data/seed/article_41260998_events.csv \
48-
--output data/output/article_41260998_tracker.csv
44+
--watchlist examples/political_watchlist.example.csv \
45+
--events examples/political_events.example.csv \
46+
--output data/output/political_tracker.example.csv
4947
```
5048

5149
用合成价格样本跑事件研究:
5250

5351
```bash
5452
python scripts/run_event_study.py \
55-
--events data/seed/article_41260998_events.csv \
53+
--events examples/political_events.example.csv \
5654
--prices examples/price_history.example.csv \
5755
--windows 1,2 \
5856
--output data/output/event_study.example.csv
@@ -66,10 +64,10 @@ python -m pytest -q
6664

6765
## 研究判断
6866

69-
文章里的“追踪效果”可以拆成三个可验证问题:
67+
这类“追踪效果”可以拆成三个可验证问题:
7068

7169
1. **能不能第一时间知道谁进入观察池**:需要结构化公开披露和政策/持仓来源。
7270
2. **能不能捕捉公开点名**:需要按时间记录白宫讲话、采访、社媒和新闻文本。
73-
3. **点名后是否有可交易的统计优势**:需要事件研究和样本外验证,不能只看 DELL、MU 等少数案例
71+
3. **点名后是否有可交易的统计优势**:需要事件研究和样本外验证,不能只看少数轶事案例
7472

7573
本仓库先解决前两步的数据结构和复盘框架;第三步需要更多点位和真实行情输入。后续如果需要 LLM 处理长文本,只能作为可替换的抽取工具,不能把模型判断结果写成核心信号合同。

data/seed/article_41260998_events.csv

Lines changed: 0 additions & 13 deletions
This file was deleted.

data/seed/article_41260998_watchlist.csv

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/research_plan.zh-CN.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
验证公开人物持仓披露、公开点名、政策资金事件与美股短中期收益之间是否存在可复现关系。
66

7-
首个样本来自长桥文章 `41260998`,其中主要假设是
7+
这类研究思路的主要假设是
88

99
- 先出现于公开持仓或交易披露
1010
- 再出现于公开讲话、采访、白宫材料或社媒文本
@@ -25,7 +25,7 @@
2525

2626
## 事件分层
2727

28-
- `watchlist_only`只在公开持仓或文章观察池中出现,尚未触发点名
28+
- `watchlist_only`只在公开持仓或研究观察池中出现,尚未触发点名
2929
- `disclosure_buy`:公开披露中出现买入或新增持仓
3030
- `public_mention`:公开讲话、采访、社媒、白宫材料中被点名
3131
- `policy_capital`:政策资金、政府采购、入股、产业政策支持
@@ -37,13 +37,13 @@
3737
2. 官方讲话:WhiteHouse.gov、官方转录、正式新闻稿。
3838
3. 可审计社媒:Truth Social、X 的可复核 URL 或导出。
3939
4. 市场数据:Longbridge、Yahoo、Polygon、Nasdaq Data Link 或 QuantStrategyLab 已有价格输入。
40-
5. 二级媒体和社区文章:只做线索,不直接作为高置信事件
40+
5. 二级媒体和社区文章:只做灵感或线索,不直接作为事件证据入库
4141

4242
## 初版成功标准
4343

4444
初版不判断能否实盘,只判断是否具备研究可行性:
4545

46-
- 能从同一 schema 载入文章种子事件
46+
- 能从同一 schema 载入合成示例和官方来源事件
4747
- 能生成候选追踪表,区分已触发点名和仅观察池标的。
4848
- 能在本地价格 CSV 上计算事件后收益。
4949
- 能记录数据来源、置信度和未验证事项。
@@ -60,9 +60,9 @@
6060

6161
## 当前限制
6262

63-
- 长桥文章是线索来源,不是最终数据源
63+
- 社区文章只能作为灵感来源,不是默认数据源
6464
- 公开披露通常有滞后,无法假设“披露日”等于“买入日可交易发现日”。
65-
- 文章中的部分时间线需要官方材料逐条复核
65+
- 非官方材料中的时间线需要官方材料逐条复核后才能入库
6666
- 单个总统或单一产业周期可能产生强样本偏差。
6767

6868
## 与 AI 影子信号仓库的边界

docs/source_registry.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ This file records source families for future ingestion. A source listed here is
44
not automatically trusted; every event still carries its own `source_url` and
55
`confidence`.
66

7-
## Seed Source
7+
## Inspiration Sources
88

9-
- Longbridge topic 41260998:
9+
- The Longbridge topic below inspired the initial research question. It is not
10+
committed as an event seed and should not be treated as evidence without
11+
official-source verification:
1012
<https://longbridge.com/zh-CN/topics/41260998.md>
1113

1214
## Candidate Official Sources
@@ -28,4 +30,3 @@ not automatically trusted; every event still carries its own `source_url` and
2830
- `medium`: reputable secondary source with enough details to locate official
2931
source later.
3032
- `low`: article, community post, or manually transcribed lead pending review.
31-
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
event_id,event_date,symbol,event_type,direction,confidence,source_url,notes
2+
demo-evt1-disclosure-buy,2026-01-10,EVT1,disclosure_buy,bullish,medium,https://example.invalid/official-filing/evt1-2026-01-10,"Synthetic official filing event for schema validation."
3+
demo-evt1-public-mention,2026-01-20,EVT1,public_mention,bullish,medium,https://example.invalid/official-remarks/evt1-2026-01-20,"Synthetic public mention event for schema validation."
4+
demo-evt2-policy-capital,2026-02-05,EVT2,policy_capital,bullish,high,https://example.invalid/policy-capital/evt2-2026-02-05,"Synthetic policy capital event for schema validation."
5+
demo-evt3-market-reaction,2026-03-15,EVT3,market_reaction,bullish,medium,https://example.invalid/issuer-news/evt3-2026-03-15,"Synthetic market reaction marker for schema validation."
6+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
symbol,name,bucket,research_status,thesis,source_url
2+
EVT1,Example Catalyst One,named_mentioned,triggered,"Synthetic disclosure plus mention candidate used only to validate tracker output.",https://example.invalid/watchlist/evt1
3+
EVT2,Example Policy Two,policy_capital,triggered,"Synthetic policy capital candidate used only to validate tracker output.",https://example.invalid/watchlist/evt2
4+
EVT3,Example Quality Three,disclosed_holding,watchlist,"Synthetic quality review candidate used only to validate tracker output.",https://example.invalid/watchlist/evt3
5+
EVT4,Example Monitor Four,drone_policy_watchlist,watchlist,"Synthetic watch-only candidate used only to validate tracker output.",https://example.invalid/watchlist/evt4
6+

examples/price_history.example.csv

Lines changed: 22 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,23 @@
11
date,symbol,close
2-
2026-02-10,DELL,100.00
3-
2026-02-11,DELL,101.00
4-
2026-02-17,DELL,105.00
5-
2026-03-10,AAPL,180.00
6-
2026-03-11,AAPL,181.00
7-
2026-03-12,AAPL,183.00
8-
2026-03-18,AAPL,188.00
9-
2026-03-10,TMO,520.00
10-
2026-03-11,TMO,522.00
11-
2026-03-12,TMO,525.00
12-
2026-03-18,TMO,535.00
13-
2026-03-25,MU,95.00
14-
2026-03-26,MU,98.00
15-
2026-04-01,MU,104.00
16-
2026-05-08,DELL,111.00
17-
2026-05-11,DELL,115.00
18-
2026-05-15,DELL,123.00
19-
2026-05-22,MU,110.00
20-
2026-05-26,MU,116.00
21-
2026-05-29,MU,120.00
22-
2026-05-28,DELL,130.00
23-
2026-05-29,DELL,179.40
24-
2026-06-04,DELL,182.00
25-
2026-02-10,SPY,510.00
26-
2026-02-11,SPY,511.00
27-
2026-02-17,SPY,515.00
28-
2026-03-11,SPY,520.00
29-
2026-03-12,SPY,521.00
30-
2026-03-18,SPY,525.00
31-
2026-03-25,SPY,530.00
32-
2026-03-26,SPY,531.00
33-
2026-04-01,SPY,534.00
34-
2026-05-08,SPY,545.00
35-
2026-05-11,SPY,546.00
36-
2026-05-15,SPY,548.00
37-
2026-05-22,SPY,550.00
38-
2026-05-26,SPY,552.00
39-
2026-05-28,SPY,553.00
40-
2026-05-29,SPY,554.00
41-
2026-06-04,SPY,556.00
2+
2026-01-10,EVT1,100.00
3+
2026-01-12,EVT1,101.00
4+
2026-01-20,EVT1,104.00
5+
2026-01-21,EVT1,107.00
6+
2026-01-27,EVT1,111.00
7+
2026-02-05,EVT2,50.00
8+
2026-02-06,EVT2,52.00
9+
2026-02-12,EVT2,54.00
10+
2026-03-15,EVT3,80.00
11+
2026-03-16,EVT3,84.00
12+
2026-03-23,EVT3,83.00
13+
2026-01-10,SPY,500.00
14+
2026-01-12,SPY,501.00
15+
2026-01-20,SPY,505.00
16+
2026-01-21,SPY,506.00
17+
2026-01-27,SPY,508.00
18+
2026-02-05,SPY,510.00
19+
2026-02-06,SPY,511.00
20+
2026-02-12,SPY,514.00
21+
2026-03-15,SPY,520.00
22+
2026-03-16,SPY,521.00
23+
2026-03-23,SPY,522.00

src/political_event_tracking_research/tracker.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class WatchlistItem:
3636
symbol: str
3737
name: str
3838
bucket: str
39-
article_status: str
39+
research_status: str
4040
thesis: str
4141
source_url: str
4242

@@ -49,7 +49,7 @@ def load_watchlist(path: str | Path) -> list[WatchlistItem]:
4949
symbol=row["symbol"].upper(),
5050
name=row.get("name", ""),
5151
bucket=row.get("bucket", ""),
52-
article_status=row.get("article_status", ""),
52+
research_status=row.get("research_status") or row.get("article_status", ""),
5353
thesis=row.get("thesis", ""),
5454
source_url=row.get("source_url", ""),
5555
)
@@ -81,7 +81,7 @@ def trigger_status(item: WatchlistItem, events: list[Event]) -> str:
8181
return "mentioned"
8282
if "disclosure_buy" in event_types:
8383
return "disclosed"
84-
return item.article_status or "watchlist"
84+
return item.research_status or "watchlist"
8585

8686

8787
def build_tracker_rows(items: list[WatchlistItem], events: list[Event]) -> list[dict[str, object]]:
@@ -152,4 +152,3 @@ def main(argv: list[str] | None = None) -> None:
152152

153153
if __name__ == "__main__":
154154
main()
155-

0 commit comments

Comments
 (0)