PROJECT 03 / 18FINANCIAL RESEARCHRUST

Released · v0.2.2

Resen.

A financial research desk that keeps the evidence attached.

1model invocation per research run
6maximum assets per request
SQLitelocal research archive
01 / IDEA02 / SYSTEM03 / PLAYGROUND04 / DECISIONS05 / SOURCE
01 / THE IDEA

A closer look.

A terminal-native research workspace built in Rust. It gathers market history, filings, macro observations and search excerpts into a timestamped source ledger, then streams a memo from a model you choose. Research, charts, historical studies and a local archive share one executable.

A research answer is only as useful as the evidence behind it. Resen makes the chain from source to memo visible, while keeping provider failures, synthetic demos and historical-study assumptions explicit.

01

An evidence ledger, not a blank chat

Daily OHLCV, imported CSV history, SEC filing indexes and selected XBRL facts, FRED observations and search excerpts become numbered Source records with retrieval and observation timestamps.

02

Bring your own intelligence

Native streaming adapters support OpenAI-compatible and Anthropic endpoints. Codex and Claude CLI adapters run as constrained model harnesses, with general execution paths disabled.

03

A durable terminal workspace

Ratatui panes, watchlists, command palette and cancellable jobs sit over SQLite research storage. Interrupted runs are recovered on startup; memos export to Markdown and JSON.

04

A transparent strategy lab

A local SMA study exposes assumptions. Separate Python/C# LEAN scaffolds and QuantConnect result access connect research to an explicit historical workflow without placing orders.

02 / UNDER THE SURFACE

From evidence to a source-linked memo

Follow a research run through bounded collection, streaming synthesis and durable storage.

DRAG TO PAN · SELECT A NODE · + / − TO ZOOM

Read the architecture as text
  1. Research request — ResearchRequest carries a workflow, symbols, question and optional prior memo. The selected workflow changes which evidence is gathered.
  2. Connections — Config and Secrets select the model and available data services. Environment credentials take precedence over local saved credentials.
  3. Provider preflight — validate_ready checks the selected hosted provider before evidence collection, preventing a data-gathering run that cannot synthesize.
  4. Market history — DataClient obtains daily OHLCV from a selected provider or local import. market_source converts the series into a source record.
  5. Filings + facts — SEC filing indexes and selected company facts preserve reporting periods, units and filing dates. These are evidence excerpts, not full-filings analysis.
  6. Search + macro — The research executor gathers search context. Macro requests also query FEDFUNDS, CPIAUCSL, UNRATE and DGS10, recording individual failures.
  7. Numbered ledger — add_source appends numbered evidence records and emits progress events. If every source fails, execute returns without calling the model.
  8. Prompt boundary — build_prompt serializes source IDs, origin URLs, timestamps and excerpts. It labels prior memo and source ledger as untrusted context; prior text is limited to 12,000 characters.
  9. Selected model — generate dispatches to the configured native or CLI adapter. One invocation synthesizes the collected source ledger.
  10. Delta stream — An unbounded Tokio channel receives ModelEvent updates. tokio::select! drives generation and forwards deltas, draining queued output before completion.
  11. Citation check — validate_citations checks whether numbered references exist in the ledger and warns if citations are missing or out of range. It does not verify the truth of an interpretation.
  12. SQLite archive — Store persists research state and recovers interrupted runs. The archive retains memo, source ledger, provider identity and demo provenance.
  13. Research desk — The terminal workspace shows memo, sources, phase and warnings beside charts. Evidence origin remains available for inspection.
  14. Historical study — simulate implements the local SMA study. LEAN scaffolding and cloud backtest results are separate paths with their own external requirements.
03 / INTERACTIVE STUDY

Build a source ledger

Adjust a synthetic research request. Watch successful evidence determine whether the synthesis stage can run.

CHANGE THE INPUTS

Illustrative flow only. No market data, financial predictions or model calls are made. Actual request counts depend on configured providers; zero successful sources prevents synthesis.

ILLUSTRATIVE MODELLIVE

04 / ENGINEERING CHOICES

Why it works this way.

01

Keep source identity in the data model

Source IDs, URLs, retrieval times and observation dates travel with each run. This makes a reference inspectable, but citation validation only checks membership in the ledger.

02

Separate demonstrations from live evidence

Demo mode is offline and synthetic; its label persists in exports and archives. Live provider failures never silently become demo values.

03

Bound model work

Research gathers evidence first and invokes the model once. This constrains the execution path and makes a failed evidence collection visible before generation.

05 / OPEN THE SOURCE

Trace it back.

Implementation details, examples, and project documentation.

Scope & limitations

  • Market observations are end-of-day; snippets and selected SEC facts are not complete articles or filings. A valid citation ID does not establish that the model interpreted it correctly.
  • The app does not place orders. Local historical studies, LEAN execution and QuantConnect access have distinct assumptions and dependencies. Saved local credentials are permission-restricted but not encrypted.

Architecture and descriptions reflect the linked repository snapshot. The playground explains a mechanism; it does not execute the repository or report measured performance.