thesis-fund-strategy
THESIS FUND v1.0 โ one configurable engine, many one-tap macro bets. You bring the market VIEW; the fund expresses it with discipline. The THESIS env var selects a preset from thesis-presets.json (e.g. risk_off = bet against the Trump economy, recovery = US risk-on, war_escalation / war_recovery = Iran/US/Israel, hype_vs_market, gold_over_btc / btc_over_gold). Each preset is a long basket + a short basket that together express the view, held in ONE wallet โ but it is NOT a blind hold: each name is only pressed when the market is CONFIRMING the thesis direction, and the DSL + drawdown gate de-risk when it isn't. NOT a copy-trader; the runtime owns the LLM gate (pass-through), DSL exits, and all risk.guard_rails.
What this skill does
# ๐ฏ THESIS FUND v1.0 โ bet your view, run with discipline The Thesis Fund is **one engine that expresses any of several macro views.** Instead of picking a *trading style*, you pick *what you believe will happen* โ and the fund trades the basket that expresses it. **One producer** (`thesis-producer.py`), one wallet, driven by the `THESIS` env var which selects a preset from `config/thesis-presets.json`. > **Disciplined conviction, not a hope trade.** The fund holds the preset's > long/short basket, but it only **presses** a name when the market is > *confirming* the thesis direction (4h/1h trend + 24h momentum aligned). A > long-basket name in a fresh downtrend is skipped; a short-basket name in a > fresh uptrend is skipped. The DSL + drawdown gate de-risk when the thesis > stops working. You express the view; the engine enforces the discipline. ## Presets (the one-tap bets) Each preset = a `THESIS` value. Opposing presets are just flipped baskets. | THESIS | The bet | Long | Short | |---|---|---|---| | `risk_off` | Bet against the Trump economy / risk-off | gold, silver | SP500, XYZ100, BTC | | `recovery` | U.S. recovery / risk-on (the mirror) | SP500, XYZ100, BTC | gold | | `war_escalation` | Iran/US/Israel quagmire deepens | BRENTOIL, CL, gold | SP500, XYZ100, BTC | | `war_recovery` | De-escalation / recovery | SP500, XYZ100, BTC | BRENTOIL, CL, gold | | `hype_vs_market` | HYPE keeps outrunning the majors | HYPE | BTC, ETH, SOL | | `gold_over_btc` | Real gold beats digital gold | gold | BTC | | `btc_over_gold` | Digital gold beats real gold | BTC | gold | Add or edit presets in `thesis-presets.json` โ **no code change needed.** ## How it scores (confirmation, not blind hold) Each tick, for every name in the active preset's basket, the producer fetches 1h+4h candles and scores how strongly the market is **confirming** the thesis direction for that name (the direction is fixed by the preset): | Component | Pts | |---|---| | 4h structure aligned with the thesis direction | +3 / +1 neutral / **skip** if opposed | | 1h confirmation | +1 aligned / โ1 opposed | | 24h momentum aligned | +2 (โฅ`momThresholdPct`) / +1 (โฅ0) | | RSI room (not overbought for a long / not oversold for a short) | +1 | `minScore` (4) is the confirmation bar. A name whose 4h structure *opposes* the thesis is skipped entirely โ the fund waits for the view to start working rather than fighting the tape. ## Execution & exit - slots **6** (the basket), `margin_pct` **12%**, tick **300s**, **strict 5x** clamp (then venue max) - DSL **balanced let-it-work**: phase1 max_loss **14%** / retrace 9 / 1 breach; `weak_peak_cut` **ON** (8h @ 2.0) + `dead_weight_cut` **ON** (16h) recycle a name that stops confirming; `hard_timeout` **5d**; phase2 ladder `10%โ0 / 22%โ45 / 40%โ65 / 70%โ80 / 120%โ90` - `drawdown_halt_pct` **20%** halts the whole fund if the thesis is broadly failing. ## XYZ handling Many baskets include XYZ (indices/metals/energy) โ candle fetches route with `dex="xyz"` (the producer keys off the `xyz:` prefix). XYZ trades 24/7. The `main`/`xyz` clearinghouse sections are two VIEWS of ONE cross-margined wallet, so `get_positions()` takes `accountValue` ONCE via `max()` โ never sums. ## Files | File | Purpose | |---|---| | `runtime.yaml` | Single-wallet runtime spec (DSL, risk, LLM gate) | | `scripts/thesis-producer.py` | Preset-driven producer daemon | | `scripts/thesis_config.py` | Thesis resolution + preset load + SenpiClient wrapper | | `config/thesis-presets.json` | The thesis baskets (edit/add presets here) | | `config/thesis-config.json` | Shared tunables (sizing, scoring, leverage) | ## Operator install See [README.md](README.md) โ set `THESIS=<preset>`, fund **one** wallet, launch **one** daemon. ## Hard rule for user-conversation Claude sessions User-conversation Claude sessions MUST NOT call any of: `create_position`, `close_position`, `edit_position`, `ratchet_stop_add`, `ratchet_stop_edit`, `ratchet_stop_delete`, `cancel_order`, `strategy_close`, `strategy_close_positions`. These tools are reserved for the **producer daemon** (entry path) and the **DSL ratchet engine** (exit path). User-conversation sessions are **read-only**. The producer daemon handles real signals on its next tick. ## License Apache-2.0 โ Copyright 2026 Senpi (https://senpi.ai)
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts โ single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score โฅ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.