portfolio-stress
Tracks portfolios people copy or hand to AI: Nancy Pelosi's disclosed trades, and a Claude portfolio chosen each month with a fixed prompt. Each one is stress-tested against market crashes, bull markets, a pandemic, the Strait of Hormuz closing or reopening, and war in Ukraine.
1. Pelosi: what a copier actually gets
2. AI portfolios
3. Stress tests
Each portfolio's current holdings run through past events and hypothetical shocks. Historical rows use what each holding actually did in that window. Holdings that did not trade yet use the factor model below, and the coverage column shows how much of the portfolio had real prices. Click a row to see each holding.
Build your own shock
Set a move for each factor. Every holding's response is its sensitivity to the factors (from three years of weekly returns) multiplied by these moves.
4. One-year range of outcomes
4,000 simulated years made by resampling 20-day blocks of the current holdings' daily returns from the last three years, which keeps fat tails and calm and volatile stretches. The zero-drift version removes the average return of those three years, so it shows risk without assuming the recent gains repeat.
5. Factor sensitivities
Method
- Pelosi trades come from her periodic transaction reports on the House Clerk's site, parsed from the PDFs. Positions are sized at the midpoint of each reported dollar range. Option purchases are counted as buying the stock for the same dollar amount, which is how copy-trading apps usually handle them. Her real returns on options were more leveraged.
- Trade date vs copier: the first version fills at the close on the day she traded. The copier fills at the close on the first trading day after the report was filed, which is the earliest anyone else could act.
- AI portfolios are only counted from the day the model chose them. Backtesting a model on past dates would let it use what it already knows happened. The prompt is in the repository and does not mention the stress tests.
- Factor model: weekly returns of each holding regressed on US stocks (SPY), semiconductors (SMH), oil (USO), long Treasuries (TLT), gold (GLD), the dollar (UUP), defence (ITA) and bitcoin, with ridge regularisation because SPY and SMH move together.
- Hypothetical shocks are assumptions, not forecasts. Each states its reasoning, and the editor above lets you change them.
- Prices from Yahoo Finance, adjusted for splits and dividends. Not investment advice. Source: github.com/hpark236/portfolio-stress