Commit Graph

13 Commits

Author SHA1 Message Date
geometrybase fb7bf3af7d Analyze latest HK IPO candidates
Request:
- Use the project analyst workflow to analyze the latest upcoming Hong Kong IPO candidates.

Changes:
- Refreshed recent HK IPO target coverage through 2026-06-17 and archived current HKEX source updates.
- Archived 06675 allotment results and D1 Yahoo price performance for boundary-case review.
- Archived a 2026-06-17 T0.5 VBKR/Jieli market-heat snapshot for still-actionable 02335 and 06106.
- Rebuilt the v0 analysis dataset and snapshots at 2026-06-17T08:20:00Z.
- Added a Chinese horizontal analyst report ranking 06106, 02335, 06132, 06067, 01392, with 06675 separated as a T1/D1 review sample.

Verification:
- Ran SQLite PRAGMA integrity_check and foreign_key_check.
- Ran git diff --check and git diff --cached --check.
- Confirmed report source paths exist.

Next useful context:
- 06106 is the top still-actionable T0.5 candidate at this as-of time.
- 02335 needs another pre-deadline heat sample before a stronger call.
- 01392, 06067, and 06132 are now mainly waiting for T1 official allotment results.
2026-06-17 08:27:35 +00:00
geometrybase 222f55c140 Add T0.5 market heat IPO analysis
Request:
- Test whether subscription-period T0.5 market heat data can be captured and incorporated into IPO analysis.

Changes:
- Add an ipo_market_heat table for non-official market-heat snapshots.
- Add a VBKR/Jieli archive script for expected margin subscription multiples.
- Archive the 2026-06-15T18:40:00Z heat snapshot for 01392, 02335, 06067, 06106, and 06132.
- Add an experimental T0.5 overlay rule file and a Chinese cross-IPO trial report.
- Update archivist and analyst skills so T0.5 remains separate from official T1 allotment demand.

Verification:
- .venv/bin/python -m py_compile scripts/archive_t0_5_market_heat.py scripts/build_analysis_dataset.py scripts/update_sync_state.py
- Python sqlite3 PRAGMA integrity_check returned ok and foreign_key_check returned zero rows.
- Confirmed 5 ipo_market_heat rows and 5 t0_5_market_heat source_refs for the frozen snapshot.
- git diff --cached --check

Next useful context:
- T0.5 data is non-official and should be resampled during the subscription window, then compared against T1 official allotment results.
2026-06-15 15:44:32 +00:00
geometrybase a2ec016769 Add selected T0 horizontal IPO report
Request:
- Combine the currently selected T0 IPO reports into one cross-sectional analysis report.

Changes:
- Add a Chinese horizontal T0 report comparing 01392, 02335, 06067, 06106, and 06132.
- Rank the selected IPOs by the current T0 model and short-exit discipline focused on T2/D1 selling.
- Backfill 02335's Chinese company name from its Chinese HKEX prospectus and archive the source PDF plus extracted text.
- Refresh the v0 analysis dataset and sync-state snapshots at 2026-06-15T18:20:00Z.

Verification:
- .venv/bin/python -m py_compile scripts/build_analysis_dataset.py scripts/generate_ipo_report.py scripts/extract_pdf_text.py scripts/update_sync_state.py
- Python sqlite3 PRAGMA integrity_check returned ok and foreign_key_check returned zero rows.
- Confirmed 02335 Chinese source_ref, extracted text manifest row, and selected horizontal report content.
- git diff --cached --check

Next useful context:
- Untracked PDF exports of individual reports and the horizontal report were left out of this focused commit.
2026-06-15 15:17:06 +00:00
geometrybase fcb795b583 Add 02335 T0 analyst report
Request:
- Generate an analyst report for HK IPO ticker 02335.

Changes:
- Archived the official HKEXnews 02335 prospectus PDF and extracted text under project-relative data paths.
- Seeded 02335 T0 prospectus facts, source references, sync state, and analysis snapshots.
- Generated reports/2026-06-15_02335_T0_prospectus_analysis.md in Simplified Chinese with concrete T0/T1/T2/D1 dates and short-exit T2/D1 discipline.
- Made PDF text extraction tolerant of invalid Unicode surrogate characters emitted by pypdf.

Verification:
- Compiled archive_hkex_documents.py, generate_ipo_report.py, build_analysis_dataset.py, extract_pdf_text.py, and update_sync_state.py.
- Ran SQLite integrity_check and foreign_key_check.
- Verified the archived 02335 PDF hash, extracted-text manifest row, and analysis dataset row.
- Ran git diff --check.

