Inspiration

The financial world is filled with data—SEC filings, real-time news, historical prices—making it overwhelming for any single analyst to digest it all. I was inspired to democratize high-level financial research by building an autonomous team of AI agents that could work tirelessly, just like a top-tier Wall Street firm, but accessible to anyone. The goal was simple yet ambitious: create a "Stock Analysis Crew" that doesn't just summarize data but reasons about it, providing actionable investment recommendations.

What it does

Building this project taught me that the true power of AI lies not just in a single model, but in agentic orchestration. Role Specialization Matters: Just like humans, AI agents perform better when given specific roles (e.g., "Research Analyst" vs. "Investment Advisor"). Tool Use is Key: Giving agents access to real-time tools—like an SEC scraper or a calculator—transforms them from passive text generators into active problem solvers. Local vs. Cloud: I learned the intricacies of running fully local LLM stacks using Ollama to ensure data privacy and zero inference costs, which is crucial for financial data.

How we built it

I utilized the CrewAI framework to orchestrate a team of three specialized Python agents: The Research Analyst: Equipped with the YutoriNewsTool and ScrapeWebsiteTool, this agent scours the web for the latest news and sentiment, acting as the eyes and ears of the operation. The Financial Analyst: This agent dives deep into the numbers. Using SEC10QTool and SEC10KTool, it accesses and parses complex government filings to extract raw financial health indicators. The Investment Advisor: Synthesizing the qualitative findings from the researcher and the quantitative data from the analyst, this agent formulates a final recommendation. The system runs on a local LLM (Llama 3.1) via Ollama, with nomic-embed-text for memory embeddings, ensuring the entire pipeline is private and robust. Beyond static analysis, I implemented a continuous monitoring loop that allows the agents to run indefinitely, scanning for breaking news and automatically generating updated reports whenever significant market events occur.

Challenges we ran into

The "Cloud" Trap: Initially, reliance on cloud-based search tools broke the local-first philosophy. I had to refactor the toolset to ensure every component, from embeddings to inference, could run without external dependencies where possible. Handling Bureaucracy: Accessing SEC filings programmatically is tricky due to strict rate limiting and User-Agent policies. I implemented a strategy to rotate User-Agents (random.choice(USER_AGENTS)), ensuring our bots played nice with government servers. Agent Coordination: Getting agents to actually talk to each other rather than talking past each other required fine-tuning their goal definitions and backstories in agents.yaml.

Accomplishments that we're proud of

I successfully engineered a fully autonomous financial analysis pipeline that runs 100% locally.

Privacy-First Architecture: By integrating Ollama with local llama3.1 and nomic-embed-text, I ensured sensitive financial strategies never leave the user's machine. Robust Tooling: I conquered the challenge of parsing complex SEC EDGAR filings, turning raw regulatory text into structured data that our agents can reason about. Real-Time Intelligence: I bridged the gap between static analysis and dynamic market events by adding a real-time news monitoring capability, allowing the crew to react to breaking news instantly.

What we learned

Building this project taught us that the true power of AI lies not just in a single model, but in agentic orchestration. Role Specialization Matters: Just like humans, AI agents perform better when given specific roles (e.g., "Research Analyst" vs. "Investment Advisor"). Tool Use is Key: Giving agents access to real-time tools—like an SEC scraper or a calculator—transforms them from passive text generators into active problem solvers. Local vs. Cloud: I learned the intricacies of running fully local LLM stacks using Ollama to ensure data privacy and zero inference costs, which is crucial for financial data.

What's next for Personal Investment Advisor

I plan to evolve this from an analysis tool into a comprehensive wealth management assistant. Multi-Ticker Portfolio Management: expanding the crew to monitor and balance an entire portfolio rather than just single stocks. Quantitative Integration: incorporating technical analysis indicators (RSI, MACD) alongside the current fundamental analysis for more well-rounded recommendations. User-in-the-Loop Feedback: implementing a feedback mechanism where the user can critique the crew's logic, allowing the agents to learn and adapt their strategies over time. Web Dashboard: building a sleek React/Next.js frontend to visualize the agents' real-time thought processes and reports. Personalized Reporting: generating tailored investment reports that align with users' implicit interests or explicitly provided portfolios.

Built With

  • antigravity
  • crewai
  • macroscope
  • ollama
  • python
  • yutori
Share this project:

Updates