Build stock-deep-evaluation v1: single-stock equity evaluation app
Next.js 15 + TypeScript app implementing the fully-specced first change. Pipeline: resolve -> market data -> pure evaluation engine -> budget guard -> analysis agent -> report. - market-data: DataProvider interface, offline FixtureProvider (DE/SPY seeded from the reference example), FmpProvider (FMP free tier), TTL cache + retry. - technicals: pure MA/volatility/swing/52-week math. - evaluation: instrument-aware pure engine; equity branch built, ETF gated to "not yet supported". Reproduces the DE example (P/E 34.5, fwd 29.3, $167.6B). - agent: AnalysisAgent interface; default Claude Code CLI transport (headless, subscription-backed, web-grounded), Anthropic API alternate via config. - cost-controls: price table, spend store, monthly budget guard. - UI: ticker search + deep-dive toggle, report view, price chart with marked entry/exit/stop levels, cost/budget display, ETF/not-found states. 31 vitest tests, typecheck, production build, and lint all pass. Verified end-to-end via the API for DE, SPY, and an unknown ticker. Live Claude CLI agent test is the documented pick-up point (see README). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# Copy to .env.local and fill in. .env.local is gitignored and never sent to the browser.
|
||||
|
||||
# --- Analysis agent transport ---
|
||||
# "claude-cli" (default): runs the local Claude Code CLI in headless mode on your
|
||||
# existing Claude auth (e.g. subscription). No API key needed; near-zero marginal
|
||||
# cost for internal use. Requires `claude` to be installed and authenticated.
|
||||
# "api": uses the Anthropic API via @anthropic-ai/sdk (metered). Use this if the
|
||||
# app will serve external users.
|
||||
AGENT_TRANSPORT=claude-cli
|
||||
|
||||
# Anthropic API key — only used when AGENT_TRANSPORT=api. Server-side only.
|
||||
ANTHROPIC_API_KEY=
|
||||
|
||||
# --- Market data ---
|
||||
# Which market-data provider to use: "fixture" (offline demo data) or "fmp".
|
||||
# Defaults to "fixture" when unset so the app runs with zero configuration.
|
||||
MARKET_DATA_PROVIDER=fixture
|
||||
|
||||
# Market-data provider API key (default provider: Financial Modeling Prep free tier).
|
||||
# Get a free key at https://site.financialmodelingprep.com/developer/docs
|
||||
MARKET_DATA_API_KEY=
|
||||
|
||||
# --- Cost controls ---
|
||||
# Optional monthly spend budget in USD for the cost guard. 0 or unset = disabled.
|
||||
# (With the claude-cli transport on a subscription, reported marginal cost is ~$0.)
|
||||
MONTHLY_BUDGET_USD=0
|
||||
Reference in New Issue
Block a user