Skip to content

backtestGPT

Market research assistant for amateur traders.

Core trick

GPT-5 writes a web-researched entry and exit plan, then a structured plan array drives a deterministic daily OHLCV backtest.

Tags

Description

Market research assistant for amateur traders. The goal of this app is to help me access the market information and come up with a profitable training strategies. It’s the tool that makes backtests extremely accessible for anyone without coding abilities. It uses GPT-5 reasoning to come up with the research plan. Do the actual research to pull relevant information regarding the right entry and exit times. Then it uses this research to compose the backtesting plan that's passed to run the backtest programmatically
stepandel/backtestgpt★ 00 forksTypeScriptCreated Aug 10, 2025 · last push Dec 20, 2025

README excerpt

## BacktestGPT (Prototype)

An experimental Next.js + TypeScript app for LLM-assisted market event research and deterministic backtesting. The UI features a chat-driven planner, streaming reasoning and web search indicators, and a Wall Street–themed dashboard with an interactive equity curve.

### Key Features

- **Two‑stage planner**
  - Stage 1: Interactive research chat with GPT‑5 + web search, streams responses and live status
  - Stage 2: Structures the transcript into a strict `Plan[]` via a tool function
- **Deterministic backtest** on daily OHLCV (Polygon SDK or mock), with per‑ticker stats
- **Dashboard UI** with stats cards, a draggable‑handles equity curve, per‑ticker table, and a live ticker tape
- **Streaming UX** with ephemeral “Reasoning …” and “Web search — status — query” indicators
- **LocalStorage** persistence for chat, readiness flag, results, and price cache

### Tech Stack

- Next.js (App Router) + TypeScript
- Tailwind CSS + shadcn/ui
- OpenAI `responses` API (GPT‑5) with `web_search_preview`
- `@polygon.io/client-js` for historical prices
- SVG charting (custom) + `ResizeObserver`

## Requirements

- Node.js 18+
- `pnpm` package manager
- Optional env vars:
  - `OPENAI_API_KEY` (to enable Stage 1 chat + Stage 2 structuring)
  - `POLYGON_API_KEY` (for real price data; otherwise mock)

## Quickstart

1. Install dependencies

```bash
pnpm install
```

2. Create an `.env.local` in the repo root (optional but recommended):

```bash
OPENAI_API_KEY=sk-...
PO

Team