Agentic Workflow

Agentic Portfolio Analyst

ROLE

Virtual Investment Analyst

EXPERTISE

FinTech Automation

YEAR

2025

Project Description

Project Description

Project Description

An automated portfolio intelligence engine designed to eliminate emotional bias from capital allocation decisions.

Utilizing GPT-5's multimodal vision capabilities, this workflow parses unstructured data (portfolio screenshots) via an OCR pipeline, mapping current holdings against a proprietary 'Q-Score' algorithm.

The system autonomously calculates drift, identifies rebalancing opportunities, and generates high-frequency buy/sell directives based on strict quantitative logic rather than sentiment.

This agentic workflow, represented by the command "Workflow(StockAdvisor:$AMOUNT)" is a prototype that ingests your latest holdings from screenshots or its DB, builds a baseline, and tags each position into buckets (e.g, Tech, Innovation, Index, Energy, Real Assets, Crypto).

It expands a curated stock/etf candidate universe, applies hard eligibility screens (if desired), and scores picks with QScore (Quality 40%, Valuation 30%, Momentum 20%, Risk 10%).

Using targets determined by the user (e.g., Tech 58%, Innovation 8%, Index 18%, Energy 5%, Real Assets 6%, Crypto 5%), it prioritizes under-target buckets and allocates exactly the amount written in the command (e.g., $100) across top names (min ticket size; no adds to over-target buckets unless signals justify).

It outputs an orders CSV, a deck with slides detailing a Sector Bar, Allocation by Bucket + ticker legend, 30-yr projection dot graph, This Week’s Orders (with QScore explainer), and a Why This Pick slide (3-4 quant+qual lines per pick), plus a summary PDF.

Canonical runs log to weeklystockadvisor.db and ask if you executed the orders (updating holdings if yes).

A0 · Screenshot Ingest Agent (optional but prioritized)

If you attach holdings screenshots with the command, A0 extracts positions → builds positions_latest.csv (Ticker, Shares, Price, Value).

OCR-first (best effort), then normalization; creates a small QA summary.

If no screenshots, the flow falls back to the latest DB snapshot (canonical runs) or prior CSV baseline (tests).

A1 · Baseline Builder

Loads positions_latest.csv (or DB fallback), calculates Pre-Execution Baseline (excludes SPAXX), and tags each holding into buckets.



A2 · Universe & Eligibility Agent

Starts from your current holdings + a broadened, curated universe (Tech, Innovation/Biotech, Energy/Nuclear, Precious Metals/Real Assets, Nasdaq/Index, Crypto proxy).

Applies hard filters (e.g., price ≥ $5, basic liquidity, rough quality/sanity checks).

Honors permanent exclusions from picks (e.g., VOO/IJH/IJR/IXUS; MMFs).



A3 · Signals Agent (framework in place; live hooks ready)

Gathers or placeholders Momentum and Earnings timing context for candidates (used in rationale and tie-breaks).

Today the allocator doesn’t depend on live momentum to function, to avoid potential API costs, but the slide/rationale will reflect signal availability and is designed to plug into live data later.



A4 · QScore & Ranking Agent

Computes a composite QScore (0–100) per candidate:

Quality (40%) — ROIC, margin trend (durability and execution).

Valuation (30%) — EV/Sales/reasonableness vs peers or null (for index/trusts).

Momentum (20%) — basic up/down bias or neutral when unavailable (expandable to live).

Risk (10%) — leverage/ND/EBITDA sanity, proxy risk where applicable.

Produces a rank-ordered list per bucket.



A5 · Targeting & Allocation Engine

Uses targets based on portfolio e.g., Tech 58%, Innovation 8%, Index 18%, Energy 5%, Real Assets 6%, Crypto 5%.

Computes gaps (Target − Actual) from your baseline and prioritizes under-target buckets.

Allocates exact $AMOUNT with:

Minimum size (prevents $2 dust buys).

No adds to over-target buckets unless strong signals justify (guardrail).

Caps on Crypto/Real Assets adds unless compelling signals appear.

Picks top QScore name within each under-target bucket and sizes orders to hit the exact dollar total (last line auto-absorbs any rounding).



A6 · Orders Builder & Rationale Agent

Outputs a clean orders table (Ticker, Bucket, Price, Shares, Cost, QScore).

Writes a “Why This Pick” rationale (3–4 lines each, quant + qual):

Quant: quality/valuation snapshots (e.g., ROIC, margins, EV/Sales, QScore).

Qual: role in the portfolio (gap-filling vs. growth tilt), macro considerations, risk notes.

Adds an Orders slide QScore explainer line: “Quality 40%, Valuation 30%, Momentum 20%, Risk 10%.”

A7 · Visualization & Deck Agent

Charts (PNG):

Sector/Theme Exposure: sorted horizontal bar, groups <3% into “Other.”

Allocation by Bucket: bars (Actual vs Target) + right-side ticker legend and a standard legend box.

30-Year Projection: dot plots every 3 years: red (Bull 14%), blue (Neutral 8%), black (Bear 2%).

Deck (PPTX):

Titles set to 38pt; slide-safe layouts to avoid overflow.

Includes Cover, Allocation by Bucket (with legend), Sector Bar, 30-Year Projection, This Week’s Orders (with QScore line), and Why This Pick slides.

Summary (PDF) and Orders CSV produced alongside parsed A0 CSV.



A8 · Persistence & Post-Run Update Agent (canonical runs only)

Logs run metadata to weeklystockadvisor.db (date/time, baseline, orders, rationales, charts/deck paths).

Asks if you executed the orders. If you say yes, it updates holdings in the DB so the next baseline reflects the new shares/cost basis.

TEST runs (runs initiated by prefixing test to the command to form testWorkflow(StockAdvisor$AMOUNT) do not write to DB or increment run counters; artifacts are labeled “TEST”.