How chienwosu/finsignal works
FinSignal is a synthetic-portfolio monitoring app that checks policy, simulates rebalance or contribution recommendations, and presents a decision brief only when attention is needed. The Streamlit UI also displays portfolio and policy status directly. The deterministic analysis runs before optional language polishing; no trades are executed. Edges follow the sampled UI, orchestration, and tool code plus the README architecture. The README documents the Strands agent’s tool orchestration; the sampled source does not show its internal dispatch behavior in detail.
Main entry points: agent.py Agent runner · portfolio.py Portfolio loader · app.py Streamlit UI · schemas.py Domain schemas
Components 14
Investor interface
- Streamlit UI
app.py
Agent orchestration
- Agent runner
src/agent.py - Prompt builder
src/prompts.py
Deterministic analysis
- Portfolio loader
src/tools/portfolio.py - Policy checks
src/tools/constraints.py - Trade simulation
src/tools/allocation.py - Decision evaluator
src/tools/decisions.py - Domain schemas
src/models/schemas.py
Synthetic inputs
- Holdings data
data/portfolio.json - Policy data
data/policy.json - Scenario data
data/scenarios.json - Investor persona
data/persona.json
Other components
- Investor
- Language model
Connections 21
- Investor → Streamlit UI: selects scenario
- Streamlit UI → Portfolio loader: loads display data
- Streamlit UI → Policy checks: checks policy
- Streamlit UI → Agent runner: requests analysis
- Agent runner → Portfolio loader: loads portfolio
- Agent runner → Portfolio loader: loads policy
- Agent runner → Policy checks: checks rules
- Agent runner → Trade simulation: simulates rebalance
- Agent runner → Trade simulation: allocates contribution
- Agent runner → Decision evaluator: evaluates results
- Agent runner → Prompt builder: builds prompt
- Prompt builder → Investor persona: reads persona
- Agent runner → Language model: polishes brief
- Portfolio loader → Holdings data: reads holdings
- Portfolio loader → Scenario data: reads scenarios
- Portfolio loader → Policy data: reads policy
- Streamlit UI → Investor: shows brief
- Portfolio loader → Domain schemas: creates models
- Policy checks → Domain schemas: returns results
- Trade simulation → Domain schemas: returns trades
- Decision evaluator → Domain schemas: returns brief