Differences Between Value Investing and Growth Investing Agents in AI Hedge Fund

Value investing agents analyze annual financial fundamentals and balance-sheet safety using LLM-generated narratives, while growth investing agents calculate weighted scores from trailing-twelve-month metrics and insider trends without LLM prompting.

The virattt/ai-hedge-fund repository implements these two distinct philosophies as separate analyst agent families. Understanding their architectural differences helps you select the right strategy for backtesting or live signal generation.

Core Philosophy and Data Sources

The fundamental divide begins with the metrics each agent family prioritizes and the temporal window of data they consume.

Value Investing Philosophy

Value agents in src/agents/ben_graham.py and src/agents/warren_buffett.py focus on intrinsic value and margin of safety. They seek stocks trading below their calculated worth based on conservative balance-sheet health.

Key valuation metrics include:

  • Graham Number and Net-Current-Asset-Value (NCAV) comparisons
  • Debt-to-equity thresholds and current ratio requirements (typically ≥ 2)
  • PEG ratios below 2 combined with earnings stability checks

These agents request period="annual" data from the financial metrics API, emphasizing long-term fundamental strength over recent fluctuations.

Growth Investing Philosophy

The src/agents/growth_agent.py module implements a momentum and acceleration model. Rather than hunting for cheap assets, it scores companies based on expanding operations and market enthusiasm.

Key metrics include:

  • Revenue and EPS growth rates over trailing periods
  • PEG < 1 and price-to-sales (P/S) ratios
  • Margin expansion trends (gross, operating, and net)
  • Insider conviction via recent buying activity

This agent uses period="ttm" (trailing twelve months) with a 3-year lookback window to capture recent acceleration patterns rather than historical annual averages.

Implementation Architecture

Both agent families integrate into the LangGraph-based workflow through a common AgentState interface, but their internal pipelines diverge significantly.

Shared Infrastructure

All agents receive an AgentState object containing:

  • data["tickers"]: List of symbols to analyze
  • data["end_date"]: Analysis cutoff date
  • data["analyst_signals"]: Shared dictionary for accumulating results

Both update a shared progress UI via src/utils/progress.py and write final signals to state["data"]["analyst_signals"] before returning a HumanMessage with JSON-encoded analysis.

Value Investing Implementation

Value agents follow a sub-analysis aggregation pattern. In src/agents/ben_graham.py, the pipeline calls discrete helper functions:


# From src/agents/ben_graham.py

earnings_score = analyze_earnings_stability(financial_data)
strength_score = analyze_financial_strength(balance_sheet)
valuation_score = analyze_valuation_graham(metrics)

Each helper returns a 0-5 integer score. The agent sums these components (maximum ~15 points) and maps the total to bullish/neutral/bearish thresholds.

Uniquely, value agents utilize src/utils/llm.py via call_llm() wrapped in a ChatPromptTemplate. The LLM generates reasoning in the voice of the investor (e.g., Benjamin Graham) and returns a structured BenGrahamSignal Pydantic model containing the final signal and confidence percentage.

Growth Investing Implementation

The growth agent (src/agents/growth_agent.py) implements a weighted composite scoring system without LLM invocation:


# Conceptual flow from src/agents/growth_agent.py

scores = {
    "growth": analyze_growth_trends(metrics) * 0.40,
    "valuation": analyze_valuation(metrics) * 0.25,
    "margins": analyze_margin_trends(metrics) * 0.20,
    "insider": analyze_insider_conviction(trades) * 0.10,
    "health": check_financial_health(metrics) * 0.05
}
total_score = sum(scores.values())

The agent applies explicit thresholds: > 0.6 → bullish, < 0.4 → bearish, otherwise neutral. Reasoning is assembled locally into a dictionary rather than generated by an LLM, then encoded to JSON within a HumanMessage.

Scoring Methodologies and Signal Generation

The divergence in decision logic reflects their opposing investment philosophies.

Value Agent Scoring

Value agents employ simple additive scoring:

  • Earnings stability: 0-5 points
  • Financial strength: 0-5 points
  • Valuation gap: 0-5 points

