RepoPilot

virattt / ai-hedge-fund

Search virattt/ai-hedge-fund

GitHub

Code

How virattt/ai-hedge-fund is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Likely public API
  5. Likely start-up file
  6. Likely start-up file
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a New Signal Strategy

  • Create a new Python file in hedge_fund/signals/ (e.g., my_strategy.py) inheriting from Signal base class
  • Implement analyze() method to score securities and return SignalOutput with positions
  • Register the strategy in fund configuration YAML under 'signals' section
  • Add unit tests in hedge_fund/signals/test_my_strategy.py following existing test patterns

Add a New UI Component to Dashboard

  • Create a new file in hedge_fund/tui/ (e.g., my_widget.py) extending textual.widget.Widget
  • Implement render() and binding methods for interactive elements
  • Style using TCSS file hedge_fund/tui/app.tcss or inline CSS
  • Register widget in main app container (app.py) or builder module

Integrate a New LLM Provider

  • Add langchain package dependency to pyproject.toml (e.g., langchain-myai)
  • Create provider implementation in hedge_fund/llm/client.py following existing provider patterns
  • Register provider in hedge_fund/llm/registry.py with model mappings
  • Add unit test in hedge_fund/llm/test_client.py to verify provider integration

Add a New Risk or Portfolio Constraint

  • Define constraint model in hedge_fund/risk/limits.py or extend Limit protocol
  • Implement validation logic in hedge_fund/portfolio/validation.py
  • Add constraint to fund spec YAML under 'risk' or 'portfolio' section
  • Add unit tests in hedge_fund/risk/test_limits.py or hedge_fund/portfolio/test_construction.py

Change the public API

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.

Code quality and hotspots

Largest source files

  • Branch points18 per file on average
  • Code issues1 error, 0 warnings
  • Largest file769 lines
  • Hotspot load0 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CINot detected
  • Tests38 test filesPytest · 0.47 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Test folders: hedge_fund/tui · hedge_fund/pipeline · hedge_fund/data

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.