Skip to main content

SAC Capital

AI trading decisions are exported as deterministic bytes32 commitments and anchored on Mantle — anyone can verify agent behavior and outcomes.

Track: AI Alpha & Data · Turing Test Hackathon 2026

Demo sapa-fund.vercel.app
Contract 0x1d1fFbC1b5F5E0471f8e8E28eAf007dd24EB4887
Deploy tx 0x46bbaa...

Install the CLI

uv tool install sac-capital   # or: pip install sac-capital
sac setup                     # step-by-step wizard — connect LLM, broker, alerts
sac doctor                    # verify config
sac run                       # equities pipeline (paper trading)

Runs on your Claude subscription via the claude CLI (no API key required) — Anthropic/OpenAI API keys and Codex optional. Every wizard step is skippable; config lives in ~/.sac-capital/. Full guide: INSTALL.md.

Command Does
sac setup interactive setup wizard (subscription-first, paper-only)
sac run full equities screen → analyst → risk kernel → paper orders
sac research supplier-lag research runner (--static-only etc.)
sac doctor preflight checks; --llm adds a live LLM probe
sac verify export deterministic decision commitment hashes

How It Works

US Equity Event Screen
  → Haiku pre-filter
  → Sonnet bull thesis
  → Sonnet challenger
  → Auditor
  → Risk Kernel (fractional Kelly, 2% per-trade cap, 35% sector cap)
  → Alpaca paper order + local ledger entry
  → Deterministic canonical JSON exporter
  → AgentDecisionRegistry on Mantle (bytes32 SHA-256 commitment)
  → Frontend verification panel

Mantle is the immutable benchmark layer. The agent hashes each decision payload with canonical JSON → SHA-256 → bytes32, records it on-chain, and can later anchor outcome hashes against the same decision ID. The frontend recomputes the hash client-side so reviewers can confirm the on-chain record matches the AI output.

Safety boundary: paper-only. On-chain records are verifiability anchors — not custody, brokerage, or live-trading instructions.

The equities research side now also includes a paper-only supplier-lag research runner:

uv run runner-research --static-only
uv run runner-research --strategy-backtest --static-only

runner-research saves the top research candidates to data/research_candidates.json and appends historical strategy backtests to data/strategy_backtests.jsonl when trades exist.


Reproduce Locally

Dependencies

uv sync

Tests

./.venv/bin/python -m pytest

Export decision commitments

./.venv/bin/python scripts/export_mantle_commitments.py \
  --ledger data/ledger.db \
  --out data/mantle_commitments.jsonl

Dry-run Mantle submission

./.venv/bin/python scripts/submit_mantle_decisions.py \
  --commitments data/mantle_commitments.jsonl \
  --contract 0x1d1fFbC1b5F5E0471f8e8E28eAf007dd24EB4887 \
  --agent-id mantle-verifiable-ai-agent \
  --limit 1

Deploy contract (Foundry required, funded Mantle wallet)

export MANTLE_RPC_URL=https://rpc.mantle.xyz
export MANTLE_PRIVATE_KEY=0x...

forge test
forge script contracts/script/DeployAgentDecisionRegistry.s.sol \
  --rpc-url "$MANTLE_RPC_URL" \
  --broadcast

Frontend

cd frontend
npm install
npm run dev

Repository Layout

cli/              `sac` CLI — banner, setup wizard, workdir, dispatcher
core/             Config, ledgers, alerts, LLM adapters (incl. claude_cli subscription provider)
equities/
  analysis/       Equity analyst, typed LLM schemas, budget controls
  data/           Prices, fundamentals, calendar, filings, news, macro, VIX
  eval/           Research artifact replay and report
  execution/      Alpaca paper execution and reconciliation
  killgate/       Forward-paper tracker and promotion gates
  research/       Artifact store and offline research modules
  risk/           Sizing, exits, risk kernel
  screen/         Event, quality, inflection, thematic, relative-strength, politician
