Turn investment ideas into structured, repeatable research.
FactorForge helps quantitative researchers move from a question and supporting papers to an explicit strategy, a controlled experiment and an inspectable research decision. It brings source selection, model interpretation, execution rules and research memory into one workflow, so the reasoning behind a strategy stays connected to its inputs.
Open the demo · Documentation · Run research
Watch the recording. The demonstration follows a recorded research journey through source selection, extraction, strategy compilation and an execution decision. It uses authored example inputs and saved model output.
Investment research spans papers, data transformations, strategy definitions and backtests. When those steps live in separate notebooks and conversations, assumptions are difficult to trace and work is difficult to resume. FactorForge preserves that context and makes execution policy explicit throughout the research process.
- Source-grounded research: discover literature, admit reviewed source pages and preserve citations alongside structured model interpretations.
- Strategy construction: compile typed hypotheses and combine compatible source strategies using explicit weights and shared execution assumptions.
- Controlled experiments: enforce point-in-time data access, costs, funding rules, corporate actions and process boundaries before accepting an execution outcome.
- Durable workflows: resume research with PostgreSQL-backed LangGraph checkpoints, bounded operation budgets and stable request identities.
- Research memory: retain source artifacts, prompts, model responses, code and decisions for inspection, report export and subsequent research.
- Operator tools: search literature with Elasticsearch, read evidence through GraphQL or MCP, replay archived quotes through Kafka and inspect Grafana dashboards.
Install Python as selected by .python-version, uv, PostgreSQL and Ollama. From the
repository root:
uv sync --locked
$env:RDS_DSN = 'postgresql://USER:PASSWORD@localhost:5432/factorforge'
ollama pull llama3.1:8bUse a dedicated database and provide credentials through your local environment. The operator guide explains provider selection and service setup.
Prepare an authored source example and run its saved request:
uv run python infra/research/prepare_original.py --artifacts artifacts/research-original --request artifacts/research-original/request.json
uv run factorforge-research --request artifacts/research-original/request.json --artifacts artifacts/research-original --workflowThe command retains the research decision and its artifacts. Reuse the saved request to resume the same workflow. For your own papers, follow source and data preparation.
To inspect the local dashboard without a model or database:
uv run python scripts/build_space.py
uv run python -m http.server 8766 --bind 127.0.0.1 --directory dist/spaceOpen http://127.0.0.1:8766. The builder executes authored examples and writes its output
under dist/space; the hosted demo displays saved material.
flowchart LR
Idea[Research idea] --> Sources[Reviewed literature and data]
Sources --> Model[Structured interpretation]
Model --> Strategy[Strategy compilation and review]
Strategy --> Experiment[Controlled experiment]
Experiment --> Decision[Research decision]
Decision --> Memory[Reports and research memory]
Sources & Model & Strategy & Experiment --> Artifacts[Content-addressed artifacts]
Artifacts --> Tools[Inspection and tracking tools]
LangGraph coordinates the research lifecycle. Deterministic Python code controls data admission, accounting, execution and validation. A model can propose a strategy; it cannot change the run's permissions, data timing or resource budget.
Python · FastAPI · LangGraph · Polars · LEAN · PostgreSQL · Docker
Python and FastAPI expose the research service, LangGraph coordinates research workflows, and Polars prepares data for deterministic strategy execution. LEAN provides independent reference-backtest verification, while Docker isolates experiment processes. PostgreSQL retains workflow checkpoints and the operation ledger; content-addressed filesystem storage preserves research artifacts for inspection and replay. Ollama supplies local model inference.
Configure the integrations your deployment needs:
- Research and data: Deep Agents for bounded planning, Elasticsearch for literature metadata search, Redis for discovery caches and PySpark for panel-data materialization.
- Memory and tracking: MLflow for experiment artifacts, Neo4j for research-memory projections and LangSmith for importing recorded research-operation traces. OpenTelemetry supports execution tracing; Prometheus and Grafana expose operational monitoring.
- Interfaces and delivery: GraphQL and MCP for read-only research inspection, Kafka for archived quote-event transport, and Next.js and TypeScript for the application UI. Hugging Face hosts the static research demo.
- Learning and versioning: PyTorch, TRL and PEFT for trajectory-based training tools, with DVC for data-versioning workflows.
- AWS adapters: S3 for artifact storage, SQS for asynchronous job delivery and Cognito for application identity in operator-managed deployments.
See architecture for component boundaries and deployment setup for integration guides and configuration.
uv run ruff check .
uv run pytest -p no:tmpdir tests/unit
uv buildSee development for integration services and browser tooling.
Further work can make source review easier, broaden data-provider coverage and improve worker scheduling as workloads grow. The architecture keeps model proposals separate from execution policy so these changes can be introduced without weakening accounting, source provenance or authorization. Architecture explains the tradeoffs.
