DEV Community

Cover image for I Built an AI Hedge Fund Analyst Using Claude + EODHD APIs
Kevin Meneses González
Kevin Meneses González

Posted on • Originally published at Medium

I Built an AI Hedge Fund Analyst Using Claude + EODHD APIs

Most people use AI for finance the wrong way.

They open ChatGPT.

They ask: "Should I buy Nvidia?"

And then they expect a useful answer.

But there is one big problem:

AI does not magically know what is happening in the market right now.

It can sound confident. It can write a beautiful explanation. It can even give you a clean bullish or bearish thesis.

But without real financial data, it is mostly guessing.

And guessing is not analysis.

That is why I wanted to build something different.

Not another chatbot. Not another "AI stock picker." Not a toy project.

I wanted to build a small version of what a hedge fund analyst might use every morning: an AI system that can read financial data, analyze news, review fundamentals, detect risks, and generate a useful market summary.

So I built an AI hedge fund analyst using Claude and EODHD APIs.

Here is the step-by-step process.


Step 1: Understand the Real Problem

The problem is not that AI is bad at finance.

The problem is that most AI tools are disconnected from real financial data.

A normal chatbot does not automatically know:

  • the latest price
  • recent volume changes
  • current market news
  • earnings surprises
  • insider transactions
  • valuation metrics
  • revenue growth
  • dividend history

And in finance, outdated data is dangerous. A stock can look attractive based on old numbers. A company can look safe before earnings collapse. A bullish thesis can break after one bad guidance call.

This is the key idea: AI is only as good as the data you give it.

That became the foundation of the project. The goal was simple: connect Claude to real financial data.


Step 2: Define What the AI Analyst Should Do

Before writing code, I defined the role of the system.

I did not want a generic assistant. I wanted something closer to a junior hedge fund analyst.

Its job would be to analyze a stock from multiple angles:

  • Price action
  • Fundamentals
  • Recent news
  • Earnings
  • Risk factors
  • Market sentiment
  • Final summary

The output should not be: "This stock looks good." That is useless.

The output should be structured:

  • Bullish signals
  • Bearish signals
  • Key risks
  • Data-backed observations
  • Final analyst-style summary

A good AI financial analyst should not only give answers. It should show its reasoning based on data.


Step 3: Choose the Data Source

This is where EODHD APIs became useful.

For this type of project, I needed access to different types of financial data from one place.

EODHD gives access to data like:

  • historical prices
  • real-time and end-of-day market data
  • fundamentals
  • news
  • earnings
  • dividends
  • splits
  • insider transactions

That matters because an AI finance system becomes much more powerful when it can combine multiple signals.

Price data alone is not enough. News alone is not enough. Fundamentals alone are not enough.

The value comes from connecting everything. That is when the AI starts to behave less like a chatbot and more like an analyst.


📊 Try EODHD APIs free — One API for historical prices, fundamentals, news, earnings, insider transactions, and more. Everything in this project runs on it.

Step 4: Build the Basic Architecture

The architecture was simple. I did not want to overcomplicate it.

The system had four main parts:

  1. User enters a ticker
  2. Python fetches financial data from EODHD APIs
  3. Claude analyzes the structured data
  4. The result is displayed in a dashboard

You can make this more advanced later with:

  • Streamlit dashboard
  • Telegram alerts
  • Scheduled reports
  • Database storage
  • MCP server
  • Email summaries
  • Portfolio tracking

But the first version should be simple. Simple systems get finished. Overcomplicated systems die in Notion.


Step 5: Fetch Market Data

The first signal is price action.

For each ticker, I wanted to know:

  • current price
  • recent performance
  • volatility
  • trend
  • volume changes
  • important price movements

This gives Claude context. Instead of asking: "Analyze Apple stock." — you are giving it something more useful: "Analyze Apple stock using this recent market data."

That small difference changes everything. The AI stops hallucinating and starts interpreting.


Step 6: Add Fundamentals

Price tells you what the market is doing. Fundamentals tell you what the business is doing.

So the next step was to collect company fundamentals:

  • revenue
  • earnings
  • profit margins
  • debt
  • valuation ratios
  • cash flow
  • dividend data

This is where the analysis becomes more serious. For example, Claude can compare:

  • revenue growth vs valuation
  • margins vs debt
  • dividend yield vs payout ratio
  • earnings growth vs stock performance

That is much better than a generic AI opinion. Now the model has actual business data to work with.


Step 7: Add News Sentiment

Markets move because of stories.

Earnings matter. Interest rates matter. Regulation matters. Product launches matter. Management changes matter.

So I added recent news data. This allows the AI analyst to answer questions like:

  • What is the current market narrative?
  • Are recent headlines positive or negative?
  • Is the stock moving because of news or technical momentum?
  • Are there hidden risks in recent articles?

This is one of the most useful parts of the system. Because investors often look at the chart — but forget to ask: "Why is this moving?"

News gives the AI the missing context.


