Skip to content

Repository files navigation

📈 StockAgent

Architected & Developed by Dominik

Autonomous financial agent for a curated portfolio of US stocks, ETFs and crypto. It fuses price action with curated financial sentiment, cross-checks an LLM against Alpha Vantage to flag possible manipulation, scores every past prediction against the realised price, and delivers a Polish-language digest email with inline charts, trade signals and its own running hit-rate. The daily schedule is currently paused — it runs on manual workflow_dispatch.

Python 3.12 LangGraph 1.3 Anthropic OpenAI XGBoost Supabase Resend Architecture Quality Gate Coverage

🧠 The Vision: Signal over Noise

In the era of AI-driven information overload, a single price tick is a useless signal — what matters is the covariance of sentiment, news, and historical predictions. This agent treats the market as a system: it pulls clean numerical data, enriches it through a curated financial filter, models hybridly (LLM for reasoning + XGBoost for quantitative inference), and cyclically confronts itself with reality through Self-Reflection. It's not a scraper, and it's not another "GPT predict stocks" — every prediction it makes is recorded, closed against the realised price, and fed back into the next run.

One pass, end to end

price + snapshotself-reflection on the last predictionfundamentalsvolatility gatesentiment + newsLLM cross-validationlocal XGBoost7-persona advisory councilpersist + RAGHTML email.

The gate is the point: below the threshold no paid API is touched at all. A cycle where every symbol was filtered reports zero paid calls, and the report prints that bill.

Documentation

Document What's in it
How it works The eleven pipeline steps, every data source, the symbol and crypto pools, quota monitoring, Risk Watch, and the risk / trade signals
The report email Section-by-section anatomy of what lands in the inbox
Running it Stack, prerequisites, local setup, database migrations, build commands, GitHub Actions, secret management
Configuration Every Settings field with its default, plus the feature flags and what each one costs

Architecture: Hexagonal (Ports & Adapters) + DDD. Domain (pure Python, zero deps) → Application (ports + use cases + LangGraph) → Infrastructure (adapters for API / DB / LLM / ML / email). The dependency arrow flows one way.

Disclaimer

Educational / proof-of-concept project demonstrating expertise in Agentic AI, Hexagonal Architecture, and FinOps. Generated predictions do not constitute investment advice. Make financial decisions at your own risk, after consulting a licensed advisor.

License

MIT

About

Python and LangGraph agent that runs once per trading day over a fixed watchlist of US stocks and ETFs, combines price action with curated news sentiment, flags divergence between the two, scores its own closed predictions and emails a Polish-language digest.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages