Spaces:
Running
Running
Commit History
-
feat(review-gate): stage analyses instead of auto-trading
Cisco PonceImplements the proposal.md 3-layer framework review gate: - InvestmentVerdict gains framework fields (scenarios, sources, data-quality flags, proposed action, review trigger) - Senior Broker prompt requests the structured framework output - portfolio_tracker: submit_analysis / get_pending_reviews / accept_decision / dismiss_decision against the VPS review gate - whale_hunter: discovery stages a watchlist analysis (INITIATE / PENDING / DISCARD) instead of recording a trade or hitting Alpaca - reeval: re-evals submit analyses; only MAINTAIN refreshes the ledger; INCREASE/REDUCE/CLOSE/INITIATE wait for explicit acceptance - vps/schema.sql: analyses + watchlist tables, paper_portfolio.analysis_id2c6cc1b
-
fix: Kelly per-verdict caps, more noise words, higher token limit, Pydantic warning
- Cap Kelly per verdict: STRONG BUY 25%, BUY 15%, WATCH 5% (was flat 25%) - Cap raw Kelly fraction at 0.5 to prevent extreme values from small avg_loss - Add THING, TXTW, MRC, HERE and 20+ more common words to noise filter - Increase structured output max_tokens from 8192 to 16384 - Fix Pydantic warning filter to match by module instead of message string Made-with: Cursor73d6dae -
feat: Sprint 9 — Execution & Quality Control
Pre-Sprint Bug Fixes: - Fix double-header in verdict reports (strip LLM-embedded headers) - Fix structured output token limit (get_structured_llm with max_tokens=4096) - Fix fallback path skipping Kelly (compute position sizing in except block) Epic 1 — Grading Engine: - scripts/build_golden_dataset.py: curate 50 LangSmith traces into Dataset - scripts/evaluators.py: 5 evaluators (catalyst grounding, company identity, format, verdict validity, Kelly math) - scripts/run_evals.py: evaluation runner for LangSmith Experiments Epic 2 — Alpaca Paper Trading: - src/broker/alpaca.py: order router, submission, status tracking - Wire Alpaca execution into portfolio_tracker.py - Update VPS schema + API with order_id, fill_price, broker_status Epic 3 — Intraday Catalyst Triggers: - vps/catalyst_poll.py: polling daemon (volume, price, insider triggers) - GitHub Actions repository_dispatch for catalyst-alert events - whale_hunter.py CATALYST_TICKER env var for single-ticker mode Epic 4 — Multi…645673f
-
fix: cron performance — stale seeds, Kelly cache, ticker noise, SEC timeouts
- Remove 18 dead tickers from seed pools (yFinance 404s), add 11 fresh Canadian micro-caps (pool went from 2 to 13 alive tickers) - Cache Kelly stats for 10 minutes so parallel analyst_node calls don't each trigger expensive live-price lookups for the entire portfolio - Fix missing return statement in get_kelly_stats (returned None when portfolio had >= 5 trades) - Add financial acronyms (ROCE, FTSE, DJIA, etc.) to noise word filter - Tighten SEC EDGAR timeouts (10s search, 10s index, 15s filing) and cap filing download at 2MB - Suppress Pydantic serialization warnings from with_structured_output Made-with: Cursor4438658 -
feat: SEC EDGAR ground truth + Kelly Criterion position sizing (Epic 3 & 4)
Epic 3: Add SEC EDGAR integration that fetches 10-K/10-Q filings via the EFTS search API and extracts MD&A (Item 7) and Risk Factors (Item 1A) sections using BeautifulSoup. Wired into analyst_node for US equities. Epic 4: Implement Kelly Criterion position sizing with win-rate calculation from historical portfolio data. Verdict-based scaling (STRONG BUY 100%, BUY 70%, WATCH 30% of half-Kelly) clamped to 1-25% of portfolio. - New: src/sec_edgar.py (@tool + HTML parser) - New: src/models/kelly.py (KellyStats + calculate_position_size) - Updated: InvestmentVerdict with position_size, kelly_win_rate fields - Updated: record_paper_trade to store position_size - Updated: VPS schema + API to support position_size column Made-with: Cursore813ce3 -
feat: LangGraph best-practices refactor (Sprint 8 Epics 2-3-4)
- Fix state mutation anti-pattern: all 4 workflow agent nodes + debug wrappers now return partial dicts instead of mutating state - Add Annotated reducers (operator.add) to candidates/candidate_scores list fields in AgentState - Replace deprecated set_entry_point / set_conditional_entry_point with START edges across agent.py, whale_hunter.py, workflow.py - Refactor gatekeeper routing to Command pattern, removing separate check_status functions in agent.py and whale_hunter.py - Add InMemorySaver checkpointer to all 3 graph compile() calls with thread_id config on every invoke/ainvoke - Add RetryPolicy(max_attempts=3) to all graph nodes and recursion_limit=30 to all invoke calls - Add InvestmentVerdict Pydantic model (src/models/verdict.py) with structured output via with_structured_output, graceful fallback to plain LLM - Simplify portfolio_tracker verdict parsing when structured_verdict is provided - Clean up requirements.txt: LangChain 1.0 LTS range pinning, remove …d5ba3a3