DEV Community

Cover image for I Built a Browser-Based Python Quant Research Sandbox on Cloudflare's Free Tier
Dennis Kim
Dennis Kim

Posted on

I Built a Browser-Based Python Quant Research Sandbox on Cloudflare's Free Tier

"Can you build a Python quant research environment that runs entirely in the browser, on Cloudflare's Free Tier alone?"

That question cost me several nights of sleep. The answer, it turns out, is yes — and today I'm open-sourcing the result.

VibeQuant Browser is a browser-based quant research sandbox inspired by the workflow of GS Quant. You type a trading idea in natural language, an LLM turns it into runnable Python, and the code executes right in your browser against real market data — no backend Python server, no signup, no cost.

One thing before we start: this is **not* a GS Quant replacement, and it's research/education only — not investment advice. It's an independent open-source project (Apache 2.0), not affiliated with Goldman Sachs.*


What it does

VibeQuant dashboard overview

  1. LLM → Quant → Python. Describe a strategy in plain language; the LLM (DeepSeek, gated to finance-only prompts) generates runnable vi_browser Python and executes it immediately.
  2. Python in the browser. Pyodide (CPython compiled to WebAssembly) runs your scripts client-side. Your machine is the compute layer.
  3. Real market data API. Candles and quotes served by a Cloudflare Worker (Yahoo Finance provider), cached in R2 with D1 indexes.
  4. Interactive charts for equity curves, indicators, and price series.
  5. Technical indicators out of the box: MA, RSI, MACD, Bollinger Bands, momentum, volatility, max drawdown — plus an educational backtest().
  6. 100% Cloudflare Free Tier: Pages · Workers · D1 · R2 · CDN & Cache API. Monthly bill: $0.

The workspace: prompt on the left, Python on the right

LLM prompt input and Python input panels

The workspace splits into an LLM prompt pane and a Python editor, with Result / Error log / Chart panes below. The LLM round-trip works like this:

  1. Your prompt hits DeepSeek through a Cloudflare Worker (API keys never touch the browser)
  2. If Python comes back, it auto-fills the editor
  3. It runs immediately in Pyodide — prints go to Result, show_chart(...) renders to Chart, exceptions land in the Error log

After that, you iterate on the code directly — no need to call the LLM again for every tweak.

Try a prompt like this in the live demo:

Compare 22-day momentum for NVDA, MU, SNDK, AVGO.
Rank only computable names; exclude N/A.
Build vi_browser Python and chart series with show_chart.
Enter fullscreen mode Exit fullscreen mode

Or write the Python yourself:

# Runs in Pyodide — in your browser, not on a server
from vi_browser import get_candles, ma_cross_signal, backtest, show_chart

candles = await get_candles("005930.KS", days=180)   # → Cloudflare Worker API
signals = ma_cross_signal(candles, fast=10, slow=30)
result = backtest(candles, signals, fee_bps=10)

print(result["metrics"])
show_chart(result["equity"], title="Equity", series_label="equity")
Enter fullscreen mode Exit fullscreen mode

Python runner with results and chart

There's also an Examples section with one-click sample chips (momentum, RSI zones, MA cross, multifactor) and a full GS Quant ↔ VI Quant API mapping table, so you can see exactly which familiar APIs run in the browser, which run locally via pip, and which are still planned:

GS Quant ↔ VI Quant API table and Load sample

The architecture: free tier as a design constraint

VibeQuant on Cloudflare Free — Pages + Pyodide, Worker, Cache/D1/R2

The core design decision: split the product along what the free tier can actually do.

Concern Where it runs Why
Market data (quotes, candles, assets) Cloudflare Workers + Pages + D1 + R2 + CDN Single platform, free-tier first
Quant computation (scripts, indicators, backtests) Browser Python via Pyodide (WASM) Workers can't run full Python; no server-side exec

Cloudflare Workers give you 100k requests/day but only 10 ms of CPU per invocation on the free plan. That kills any dream of running pandas server-side — so I didn't. The Worker does one thing: serve candles fast. Candle objects live in R2, D1 holds only indexes, and the Cache API absorbs hot paths. All the actual number-crunching moves to the user's browser via WebAssembly.

This constraint turned out to be a feature: there is no server that executes user code, which makes the security story dramatically simpler (SECURITY.md).

What honestly doesn't work (yet)

I'd rather you find this here than in production:

Claim you might assume Reality
Full GS Quant API compatibility A subset of public APIs; many symbols are stubs today
Same numbers as GS / Marquee Never promised — different data, different models
Full vi_quant in the browser No — only a thin WASM-safe subset (vi_browser)
Derivative pricing (QuantLib) Not started
Unlimited free-tier data ingest No — see LIMITATIONS.md

Status: Pre-Alpha. The committee demo stage is usable; it is not a production research engine.

Why I built this

Retail investors in Korea — my home market — are famously aggressive with leverage. I wanted to lower the barrier to quantitative thinking: give anyone a free, open place to test an idea against data before betting real money on a hunch.

But the longer-term goal is bigger. Today VibeQuant is a single-player sandbox. The roadmap points toward a Multi-LLM Quant Committee: multiple LLMs receiving the same market data, generating investment hypotheses, reproducing them as Python, cross-verifying each other's results, and evaluating Alpha alongside Risk (VaR). Same APIs, same data, reproducible verification — that's why the GS Quant-style API surface matters.

Still ahead: a proper backtest engine, factor research, and community-driven strategy sharing and verification. The first foundation, though, is done.

Try it, break it, tell me

If you're into Python, quant finance, LLMs, or squeezing serverless free tiers until they squeak — feedback, issues, and PRs are all welcome.

LLMs are spreadsheets for reasoning, not oracles of prediction. The market owes certainty to no one.


Disclaimer: VibeQuant is for research and education only. Nothing here is investment advice. Validate models and data before any real capital use.

Top comments (0)