Next useful context:
- 02335 is currently T0_prospectus; T1_allotment is pending for 2026-06-23.
2026-06-15 15:07:44 +00:00
geometrybase 42c18131e8 Add 06067 T0 analyst report
Request:
- Generate an analyst report for HK IPO ticker 06067.

Changes:
- Archived the official HKEXnews 06067 prospectus PDF and extracted text under project-relative data paths.
- Seeded 06067 T0 prospectus facts, source references, sync state, and analysis snapshots.
- Generated reports/2026-06-15_06067_T0_prospectus_analysis.md in Simplified Chinese with concrete T0/T1/T2/D1 dates and short-exit T2/D1 discipline.
- Updated the HKEX document archiver so over-allotment shares are only recorded when the prospectus supports them, with explicit no-option cases stored as zero.

Verification:
- Compiled archive_hkex_documents.py, generate_ipo_report.py, build_analysis_dataset.py, extract_pdf_text.py, and update_sync_state.py.
- Ran SQLite integrity_check and foreign_key_check.
- Verified the archived 06067 PDF hash, extracted-text manifest row, and analysis dataset row.
- Ran git diff --check.

Next useful context:
- 06067 is currently T0_prospectus; T1_allotment is pending for 2026-06-22.
2026-06-15 15:03:07 +00:00
geometrybase 77b405e4f3 Add T0 analyst reports for active IPOs
Request:
- Analyze HK IPO ticker 01392 with the analyst skill.
- Preserve the in-flight 06132 archive/report work already created for the prior request.

Changes:
- Archived official HKEX prospectus PDFs and extracted text for 01392 and 06132.
- Seeded structured T0 facts into the SQLite archive and refreshed CSV snapshots and sync state.
- Rebuilt the v0 analysis dataset and model calibration report.
- Generated Simplified Chinese T0 prospectus-stage analyst reports for 01392 and 06132.
- Adjusted report stage calendars so T2 uses the previous business day before D1 when listing is separated from allocation by a weekend.

Verification:
- Compiled modified Python scripts with in-memory syntax checks.
- Ran SQLite quick_check and foreign_key_check.
- Confirmed DB row counts match CSV snapshots for key tables.
- Verified 01392/06132 source paths are repo-relative, raw files exist, hashes match, and PDF text manifest rows are ok.
- Ran git diff --cached --check.

Next useful context:
- 01392 T1 is due on 2026-06-18; rerun analyst after allotment results are archived.
- 06132 T1 is due on 2026-06-22; rerun analyst after allotment results are archived.
2026-06-15 14:51:44 +00:00
geometrybase 6d05056609 Backfill structured T1 demand from archived text
Request:
- Use archivist to close the 137 T1 ipo_demand source-only gaps using extracted PDF text.

Changes:
- Add an incremental T1 demand text backfill script.
- Parse existing allotment-result extracted text into ipo_demand.
- Archive linked Summary PDFs from old HKEX HTML allotment-result pages.
- Correct allotment-result selection to prefer primary result announcements over clarification or supplemental notices.
- Add robust line-aware allotment parsing and document the workflow in archivist and README.
- Record the backfill result in a report.

Execution:
- Selected 137 source-only T1 demand gaps.
- Wrote 137 ipo_demand rows, increasing ipo_demand from 154 to 291 rows.
- Archived 38 new HKEX allotment-result PDFs and extracted their text.
- Confirmed an incremental rerun selects 0 gaps and writes 0 rows.

Verification:
- Ran git diff --cached --check.
- Ran py_compile for archive_hkex_documents.py and backfill_t1_demand_from_text.py.
- Checked SQLite integrity and foreign keys.
- Confirmed DB row counts match CSV snapshots.
- Verified no T1 complete row is missing ipo_demand.
- Verified source_refs paths/files/hashes and PDF extracted-text manifest hashes.

Next useful context:
- T1 demand structure is complete for listed rows; 06106 and 06675 remain pending_not_due.
- T2 grey-market and due price-performance gaps remain separate archivist priorities.
- Analyst output should be regenerated before using the new T1 demand facts for scoring.
2026-06-15 13:59:06 +00:00
geometrybase 5f9546b16c Improve IPO archive gap handling
Request:
- Rework archivist handling for stubborn T0/T1 HKEX document gaps and unresolved T2 grey-market gaps.