The raw sum determines the signal strength. The call_llm function then translates these numerical inputs into natural language reasoning that mimics the target investor's historical writing style.

Growth Agent Scoring

The growth agent uses percentage-based weighting:

  • 40% Historical growth trends (revenue/EPS acceleration)
  • 25% Growth valuation (PEG, P/S ratios)
  • 20% Margin trend analysis (expansion vs. contraction)
  • 10% Insider conviction (buying patterns)
  • 5% Financial health (sanity checks)

This weighted approach prioritizes momentum indicators over balance-sheet conservatism.

Practical Code Examples

Running a Value Investing Agent (Ben Graham)

from src.graph.state import AgentState
from src.agents.ben_graham import ben_graham_agent

state = AgentState(
    data={
        "tickers": ["AAPL", "MSFT"],
        "end_date": "2024-08-01",
        "analyst_signals": {}
    },
    metadata={"show_reasoning": True}
)

result = ben_graham_agent(state)
print(result["messages"][0].content)

# Output: {"signal": "bullish", "confidence": 78, "reasoning": "NCAV > market cap..."}

This invokes the full LLM pipeline defined in src/agents/ben_graham.py, generating Graham-style narrative analysis alongside the numerical signal.

Running the Growth Investing Agent

from src.graph.state import AgentState
from src.agents.growth_agent import growth_analyst_agent

state = AgentState(
    data={
        "tickers": ["TSLA", "NVDA"],
        "end_date": "2024-08-01",
        "analyst_signals": {}
    },
    metadata={"show_reasoning": True}
)

result = growth_analyst_agent(state)
print(result["messages"][0].content)

# Output: {"signal": "bullish", "confidence": 85, "reasoning": {"historical_growth": ...}}

The growth agent executes local calculations in src/agents/growth_agent.py without calling src/utils/llm.py, producing a structured reasoning dictionary instead of natural language prose.

Summary

  • Value agents (src/agents/ben_graham.py, src/agents/warren_buffett.py) analyze annual fundamentals, prioritize NCAV and Graham Number valuations, and use LLM prompts to generate narrative reasoning.
  • Growth agents (src/agents/growth_agent.py) consume TTM metrics over 3-year windows, weight revenue growth (40%) and margins (20%) heavily, and calculate signals locally without LLM calls.
  • Value scoring uses simple additive 0-5 scales; growth scoring uses weighted percentages with explicit 0.6/0.4 thresholds.
  • Both write results to state["data"]["analyst_signals"] and return HumanMessage objects compatible with the backtesting engine in src/backtesting/engine.py.

Frequently Asked Questions

Which agent type performs better during market downturns?

Value investing agents typically exhibit more defensive characteristics during downturns due to their emphasis on balance-sheet strength, current ratios ≥ 2, and NCAV discounts. The growth agent's reliance on momentum metrics and insider conviction may generate false signals when broad market sentiment turns negative regardless of individual company expansion.

Can I combine both value and growth agents in a single backtest?

Yes. The AgentState architecture in src/graph/state.py supports multiple analyst signals simultaneously. You can instantiate both ben_graham_agent and growth_analyst_agent within the same graph workflow; each writes independently to state["data"]["analyst_signals"] using their respective ticker keys, allowing the portfolio manager node to weigh conflicting signals.

What specific API endpoints do these agents consume?

Both families use functions from src/tools/api.py, specifically get_financial_metrics and get_insider_trades. Value agents pass period="annual" to retrieve year-end fundamentals, while the growth agent passes period="ttm" and limit=12 to fetch monthly trailing-twelve-month calculations for the last three years.

How do confidence scores differ between the two agent types?

Value agents derive confidence from the LLM's assessment of the additive score magnitude (e.g., 12/15 points = 80% confidence) as processed through the BenGrahamSignal Pydantic model. The growth agent calculates confidence as a direct percentage of the weighted composite score (e.g., 0.85 total = 85% confidence) without LLM interpretation, making its confidence metric purely quantitative.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →