Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuantForge: Multi-Market-Multi-Asset Algo Strategy Lab

LinkedIn Python FastAPI React Vite Markets Assets Storage Tests License

Multi-asset-Multi Market-Multi strategy all in one backtesting algo trading research platform.

QuantForge is a full-stack, multi-market, multi-asset strategy research platform built for backtesting equities and crypto across multiple timeframes, time periods, and strategy styles from one unified interface.

Built and written by Vikkrant himself.

Strongest Positioning

  • Multi-market: India, US, crypto
  • Multi-asset: equities and crypto
  • Multi-timeframe: intraday and daily research
  • Multi-period: fixed periods and custom date ranges
  • Multi-strategy: EMA, RSI, breakout, MACD, and an extensible strategy engine
  • Persistent research stack: results and history stored locally in SQLite
  • Full-stack workflow: data, backtest, analytics, history, and broker connectivity in one product

What It Does

  • Run backtests with live progress logs and saved result history.
  • Research across multiple markets and instrument types from one workspace.
  • Test multiple strategies with configurable execution assumptions.
  • Inspect equity, drawdown, trade logs, and portfolio statistics in a dedicated results workspace.
  • Persist research sessions locally so prior runs can be reopened from History with SQLite-backed storage.

Core Features

Quant Lab

  • Backtest form for symbol, period, interval, data source, strategy, and execution settings across multi-market workflows.
  • Custom date ranges, multiple position sizing models, slippage, commissions, and stop-loss support.
  • Intrabar-aware execution for breakout logic and estimated intrabar crossover handling for EMA and MACD modes.
  • Built to handle research across Indian markets, US markets, and crypto symbols from the same product surface.

Strategies

  • EMA Crossover
  • RSI Mean Reversion
  • Breakout (Donchian)
  • MACD

Performance Analytics

  • Total return
  • CAGR
  • Max drawdown
  • Sharpe ratio
  • Sortino ratio
  • Calmar ratio
  • Win rate
  • Expectancy
  • Profit factor
  • VaR 95%
  • Annualized volatility
  • Full trade log and PnL history

Data Support

  • Multi-market data ingestion with broker-aware and CSV-driven research paths
  • CSV-based local datasets
  • Local history persistence through SQLite
  • Broker support spanning Indian and US market workflows
  • Sample datasets for equities and crypto research

QuantForge can also pull market data through yfinance when needed, but the platform is positioned as a broader multi-source research stack, not a single-provider tool.

Research Workflow

  • Recent run history in the sidebar
  • Reopen saved reports from History
  • Export results as JSON
  • API-backed job progress terminal

Screenshots

Quant Lab Workspace

The main research surface is built for fast multi-market iteration across symbols, timeframes, strategies, and execution assumptions.

Quant Lab Workspace

Results and Performance Analytics

QuantForge is designed to surface headline performance metrics, risk numbers, and strategy-level outcome analysis in one place.

Results Overview Dashboard

Charts and Equity Research View

The charts workspace is where equity curve, drawdown behavior, and visual strategy review come together for deeper analysis.

Charts and Equity Drawdown

Saved Research History

Every run can be reopened from local SQLite-backed history so research does not disappear after a single session.

History Dashboard

Broker Connectivity

QuantForge also includes broker connectivity as part of the all-in-one research workflow.

Broker Configuration

Quick Start

chmod +x run.sh
./run.sh

Local services:

  • UI: http://localhost:5173
  • API: http://localhost:8010
  • API docs: http://localhost:8010/docs

Manual Setup

Requirements

  • Python 3.10+
  • Node.js 18+

Backend

python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install -r backend/requirements.txt
python3 backend/generate_sample_data.py
cd backend
python3 -m uvicorn main:app --reload --port 8010

Frontend

cd frontend
npm install
npm run dev

Environment Setup

Copy the template and keep secrets local:

cp .env.example .env

Important variables:

  • PORT=8010
  • FRONTEND_URL=http://localhost:5173
  • ALPACA_* for Alpaca
  • KITE_* for Zerodha
  • FYERS_* for FYERS

.env is intentionally ignored by git.

API Overview

Method Endpoint Description
GET /api/health Health check
GET /api/symbols Popular symbol list
POST /api/backtest Start a backtest job
GET /api/backtest/{id}/status Poll job progress and logs
GET /api/backtest/{id}/results Fetch completed results
POST /api/download-data Start an OHLCV download job
GET /api/download-data/{id}/status Poll download progress
GET /api/download-data/{id}/csv Download CSV output
GET /api/sample-data List bundled sample CSVs
GET /api/history List saved backtest summaries
GET /api/history/{id} Load a saved result payload

Sample Datasets

Bundled data includes:

  • AAPL_sample.csv
  • MSFT_sample.csv
  • TSLA_sample.csv
  • GOOGL_sample.csv
  • SPY_sample.csv
  • RELIANCE_sample.csv
  • BTC-USD_sample.csv

These are useful for validating strategy logic and UI behavior without waiting on external providers.

Testing

Backend regression suite:

./.venv/bin/python -m pytest backend/tests/test_all.py -q

Frontend production build:

cd frontend
npm run build

Current backend coverage includes 85 passing tests across data ingestion, strategy rules, execution logic, metrics, history, and API behavior.

Tech Stack

Layer Tools
Backend Python, FastAPI, Pandas, NumPy, httpx
Frontend React 18, Vite, Axios, Recharts, Lucide
Broker SDKs FYERS API v3 and broker integration adapters
Storage SQLite-backed local history and research state
UI Custom CSS with terminal-inspired styling

Credit

QuantForge was created, designed, and built by Vikkrant. This README was also written by Vikkrant himself, and the product vision, system direction, and project credit belong to him.

License

MIT. See LICENSE.

About

QuantForge is a multi-market, multi-asset algorithmic trading strategy lab for backtesting equities and crypto across India, US, and crypto markets.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages