Add external IPO history to heat model
Request: - Add historical data around T0.5 margin heat and rebuild the model. Changes: - Add external_ipo_history to store third-party historical IPO records separately from true T0.5 market-heat snapshots. - Add scripts/archive_ipohk_history.py to archive ipohk structured listed IPO history. - Archive 807 ipohk rows, including final oversubscription, one-lot win rate, grey-market return, and first-day return where available. - Extend the v0 analysis dataset with true T0.5 market-heat columns and separate external final-heat columns. - Rebuild reports/2026-06-15_analysis_model_v0.md with T0.5 coverage and external final-heat calibration. - Add a Chinese report explaining why historical final oversubscription cannot be treated as T0.5 margin snapshots. - Update analyst and archivist skills to keep T0.5 and external final history separate. Verification: - .venv/bin/python -m py_compile scripts/build_analysis_dataset.py scripts/archive_ipohk_history.py scripts/archive_t0_5_market_heat.py - .venv/bin/python scripts/build_analysis_dataset.py --as-of 2026-06-15T19:20:00Z - Python sqlite3 PRAGMA integrity_check returned ok and foreign_key_check returned zero rows. - Confirmed 807 external_ipo_history rows, 792 rows with external final oversubscription, 5 true T0.5 market-heat rows, and 297 analysis dataset rows. - git diff --cached --check Next useful context: - True T0.5 historical backtesting still requires ongoing frozen margin-heat snapshots during each IPO subscription window.
This commit is contained in:
@@ -74,6 +74,36 @@ CREATE TABLE IF NOT EXISTS ipo_market_heat (
|
||||
UNIQUE (ticker, provider, observed_at)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS external_ipo_history (
|
||||
history_id TEXT PRIMARY KEY,
|
||||
ticker TEXT NOT NULL,
|
||||
provider TEXT NOT NULL,
|
||||
source_id TEXT NOT NULL,
|
||||
stock_name TEXT,
|
||||
listing_date TEXT,
|
||||
price_range_low_hkd REAL,
|
||||
price_range_high_hkd REAL,
|
||||
issue_price_hkd REAL,
|
||||
one_lot_capital_hkd REAL,
|
||||
one_hand_win_rate_pct REAL,
|
||||
public_oversubscription_times REAL,
|
||||
total_fundraise_hkd_b REAL,
|
||||
market_cap_at_listing_hkd_b REAL,
|
||||
grey_market_return_pct REAL,
|
||||
first_day_return_pct REAL,
|
||||
sponsor TEXT,
|
||||
source_date TEXT,
|
||||
archived_at TEXT NOT NULL,
|
||||
local_path TEXT NOT NULL,
|
||||
url TEXT NOT NULL,
|
||||
file_sha256 TEXT,
|
||||
notes TEXT,
|
||||
UNIQUE (ticker, provider, listing_date),
|
||||
CHECK (local_path NOT LIKE '/%'),
|
||||
CHECK (local_path NOT LIKE './%'),
|
||||
CHECK (local_path NOT LIKE '%\%')
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS price_performance (
|
||||
performance_id TEXT PRIMARY KEY,
|
||||
ticker TEXT NOT NULL REFERENCES ipo_master(ticker),
|
||||
|
||||
Reference in New Issue
Block a user