Content
# finance-oracle — WallenT
**WallenT is a learning-loop analyst, not a predictor and not a dashboard.**
The product is the *loop*: every investing decision logs a falsifiable thesis
**before** the outcome is known, then gets reviewed against reality, then yields a
lesson. The portfolio is the context; getting good at the AI system is the goal.
ไม่รีบ — prove the mechanism first, scale later.
> Identity, hard gates, and the Analyst Output Contract live in [`CLAUDE.md`](CLAUDE.md).
> The locked spec is [`spec.md`](spec.md). Current state is always in [`status.md`](status.md).
## The core loop
```
1. THESIS (before outcome) → reason + assumptions + disconfirmers + Q-conditions + review_later
❌ no buy/sell verdict · ❌ no confidence%
2. TRACK (price ingest) → real market closes (yfinance) — never fabricated numbers
3. REVIEW (at review_later) → thesis held? assumption failed? disconfirmer appeared?
action ONLY as a pre-declared Q-condition (logic, not a new verdict)
4. LESSON (at close) → P&L% + would-repeat? → feeds the next thesis
```
One deal proves the **mechanism**. Expectancy/strategy needs **N deals** — never claim
a strategy works from one.
### Scripts (deterministic, rerunnable — real data only)
| Script | What | Notes |
|--------|------|-------|
| `scripts/fetch_prices.py` | pull daily closes for the watchlist (yfinance) | market-date stamped (audit-safe), saves `data/prices/<market-date>.json` |
| `scripts/review_deal.py` | review one deal: real current close → P&L%, Q-condition check | `--as-of` for reproducible reviews; emits numbers only, no verdict |
| `scripts/expectancy.py` | expectancy report from **closed** `kind:paper` deals | excludes mechanism-proof replays; flags small-N as noise |
```bash
python scripts/fetch_prices.py --ticker CPALL.BK
python scripts/review_deal.py --ticker CPALL.BK --entry-date 2026-05-12 --entry-price 43.75 --qty 100 --as-of 2026-05-29
python scripts/expectancy.py
```
## Discipline scaffold (`ψ/`)
The original failure mode was "งานหายเงียบ 3 สัปดาห์" — empty state, lost work.
The scaffold closes it: state lives in files, not in the agent's head.
- `status.md` — single source of now / pending / next (updated every session)
- `ψ/journal/` — one typed markdown file per deal (the loop's source of truth)
- `ψ/inbox/handoff/` — end-of-session handoff (no handoff = session not closed)
- `ψ/memory/` — retros / lessons (the loop applied to the agent itself)
- `ψ/observations/` — auto tool-telemetry (gitignored)
See [`ψ/README.md`](ψ/README.md) and [`ψ/journal/README.md`](ψ/journal/README.md).
## Hard rules (see `CLAUDE.md`)
- **R0:** paper portfolio only — no real buy/sell/money/broker until TINE approves.
- **Analyst Output Contract:** logged thesis only · no buy/sell verdict · no confidence%.
- **API ได้อย่าด้นสด** — numbers come from a real API or they are not stated. No magic.
## Deferred subsystems (not the core — do not let them pull scope)
- **Supabase** (`mytgtdurcpqefpkserae`) — currently a keyless read-only stub. Storage is
**markdown/ψ first**; activate Supabase (key + schema + write path, **R1**) only when the
loop is proven and typed expectancy needs SQL. Tables the dashboard expects: `prices`,
`portfolio`, `transactions`, `watchlist`, `ai_insights`, `trade_journal`, `weekly_reviews`.
- **Dashboard** (`dashboard/`) — a static shell built earlier (Codex). It reads sample data
and is **frozen** until the loop produces real data; showing a dial without an engine is
what stalled this repo before. Run locally only for reference:
```bash
cd dashboard && python3 -m http.server 8091 # http://localhost:8091
```
- **News / 17-factor / screener** — future thesis-generators that must feed the journal,
not float free. Out of the core's first round.
- **notebooklm-py** — `NO-GO` until LOKI security vet passes (holds real Google OAuth).
## Changelog
See `CLAUDE.md` changelog. README rewritten 2026-05-31 to lead with the learning-loop
core (was dashboard-first) per Judge repo review.
Connection Info
You Might Also Like
Vibe-Trading
Vibe-Trading: Your Personal Trading Agent
ai-berkshire
Berkshire in the AI Era: A Value Investment Research Framework Based on...
valuecell
Valuecell is a Python project for efficient data management.
hexstrike-ai
HexStrike AI is an AI-powered MCP cybersecurity automation platform with 150+ tools.
tradingview-mcp
AI-assisted TradingView chart analysis — connect Claude Code to your...
tradingview-mcp
TradingView MCP Server offers real-time market analysis for crypto and stocks.