Changes:
- Query HKEXnews titleSearchServlet with IPO-date windows instead of only the latest title-search page.
- Recognize SHARE OFFER listing documents and archive official HTML allotment-result notices when no PDF is published.
- Mark source-only allotment completion clearly when structured demand parsing is not yet covered.
- Add a reusable grey-market gap marker and archivist source policy for T2 data.
- Archive newly discovered HKEX raw sources, update SQLite, and refresh CSV snapshots.
- Treat raw evidence files as binary in Git attributes.

Verification:
- Ran py_compile for archive_hkex_documents.py, update_sync_state.py, and mark_grey_market_gaps.py.
- Ran HKEX document archive backfill and grey-market gap marker.
- Checked SQLite integrity, foreign keys, source paths, source hashes, and DB-vs-snapshot row counts.
- Ran git diff --cached --check after marking raw archives binary.

Next useful context:
- T0 is now complete for 293 tickers.
- T1 has 291 complete and 2 pending_not_due tickers.
- T2 has 291 blocked gaps pending an approved grey-market source strategy.
2026-06-15 09:47:36 +00:00
geometrybase 078f56998b Backfill IPO price performance history
Request:
- Adjust archivist after the audit findings and update historical data.

Changes:
- Teach the archivist skill to close audit-discovered gaps in priority order.
- Add scripts/archive_price_performance.py for due D1/D5/D20/D60 price-performance backfills.
- Document the price-performance backfill command in README.
- Archive raw Yahoo Finance chart responses under repo-relative data/raw/{ticker}/ paths.
- Populate price_performance with D1/D5/D20/D60 checkpoints and refresh source_refs, sync_runs, sync_tasks, and ticker_sync_state snapshots.

Execution:
- Ran .venv/bin/python scripts/archive_price_performance.py --as-of 2026-06-15T10:00:00Z.
- Selected 291 due price-performance tickers.
- Archived 273 price-history sources and wrote 1063 price-performance rows.
- Re-ran .venv/bin/python scripts/archive_hkex_documents.py --as-of 2026-06-15T10:05:00Z for the remaining open T0/T1 tasks; no additional completed T0/T1 stages resulted.

Verification:
- Compiled the new price-performance script.
- Ran git diff --check.
- Checked SQLite integrity and foreign keys.
- Confirmed database row counts match CSV snapshots.
- Verified all 979 source_refs use valid repo-relative paths, have files, have hashes, and SHA256 hashes match.
- Confirmed no generated Python caches or SQLite transient files remain.

Next useful context:
- price_performance now has 1063 rows: D1 273, D5 272, D20 267, D60 251.
- Remaining due price-performance gaps are 18 tickers where Yahoo history was unavailable or the request failed.
- T0/T1 gaps remain at T0 93 and T1 77; T2 grey-market remains unresolved pending a reproducible source strategy.
2026-06-15 09:16:08 +00:00
geometrybase 9aab267f80 Run full HKEX document backfill
Request:
- Remove small-batch guidance and execute the HKEX document archiver across all open T0/T1 sync tasks in one run.

Changes:
- Make archive_hkex_documents.py process every open T0/T1 ticker by default when --limit is omitted.
- Add per-ticker progress output and keep full refreshes moving if one ticker fails.
- Suppress noisy pypdf warnings during large official document extraction.
- Update archivist and README instructions to show the full-run command without batch notes.
- Archive official HKEXnews prospectus and allotment-results PDFs under repo-relative data/raw paths.
- Refresh hk_ipo.sqlite and CSV snapshots for parsed T0/T1 fields, source_refs, sync_runs, sync_tasks, and ticker_sync_state.

Execution:
- Ran .venv/bin/python scripts/archive_hkex_documents.py --as-of 2026-06-15T09:00:00Z.
- Selected 284 open T0/T1 tickers, processed 210 tickers, and archived 398 source files.
- Left 74 tickers as missing target docs because title search did not return target prospectus/allotment documents for this pass.

Verification:
- Parsed archivist scripts with Python ast.
- Confirmed README, archivist skill, and archiver script no longer contain batch guidance.
- Ran git diff --check.
- Checked SQLite integrity and DB/snapshot row counts.
- Verified 706 source_refs use relative local paths, all files exist, and SHA256 hashes match.

Next useful context:
- Current source_refs count is 706 and ipo_demand count is 134.
- Sync ledger now reports 414 complete, 1595 pending_due, and 42 pending_not_due states.
2026-06-15 07:57:33 +00:00
geometrybase 993d7b26fa Backfill first HKEX IPO document batch
Request:
Start progressively filling detailed information for recent HK IPO targets.