contracts/        AgentDecisionRegistry.sol (Mantle)
scripts/          Commitment exporter, Mantle submission, nightly maintenance
runner_research.py Paper-only supplier-lag research runner
frontend/         React/Vite verification dashboard
tests/            790-test regression suite
docs/             Operator runbooks
deploy/           macOS launchd plists

Equities Pipeline

runner_equities.py runs the full loop:

  1. Mark open positions and check exits
  2. Classify macro regime
  3. Check thesis health on open swing positions
  4. Check thematic concentration
  5. Run event screen (earnings + recent 8-K catalysts)
  6. Add relative-strength, trend, base, breakout-volume evidence
  7. Run quality and inflection screens
  8. Apply VIX entry gate
  9. Run LLM pre-filter → analyst → challenger → auditor
  10. Validate with Pydantic; reject malformed outputs
  11. Write research artifacts for all analysed candidates
  12. Pass through risk kernel
  13. Submit Alpaca paper orders or internal paper fills

Optional — Politician disclosure screen (off by default). When POLITICIAN_SIGNAL_ENABLED=true, a stage after relative-strength pulls recent US congressional STOCK Act buy disclosures (public House + Senate filings), scores them deterministically (recency, cluster, repeat-buyer, size), and feeds scored candidates into the same analyst funnel. Public-disclosure lag research only — not insider data, not copy-trading. Source feed URL is config-injected so the canonical House Clerk / Senate eFD sources can be swapped in without code changes.


Key Configuration

EXECUTION_PROVIDER=internal_paper   # never alpaca_live
LIVE_TRADING_ENABLED=false
EQUITY_RISK_PCT=0.005
EQUITY_MAX_POSITIONS=12
EQUITY_MAX_SECTOR_PCT=0.35
EQUITY_DAILY_LOSS_LIMIT_PCT=0.05

# Alpaca paper
ALPACA_PAPER=true
ALPACA_BASE_URL=https://paper-api.alpaca.markets
ALPACA_API_KEY_ID=...
ALPACA_SECRET_KEY=...

# Telegram
TELEGRAM_BOT_TOKEN=...
TELEGRAM_CHAT_ID=...
TELEGRAM_ALERT_MODE=critical   # critical | verbose

# LLM
ANTHROPIC_FAST_MODEL=claude-haiku-4-5-20251001
ANTHROPIC_STRONG_MODEL=claude-sonnet-4-6

# Politician disclosure screen (off by default)
POLITICIAN_SIGNAL_ENABLED=false
# Feed URLs default to public House/Senate stock-watcher mirrors; override to
# point at canonical sources. POLITICIAN_HOUSE_URL / POLITICIAN_SENATE_URL

Team

Name Role
Nikolas Sapalidis Lead Developer — architecture, Mantle integration, AI pipeline, frontend, investment strategy
Konstantopoulos Ilias Safety features & stock research
George Apostolakis Investment strategy & Mantle network funding

nikolas.helpmarq.com

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sac_capital-0.1.4.tar.gz (488.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sac_capital-0.1.4-py3-none-any.whl (178.0 kB view details)

Uploaded Python 3

File details

Details for the file sac_capital-0.1.4.tar.gz.

File metadata

  • Download URL: sac_capital-0.1.4.tar.gz
  • Upload date:
  • Size: 488.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sac_capital-0.1.4.tar.gz
Algorithm Hash digest
SHA256 05aea19d309c1bc2f489cd4af73802a64bccb2a482870c2639700449599348db
MD5 6aa26c7e93d3015bfbe4a84391edab2c
BLAKE2b-256 7c82135d9a42c36b0ef77810ef6a92b01433dcef3a8f305d8bdb9a04fa607af3

See more details on using hashes here.

File details

Details for the file sac_capital-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: sac_capital-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 178.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sac_capital-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 81e9b86f0c23a6f3f33723e7ed35717ef4a4b948ceb22493b110a386d3869200
MD5 66543636b1e09bb2fddd02a07ee91f5e
BLAKE2b-256 7b6fdecd2a6cb63bd94b26dfc4115de2fa2625d9f188fb62f4ad5316d073a220

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page