Trader Advisor — agentic stock research

Personal
Agentic AI
LLMs
An LLM agent that researches stocks by autonomously calling tools — picks its own data sources during investigation, with workflow pipelines for comparison. Live on Hugging Face Spaces.
Published

May 1, 2026

Personal project · 2026

Idea

A production-style LLM agent: a hand-rolled tool-calling loop with quota control, structured-output parsing, and failure recovery across eleven tools — plus an evaluation path comparing agent vs. workflow-pipeline modes. Runs locally on various models (Qwen3.6, Gemma4, Llama3.3-70B, GPT-OSS:120B, etc.) via Ollama with a Streamlit dashboard.

Implementation

  • Agent loop — hand-rolled tool-calling loop, no LangChain or LangGraph. Persistent message history, ephemeral system prompt rebuilt each turn with the current call budget, force-finalize on budget exhaust via tool_choice="none". Eleven tools span price action, technical indicators, fundamentals, options flow, insider transactions, news, sector comparisons, and social sentiment.
  • Other modessolo is one LLM call with all data dumped in (baseline). Core is a three-step adversarial workflow (analyst → challenger → synthesizer); flips ~30% of solo’s verdicts. Full wraps the open-source TradingAgents framework for a seven-agent debate.
  • Inference — primary path is locally hosted gpt-oss:20b via Ollama on a single RTX 3090 (24GB). Provider-pluggable: provider abstraction designed for Anthropic, OpenAI, and Google Generative AI; primary deployed path is Ollama.
  • Frontend — Streamlit dashboard with three tabs (Overview, Run Explorer, About) and a modal-driven run configurator. The agent trace renderer shows each step’s reasoning, the tool called, and the truncated tool result — legible as a journal of the investigation.
  • Persistence — every run journaled to SQLite: prompts, tool calls, token cost, runtime, decision rationale.

Demo

Hugging Face Spaces →

The deployed demo runs in read-only mode (pre-loaded analyses, live runs disabled because the agent needs Finnhub, Alpha Vantage, and an LLM key). The Run Explorer tab and agent trace viewer are fully interactive over the pre-loaded data.

Stack

Python, Ollama, Streamlit, SQLite, Plotly. Provider abstraction designed for Anthropic, OpenAI, and Google Generative AI; primary deployed path is Ollama.

GitHub repository →