Changes:
- Add scripts/archive_hkex_documents.py to map tickers to HKEXnews stock IDs, select official prospectus and allotment-results PDFs, archive them under data/raw/{ticker}, parse high-confidence T0/T1 facts, export snapshots, and refresh sync state.
- Document the small-batch HKEX document backfill workflow in README.md and the archivist skill.
- Archive prospectus and allotment-results PDFs for 00901, 01081, 01779, 02290, 02553, and 03388.
- Fill T0 details including application dates, expected allotment date, board lot, minimum subscription amount, and offer-share counts for the six tickers.
- Fill T1 allotment-demand details including valid/successful applications, public subscription level, international placees, international subscription level, and final offer-share allocations.
- Refresh source_refs, ipo_master, offering_terms, ipo_demand, ticker_sync_state, and sync_tasks snapshots.

Verification:
- Ran archive_hkex_documents.py in a first small batch and re-ran corrected tickers after parser hardening.
- Parsed project Python scripts with ast.parse.
- Checked SQLite integrity and DB-to-snapshot row counts.
- Verified source_refs paths are repo-relative, source files exist, and SHA-256 hashes match.
- Confirmed batch field completeness for the six processed tickers.
- Ran git diff --check and git diff --cached --check.
- Checked for Python cache and SQLite transient files.

Next useful context:
- This batch added about 55MB of official HKEXnews PDFs.
- Sync state now has 16 complete stages, 1993 pending_due stages, and 42 pending_not_due stages.
- Continue with small --limit batches because HKEXnews title search can include historical or postponed offering documents for the same stock code.
2026-06-15 07:07:46 +00:00
geometrybase c65b20a1c4 Archive recent HKEX IPO targets
Request:
Use the project archivist workflow to update IPO target coverage for the most recent three-year window.

Changes:
- Add scripts/update_recent_ipo_list.py to discover HKEXnews annual new listing reports, archive XLSX sources, parse subscription-relevant IPO rows, and update SQLite plus snapshots.
- Add new_listing_report_entries to preserve annual report row-level evidence.
- Archive 2023-2026 Main Board new listing reports and 2024-2026 GEM new listing reports.
- Seed 290 report-backed IPO targets for 2023-06-15 through 2026-06-15, skipping 10 non-IPO rows without numeric offer prices.
- Refresh ipo_master, missing offering_terms fields, source_refs, ticker_sync_state, and sync_tasks.
- Add openpyxl as the XLSX parser dependency and document the archivist refresh flow.
- Limit sync summary output while keeping the full queue in SQLite and CSV snapshots.

Verification:
- Ran update_recent_ipo_list.py for 2023-06-15 to 2026-06-15 with as-of 2026-06-15T07:30:00Z.
- Parsed project Python scripts with ast.parse.
- Checked SQLite integrity and DB-to-snapshot row counts.
- Verified source_refs paths are repo-relative, files exist, and SHA-256 hashes match.
- Ran git diff --check and git diff --cached --check.
- Checked for Python cache and SQLite transient files.

Next useful context:
- ipo_master now has 293 tickers; new_listing_report_entries has 290 report-backed targets.
- Current sync queue has 2005 open tasks and 42 waiting_until_due tasks for deeper per-ticker archival stages.
2026-06-15 06:42:31 +00:00
geometrybase 08db218b6d Add archivist incremental sync state
Request:
Add archivist support for remembering which IPO archive stages have already been synced and which stages should be updated next.

Changes:
- Add sync_runs, ticker_sync_state, sync_tasks, and price_performance tables to the archive schema.
- Add scripts/update_sync_state.py to derive per-ticker stage status and rebuild the next-sync task queue.
- Export the new sync-state tables as Git-friendly CSV snapshots.
- Document the incremental archive flow in the archivist skill and README.

Verification:
- Ran scripts/bootstrap_historical_data.py.
- Ran scripts/update_sync_state.py with a deterministic as-of timestamp.
- Checked SQLite integrity and DB-to-snapshot row counts with Python sqlite3.
- Parsed Python scripts with ast.parse.
- Ran git diff --check and checked for temporary SQLite/cache files.

Next useful context:
- Current derived queue has 2 open tasks for 06658 and 15 waiting_until_due tasks for future stages.
2026-06-15 06:29:54 +00:00