Step 8: Add Earnings Data

Earnings are where reality punches narratives in the face.

A company can have a beautiful story. But if earnings disappoint, the market reacts.

So I added earnings-related data. The AI analyst can now review:

  • EPS trends
  • earnings surprises
  • revenue expectations
  • past earnings reactions
  • future earnings dates

This creates much better summaries. For example:

"The stock has strong momentum, but the next earnings report is a major risk because recent EPS growth has slowed."

That is the type of insight you want. Not perfect. Not financial advice. But useful.


Step 9: Add Insider Transactions

This is one of the most interesting signals.

Most retail investors ignore insider activity. But it can be valuable context.

If executives are buying shares, that may signal confidence. If insiders are selling heavily, it does not always mean something bad — but it is worth noticing.

The AI can summarize:

  • recent insider buys
  • recent insider sells
  • transaction size
  • patterns over time

This makes the analysis feel much more professional. Because now the system is not only looking at charts. It is looking at behavior. And behavior often says more than words.


Step 10: Create the Claude Prompt

This is where everything comes together. The prompt is the brain of the system.

Here is a simple version:

prompt = f"""
You are an AI hedge fund analyst. Analyze the following stock using the data provided.

Ticker:
{ticker}

Market Data:
{market_data}

Fundamentals:
{fundamentals}

Recent News:
{news}

Earnings:
{earnings}

Insider Transactions:
{insider_transactions}

Return the analysis in this structure:
1. Executive Summary
2. Bullish Signals
3. Bearish Signals
4. Key Risks
5. News Sentiment
6. Fundamental Analysis
7. Final Analyst View

Important:
- Do not make up data.
- Only use the information provided.
- Be clear and concise.
- Mention uncertainty when data is incomplete.
"""
Enter fullscreen mode Exit fullscreen mode

This is important: you must tell the model not to invent data. Finance is not the place for creative writing. Unless you enjoy losing money with poetry.


📊 Try EODHD APIs free — One API for historical prices, fundamentals, news, earnings, insider transactions, and more. Everything in this project runs on it.

Step 11: Generate the Analyst Report

Once Claude receives the structured data, it can generate a report like:

Executive Summary:
Apple shows stable fundamentals, but recent revenue growth appears limited
compared to its valuation.

Bullish Signals:
- Strong margins
- Consistent cash flow
- Positive recent news sentiment
- Stable long-term trend

Bearish Signals:
- High valuation
- Slower growth
- Potential earnings risk
- Insider selling activity

Final View:
The stock remains high quality, but the current valuation requires strong
future execution.
Enter fullscreen mode Exit fullscreen mode

This is much more useful than: "Apple is a strong company." Everyone knows that.

The goal is not to state the obvious. The goal is to connect signals.


Step 12: Build a Simple Dashboard

The next step is visual. A good dashboard makes the project feel real.

You can build it with:

  • Streamlit
  • Plotly
  • Python
  • EODHD APIs
  • Claude API

Basic dashboard sections:

  • Ticker input
  • Price chart
  • Key metrics
  • News summary
  • AI analyst report
  • Risk score
  • Final summary

This makes the article much stronger visually. Readers love seeing the actual system — not just theory. Screenshots are your best friend here.


Step 13: Automate the Workflow

Once the system works manually, you can automate it.

For example, every morning the system can:

  • Check your watchlist
  • Fetch fresh market data
  • Analyze news
  • Detect unusual movements
  • Generate an AI summary
  • Send the report by email or Telegram

This turns the project from "cool demo" into "real productivity tool."

And that is where the article becomes more powerful. Because the reader thinks: "I could actually use this."

That is the sweet spot.


Step 14: The Big Lesson

The most important lesson was not about Claude. It was not about Python. It was not even about finance.

The real lesson was this: AI becomes useful when you connect it to the right data.

Without data, AI gives opinions. With data, AI can generate analysis. That is the difference.

Most people are still using AI like a smarter Google search. But the real opportunity is building systems:

  • Systems that collect data
  • Systems that analyze information
  • Systems that summarize complexity
  • Systems that help you make better decisions

Final Thoughts

This project changed how I think about AI in finance.

The future is not just asking a chatbot: "What stock should I buy?" That is too simple.

The future is building AI systems that monitor markets, analyze data, detect signals, and help humans think better. Not replace thinking — improve it.

And for that, you need two things:

  • A strong AI model
  • Reliable financial data

Claude gives you the reasoning layer. EODHD APIs give you the financial data layer.

Together, they allow you to build something much more interesting than another stock dashboard. You can build your own AI financial analyst.

Not perfect. Not magic. But useful.

And in a world full of noisy financial content, useful is already a massive advantage.


📊 Try EODHD APIs free — One API for historical prices, fundamentals, news, earnings, insider transactions, and more. Everything in this project runs on it.

Looking for technical content for your company? I can help — LinkedIn · kevinmenesesgonzalez@gmail.com

Top comments (0)