01-projects/investing/plugin/skills/label-historical-phases

SKILL

investing-label-historical-phases

For a given investing thesis with named phases, produce a CSV timeline of phase transitions for prior cycles. The output is the input that /investing:backtest-thesis v2 needs to align cycle windows to thesis phases (not arbitrary calendar years).

Status: scaffold v1 (2026-05-18). Implementation (the actual labeling work for each thesis) happens in a separate sub-agent session per thesis. This file is the SOP shape that future labeling sessions execute against.

Why this skill exists

The v1 memory backtest used calendar-year folds because no phase-history dataset existed. The founder critic correctly identified this as a methodology artifact, not a strategy choice — a memory-cycle strategy should be tested against memory-cycle boundaries.

Building phase-history for prior cycles is research work (read primary sources, label transitions) that's separate from backtesting and from thesis-writing. This skill is the dedicated harness so it can happen once per thesis, get reviewed, and be reused by every subsequent backtest revision.

This skill is Ray-autonomous — the founder doesn't see the labeling work. He sees only:

Inputs

The thesis file must declare a phases block listing the named phases in order, with each phase's defining characteristic. Example for memory:

phases:
  - demand_surge
  - capacity_announcement
  - capacity_online
  - down_cycle
  - recovery
phase_definitions:
  demand_surge: "Quarterly memory demand growth >15% YoY for 2+ consecutive quarters"
  capacity_announcement: "Memory vendor (Samsung/SK Hynix/Micron) publicly commits >20% capacity increase"
  capacity_online: "New fab production at >50% capacity, contributing to oversupply pressure"
  down_cycle: "DRAM spot declining for 6+ consecutive months OR vendor margin compression >30%"
  recovery: "DRAM spot stabilizing for 2+ months AND vendor capex cuts announced"

If the thesis lacks phases + phase_definitions, FAIL and route to founder — the thesis needs sharpening before historical labeling is possible.

Methodology

Step 1 — Determine cycle scope

Read the thesis. Determine how many historical cycles to label. Default: as many as the available data can support back to --from-year. For memory: ~6-7 cycles back to 1997-2002. For power: fewer well-defined cycles, document the gap.

Step 2 — For each phase transition, gather evidence

For each candidate transition date, search:

Per transition, capture:

Step 3 — Apply consistent decision rules

Phase boundaries are not natively sharp; we're imposing labels on continuous data. Pick decision rules from the thesis's phase_definitions and apply them mechanically. If two raters would disagree because the underlying anchor data is noisy, log it as confidence: low and document the disagreement in the narrative companion.

Example rule (memory down_cycle start): "Earliest month where DRAM spot has declined for 6 consecutive months AND at least one of the three major vendors has cut capex guidance in their most recent earnings call." This is mechanical; two researchers applying it should agree on the date to within ~1 month.

Step 4 — Write outputs

Primary output: ~/rdco-vault/01-projects/investing/anchors/<thesis-id>/phase-history.csv with columns:

date,phase_transition_to,evidence,evidence_source,confidence
1998-07-01,down_cycle,"DRAM spot down 7 consecutive months; Micron 10-Q MD&A: 'continued pricing pressure'",https://www.sec.gov/...,high
1999-04-01,recovery,"DRAM spot stabilized Mar-Apr; Samsung announces capex cut",https://www.koreatimes.co.kr/...,medium
...

Narrative companion: ~/rdco-vault/01-projects/investing/anchors/<thesis-id>/phase-history-notes.md documenting:

Frontmatter:

---
date: YYYY-MM-DD
type: investing-anchor
thesis_id: <id>
covers_period: YYYY-YYYY
cycle_count: <N>
high_confidence_pct: <X%>
sensitivity: medium
tags: [investing, anchor, phase-history, <thesis-id>]
---

Step 5 — Self-check before exiting

Before declaring done:

Step 6 — Return

One-line summary to the caller (Ray's parent session, not the founder):

<thesis-id> phase-history | <N> cycles labeled | <high_confidence_pct>% high-confidence | <coverage-period>

Honest limits to document (every run)

Bake these into the narrative companion every time — they're not bugs, they're the shape of the data:

Dependencies

Caveats (load-bearing)

Related

Changelog