Before running any script in UZSE Backtest App, your environment needs a handful of tools in place. This page documents every prerequisite — from the Node.js runtime version to the Playwright browser binary — so you can work through the checklist once and then follow the Quickstart without interruption.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/theonetrade/uzse-backtest-app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites Checklist
Node.js 18 or later
All pipeline scripts are written in TypeScript and run directly via If you need to upgrade, use nvm (macOS / Linux) or download the installer from nodejs.org:
npx tsx — a zero-config TypeScript executor that requires Node.js 18 or later for its native ESM and built-in fetch support.Check your current version:MongoDB (local or remote)
UZSE Backtest App uses MongoDB as its storage layer for both raw trade records (To use the default, simply ensure MongoDB is listening on port For a production-ready Docker Compose stack that bundles MongoDB together with Redis and MinIO, see the MongoDB infrastructure guide.
trade-results collection) and assembled OHLCV candles (candle-items collection). You need a running MongoDB instance — version 6 or 7 — before executing any pipeline script.The connection string is read from the MONGO_URI environment variable at startup. If the variable is not set, the app falls back to the default:27017 on your local machine. To point at a remote or Dockerised instance, export the variable before running any script:Playwright Chromium browser
The This downloads the Chromium binary managed by Playwright (separate from any system Chrome installation) and places it in Playwright’s local cache. You only need to run this once per machine.
download-trades.ts script uses Playwright to launch a headless Chromium browser and scrape paginated HTML trade tables from uzse.uz. Playwright’s browser binaries are not bundled with npm install — they must be installed separately with the following command:If you are running in a CI or headless Linux environment, you may also need the OS-level dependencies that Chromium requires. Run
npx playwright install-deps chromium to install them automatically on Debian/Ubuntu-based systems.npm install — project dependencies
Clone the repository and install all Node.js packages declared in The following packages will be installed:
package.json:| Package | Version | Purpose |
|---|---|---|
backtest-kit | ^10.2.0 | Core runtime: exchange adapter API, candle types |
@backtest-kit/cli | ^10.2.0 | CLI that serves the visual editor (npm start) |
@backtest-kit/graph | ^10.2.0 | Chart rendering engine used by the editor |
@backtest-kit/pinets | ^10.2.0 | Pine Script indicator and strategy library |
@backtest-kit/ui | ^10.2.0 | Editor UI components |
mongoose | ^8.23.0 | MongoDB ODM for trade and candle schemas |
playwright | ^1.59.1 | Headless browser for scraping uzse.uz |
functools-kit | ^2.2.0 | Functional utilities used throughout pipeline scripts |
get-moment-stamp | ^2.0.0 | Timestamp utility used in pipeline date calculations |
garch | ^1.2.3 | GARCH volatility modelling for advanced indicators |
volume-anomaly | ^1.2.3 | Volume anomaly detection indicator library |
agent-swarm-kit | ^2.7.0 | AI agent orchestration for news-sentiment analysis |
ollama | ^0.6.3 | Local LLM integration for sentiment signals |
agent-swarm-kit and ollama are required by the news-sentiment AI layer. If you only intend to use the data pipeline and editor, these packages are still installed as part of npm install but do not need any additional setup unless you activate that feature.Docker (optional, recommended)
Docker is not strictly required, but it is the fastest way to spin up the full infrastructure stack — MongoDB, Redis, and MinIO — without installing any services natively on your machine.If you choose to use Docker, ensure you have:Infrastructure setup guides:
- Docker Engine 24+ or Docker Desktop 4+
- Docker Compose v2 (included with Docker Desktop; available separately as
docker-compose-pluginon Linux)
MongoDB
Run MongoDB in Docker with optional persistence volumes.
Redis
Run Redis for caching and session state used by the editor.
MinIO
Run MinIO as S3-compatible object storage for large trade dumps.
Quick Reference
| Requirement | Minimum Version | Required? | Notes |
|---|---|---|---|
| Node.js | 18.x | ✅ Yes | Needed for npx tsx and native ESM |
| MongoDB | 6.x | ✅ Yes | Default URI: mongodb://localhost:27017/backtest |
| Playwright Chromium | Latest (via npx playwright install chromium) | ✅ Yes | Only needed for download-trades.ts |
| Docker | 24.x | Optional | Recommended for MongoDB / Redis / MinIO |
| Docker Compose | v2 | Optional | Required if using the Compose stack |
| Ollama | Latest | Optional | Only needed for AI news-sentiment features |
Environment Variables
| Variable | Default | Description |
|---|---|---|
MONGO_URI | mongodb://localhost:27017/backtest | Full MongoDB connection string; set this to override the default local instance. |
.bashrc, .zshrc, etc.) or use a .env file with a tool like dotenv-cli.
Ready to Continue?
With all prerequisites satisfied, head to the Quickstart to download your first month of UZSE trade data and open it in the visual editor.Quickstart
Run the four-stage pipeline end to end and open your first chart in the backtest-kit editor.
Configuration
Review all available environment variables and configuration options for the full stack.