QuantResearch

Version 2.5.3 โ€” Professional Quantitative Analysis

A comprehensive Python library for technical indicator calculation, strategy backtesting via QuantQL, advanced candlestick visualization, and a full GUI dashboard โ€” supporting NSE, BSE, US, and Crypto markets.

Python 3.7+ MIT License 18+ Indicators QuantQL Backtest Engine GUI Dashboard ๐Ÿ‡ฎ๐Ÿ‡ณ India + Global

Installation

Install from PyPI:

pip install QuantResearch

Or install from source:

bash
git clone https://github.com/vinayak1729-web/QuantR.git
cd QuantR
pip install -e .

Quick Start

Get up and running in under 5 minutes:

python
from QuantResearch import fetch_data, Rsi, plot_rsi

# Fetch stock data
data = fetch_data("AAPL", start_date="2023-01-01", end_date="2024-01-01")

# Calculate RSI
rsi = Rsi(data['Close'], period=14)

# Visualize with candlestick chart
plot_rsi(data=data, rsi=rsi, period=14, ticker="AAPL", kind='candle')
RSI Candlestick Chart
RSI indicator with candlestick price chart โ€” overbought/oversold levels highlighted

Launch the Dashboard

python
from QuantResearch.dashboard import launch_dashboard
launch_dashboard()

Run a Backtest with QuantQL

python
from QuantResearch.backtest_engine import run_backtest

result = run_backtest("""
BACKTEST "RSI + MACD Strategy"
MARKET NSE
TICKER RELIANCE
PERIOD 1Y

USE RSI(14)
USE MACD(12, 26, 9)

BUY  WHEN RSI > 30 AND MACD CROSSES_ABOVE SIGNAL
SELL WHEN RSI > 70 OR MACD CROSSES_BELOW SIGNAL

CAPITAL 100000
STOP_LOSS 5%
TAKE_PROFIT 15%
COMMISSION 0.1%
""")

for key, val in result.metrics.items():
    print(f"{key}: {val}")

Features

๐Ÿ“Š

Data Fetching

OHLCV from Yahoo Finance โ€” NSE, BSE, US & Crypto

๐Ÿ“ˆ

18+ Indicators

RSI, MACD, BB, ATR, Stochastic, ADX, Ichimoku, SAR, OBV, Fibonacci & more

๐Ÿงช

QuantQL Engine

Domain-specific backtesting language with full analytics

๐Ÿ•ฏ๏ธ

Candlestick Charts

Professional dark-theme OHLC candlestick visualizations

๐Ÿ–ฅ๏ธ

GUI Dashboard

5-tab Tkinter dashboard โ€” Historical, Live, Multi-Ticker, Watchlist, Backtest

๐Ÿ‡ฎ๐Ÿ‡ณ

India + Global

Auto-resolves NSE/BSE tickers, โ‚น/crore/lakh formatting, Nifty 50 defaults

๐Ÿ“‰

Quant Metrics

Sharpe, Sortino, Calmar, VaR, CVaR, Alpha, Beta, CAGR, Max Drawdown

๐Ÿ””

Signal Generation

Automatic buy/sell crossover detection and trade markers

Data Fetching

fetch_data(ticker, start_date, end_date)

Downloads historical OHLCV (Open, High, Low, Close, Volume, Adjusted Close) data from Yahoo Finance. Supports NSE (.NS), BSE (.BO), US, and Crypto (e.g. BTC-USD) tickers.

ParameterTypeDescription
tickerstrStock ticker symbol โ€” e.g. "AAPL", "RELIANCE.NS", "BTC-USD"
start_datestrStart date in "YYYY-MM-DD" format
end_datestrEnd date in "YYYY-MM-DD" format

Returns: pandas.DataFrame with columns: Open, High, Low, Close, Adj Close, Volume

python
from QuantResearch import fetch_data

data = fetch_data("RELIANCE.NS", "2023-01-01", "2024-01-01")
print(data.head())
print(f"Shape: {data.shape}")
Fetch Data Output
Sample output of fetch_data() showing OHLCV data structure

RSI โ€” Relative Strength Index

Rsi(price, period=14)

Momentum oscillator measuring the magnitude of recent price changes. Returns values from 0 to 100.

price
pandas.Series โ€” Price series (typically closing prices)
period
int โ€” Lookback period (default: 14)
Interpretation: RSI > 70 โ†’ Overbought (potential sell) ยท RSI < 30 โ†’ Oversold (potential buy) ยท 30โ€“70 โ†’ Neutral
python
from QuantResearch import fetch_data, Rsi

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
rsi = Rsi(data['Close'], period=14)
print(f"Current RSI: {rsi.iloc[-1]:.2f}")
RSI Signals
RSI indicator showing buy and sell signal zones

MACD โ€” Moving Average Convergence Divergence

macd(price, short_period=12, long_period=26, signal_period=9)

Trend-following momentum indicator showing the relationship between two exponential moving averages.

price
pandas.Series โ€” Price series
short_period
int โ€” Short EMA period (default: 12)
long_period
int โ€” Long EMA period (default: 26)
signal_period
int โ€” Signal line EMA period (default: 9)

Returns: Tuple of (macd_line, signal_line, histogram)

python
from QuantResearch import fetch_data, macd, plot_macd

data = fetch_data("TSLA", "2024-01-01", "2024-11-01")
macd_line, signal_line, hist = macd(data['Close'])

bullish = (macd_line > signal_line) & (macd_line.shift(1) <= signal_line.shift(1))
print(f"Bullish crossovers: {bullish.sum()}")

plot_macd(macd_line, signal_line, hist, ticker="TSLA", data=data, kind='candle')
MACD
MACD with signal line and histogram showing trend momentum

Bollinger Bands

bb_bands(price, period=20, num_std=2)

Volatility bands placed above and below a moving average. Useful for squeeze detection and overbought/oversold conditions.

price
pandas.Series โ€” Price series
period
int โ€” Lookback period (default: 20)
num_std
int/float โ€” Number of standard deviations (default: 2)

Returns: Tuple of (upper_band, middle_band, lower_band)

python
from QuantResearch import fetch_data, bb_bands, plot_bollinger

data = fetch_data("NVDA", "2023-01-01", "2024-01-01")
upper, mid, lower = bb_bands(data['Close'], period=20, num_std=2)

band_width = (upper - lower) / mid
squeeze = band_width < band_width.quantile(0.25)
print(f"Squeeze periods: {squeeze.sum()}")

plot_bollinger(data=data, adj_close=data['Close'], bb_upper=upper,
               bb_mid=mid, bb_lower=lower, ticker="NVDA", kind='candle')
Bollinger Bands
Bollinger Bands showing volatility zones around price movement

ATR โ€” Average True Range

atr(data, period=14)

Volatility indicator measuring the average range of price movement using Wilder's Smoothing.

python
from QuantResearch import fetch_data, atr

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
atr_values = atr(data, period=14)
print(f"Current ATR: {atr_values.iloc[-1]:.2f}")
ATR
Average True Range showing market volatility over time

SMA โ€” Simple Moving Average

sma(price, period=9)

Average price over a specified period. Useful for identifying trend direction and support/resistance.

python
from QuantResearch import fetch_data, sma

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
sma_20 = sma(data['Close'], period=20)
sma_50 = sma(data['Close'], period=50)

golden_cross = (sma_20 > sma_50) & (sma_20.shift(1) <= sma_50.shift(1))
print(f"Golden Cross signals: {golden_cross.sum()}")
SMA
Simple Moving Average overlaid on candlestick chart

EMA โ€” Exponential Moving Average

ema(price, period=9)

Weighted average giving more importance to recent prices. More responsive than SMA with reduced lag.

python
from QuantResearch import fetch_data, ema

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
ema_12 = ema(data['Close'], period=12)
ema_26 = ema(data['Close'], period=26)
print(f"EMA 12: {ema_12.iloc[-1]:.2f}  EMA 26: {ema_26.iloc[-1]:.2f}")
EMA
Exponential Moving Average showing trend with less lag

DEMA & TEMA

demma(price, period=9)

temma(price, period=9)

DEMA (Double Exponential Moving Average) provides smoother trend indication with reduced lag. TEMA (Triple Exponential Moving Average) offers the smoothest output with minimal lag.

python
from QuantResearch import fetch_data, demma, temma

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
dema_val = demma(data['Close'], period=20)
tema_val = temma(data['Close'], period=20)
DEMA & TEMA
DEMA and TEMA comparison showing progressively reduced lag

RVWAP โ€” Rolling Volume-Weighted Average Price

RVWAP(high, low, close, volume, period=20)

Price benchmark reflecting both volume and price data โ€” useful for identifying institutional trading levels.

python
from QuantResearch import fetch_data, RVWAP

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
vwap = RVWAP(data['High'], data['Low'], data['Close'], data['Volume'], period=20)
print(f"Current RVWAP: {vwap.iloc[-1]:.2f}")
RVWAP
Rolling VWAP showing volume-weighted price levels

Stochastic Oscillator

stochastic(data, k_period=14, d_period=3)

Momentum indicator comparing the closing price to the high-low range over a lookback period.

Returns: Tuple of (%K series, %D series)

Interpretation: %K > 80 โ†’ Overbought ยท %K < 20 โ†’ Oversold ยท %K crosses above %D โ†’ Bullish ยท %K crosses below %D โ†’ Bearish
python
from QuantResearch.indicators import fetch_data, stochastic

data = fetch_data("TCS.NS", "2023-01-01", "2024-01-01")
k, d = stochastic(data, k_period=14, d_period=3)
print(f"Stoch %K: {k.iloc[-1]:.2f}  %D: {d.iloc[-1]:.2f}")

Williams %R

williams_r(data, period=14)

Momentum indicator showing overbought/oversold conditions on an inverted 0 to โˆ’100 scale.

Interpretation: %R > โˆ’20 โ†’ Overbought ยท %R < โˆ’80 โ†’ Oversold
python
from QuantResearch.indicators import fetch_data, williams_r

data = fetch_data("INFY.NS", "2023-01-01", "2024-01-01")
wr = williams_r(data, period=14)
print(f"Williams %R: {wr.iloc[-1]:.2f}")

OBV โ€” On-Balance Volume

obv(data)

Cumulative volume-based momentum indicator. Adds volume on up-days and subtracts on down-days โ€” useful for confirming trends via volume flow.

python
from QuantResearch.indicators import fetch_data, obv

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
obv_series = obv(data)

Parabolic SAR

parabolic_sar(data, af_start=0.02, af_step=0.02, af_max=0.2)

Trend-following indicator used to identify potential price reversals and trail stops.

Returns: Tuple of (sar_series, trend_series) โ€” trend is 1 (uptrend) or -1 (downtrend)

python
from QuantResearch.indicators import fetch_data, parabolic_sar

data = fetch_data("RELIANCE.NS", "2023-01-01", "2024-01-01")
sar, trend = parabolic_sar(data)
print(f"SAR: {sar.iloc[-1]:.2f}  Trend: {'UP' if trend.iloc[-1] == 1 else 'DOWN'}")

ADX โ€” Average Directional Index

adx(data, period=14)

Measures trend strength regardless of direction, along with +DI and โˆ’DI directional indicators.

Returns: Tuple of (adx_series, plus_di_series, minus_di_series)

Interpretation: ADX > 25 โ†’ Strong trend ยท ADX < 20 โ†’ Weak/no trend ยท +DI > โˆ’DI โ†’ Bullish ยท โˆ’DI > +DI โ†’ Bearish
python
from QuantResearch.indicators import fetch_data, adx

data = fetch_data("TCS.NS", "2023-01-01", "2024-01-01")
adx_val, plus_di, minus_di = adx(data, period=14)
print(f"ADX: {adx_val.iloc[-1]:.2f}  +DI: {plus_di.iloc[-1]:.2f}  -DI: {minus_di.iloc[-1]:.2f}")

Ichimoku Cloud

ichimoku(data, tenkan=9, kijun=26, senkou_b=52)

Comprehensive multi-component indicator showing support/resistance, trend direction, and momentum simultaneously.

Returns: Tuple of (tenkan_sen, kijun_sen, senkou_a, senkou_b_line, chikou_span)

python
from QuantResearch.indicators import fetch_data, ichimoku

data = fetch_data("HDFCBANK.NS", "2023-01-01", "2024-01-01")
tenkan, kijun, senkou_a, senkou_b, chikou = ichimoku(data)

Pivot Points

pivot_points(data)

Classic Pivot Points โ€” calculates support and resistance levels from the last completed bar's High, Low, and Close.

Returns: dict with keys: P, R1, R2, R3, S1, S2, S3

python
from QuantResearch.indicators import fetch_data, pivot_points

data = fetch_data("SBIN.NS", "2023-01-01", "2024-01-01")
pp = pivot_points(data)
print(f"Pivot: {pp['P']:.2f}  R1: {pp['R1']:.2f}  S1: {pp['S1']:.2f}")

Fibonacci Retracement Levels

fibonacci_levels(data)

Calculates 7 standard Fibonacci retracement levels across the dataset's high-low range.

Returns: dict with keys: '0%', '23.6%', '38.2%', '50%', '61.8%', '78.6%', '100%'

python
from QuantResearch.indicators import fetch_data, fibonacci_levels

data = fetch_data("RELIANCE.NS", "2023-01-01", "2024-01-01")
fib = fibonacci_levels(data)
for level, price in fib.items():
    print(f"Fib {level}: {price:.2f}")

Slope โ€” Linear Regression Slope

slope(series, period=14)

Calculates the normalized trend slope as (slope / mean_price) ร— 100 (percentage per bar) โ€” useful for quantifying trend momentum.

python
from QuantResearch.indicators import fetch_data, slope

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
slp = slope(data['Close'], period=14)

Candlestick Chart

plot_candlestick(data, ticker='Stock')

Creates professional dark-theme candlestick charts showing OHLC price action. All visualization functions support kind='line' (default) and kind='candle'.

python
from QuantResearch import fetch_data, plot_candlestick

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
plot_candlestick(data, ticker="AAPL")
Candlestick
Candlestick chart with green (bullish) and red (bearish) candles

RSI Visualization

plot_rsi(data, rsi, period=14, lower=30, upper=70, ticker, kind='line')

python
from QuantResearch import fetch_data, Rsi, plot_rsi

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
rsi = Rsi(data['Close'], period=14)

plot_rsi(rsi=rsi, period=14, ticker="AAPL", kind='line')
plot_rsi(data=data, rsi=rsi, period=14, ticker="AAPL", kind='candle')
RSI Line
RSI line chart with overbought/oversold levels
RSI Candle
Dual-pane: candlestick price chart with RSI below

MACD Visualization

plot_macd(macd_line, signal_line, histogram, ticker, data, kind='line')

python
from QuantResearch import fetch_data, macd, plot_macd

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
macd_line, signal_line, hist = macd(data['Close'])
plot_macd(macd_line, signal_line, hist, ticker="AAPL", data=data, kind='candle')
MACD
MACD with signal line and histogram on candlestick chart

Bollinger Bands Visualization

plot_bollinger(data, adj_close, bb_upper, bb_mid, bb_lower, ticker, kind='line')

python
from QuantResearch import fetch_data, bb_bands, plot_bollinger

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
upper, mid, lower = bb_bands(data['Close'], period=20)

plot_bollinger(adj_close=data['Close'], bb_upper=upper,
               bb_mid=mid, bb_lower=lower, ticker="AAPL")
plot_bollinger(data=data, adj_close=data['Close'], bb_upper=upper,
               bb_mid=mid, bb_lower=lower, ticker="AAPL", kind='candle')
BB Line
Bollinger Bands line chart with shaded volatility zone
BB Candle
Bollinger Bands on candlestick chart

Moving Averages Visualization

plot_moving_averages(data, price, sma_val, ema_val, dema_val, tema_val, ticker, kind='line')

python
from QuantResearch import fetch_data, sma, ema, demma, temma, plot_moving_averages

data = fetch_data("AAPL", "2023-01-01", "2024-01-01")
plot_moving_averages(data=data, sma_val=sma(data['Close'], 20),
                     ema_val=ema(data['Close'], 20),
                     dema_val=demma(data['Close'], 20),
                     tema_val=temma(data['Close'], 20),
                     ticker="AAPL", kind='candle')
Moving Averages
SMA, EMA, DEMA, TEMA compared on candlestick chart

QuantQL โ€” Backtesting Language

QuantQL is a domain-specific language built into QuantResearch that lets you write trading strategies in plain, readable syntax and backtest them against real historical data. The engine handles data fetching, indicator computation, trade simulation, stop-loss/take-profit, commission/slippage, equity curve tracking, and full performance metrics.

Language Syntax

quantql
BACKTEST "<Strategy Name>"
MARKET <NSE | BSE | US | CRYPTO | Auto>
TICKER <SYMBOL>
PERIOD <1Y | 6M | 3M | 30D | 2W | ...>

USE <INDICATOR>(<params>)

BUY  WHEN <condition>
SELL WHEN <condition>

CAPITAL <amount>
POSITION_SIZE <percent>%
STOP_LOSS <percent>%
TAKE_PROFIT <percent>%
COMMISSION <percent>%
SLIPPAGE <percent>%

Keyword Reference

KeywordDescriptionExample
BACKTESTStrategy name (quoted string)BACKTEST "My Strategy"
MARKETExchange/market selectorMARKET NSE
TICKERAsset symbolTICKER RELIANCE
PERIODHistorical lookbackPERIOD 1Y
USEDeclare an indicatorUSE RSI(14)
BUY WHENEntry conditionBUY WHEN RSI < 30
SELL WHENExit conditionSELL WHEN RSI > 70
CAPITALStarting capitalCAPITAL 100000
STOP_LOSSStop-loss %STOP_LOSS 5%
TAKE_PROFITTake-profit %TAKE_PROFIT 15%
COMMISSIONPer-trade commissionCOMMISSION 0.1%
SLIPPAGEPer-trade slippageSLIPPAGE 0.05%

Period & Market Formats

PeriodMeaningMarketDescription
1Y1 yearNSEIndian NSE โ†’ .NS
6M6 monthsBSEIndian BSE โ†’ .BO
3M3 monthsUSUS markets
2W2 weeksCRYPTOCrypto โ†’ -USD
30D30 daysAutoAuto-detect NSE

Supported Indicators in QuantQL

USE DeclarationAvailable Names in Conditions
USE RSI(14)RSI
USE MACD(12, 26, 9)MACD, SIGNAL, HISTOGRAM
USE SMA(20)SMA
USE EMA(20)EMA
USE DEMA(20)DEMA
USE TEMA(20)TEMA
USE BB(20)BB_UPPER, BB_MID, BB_LOWER
USE ATR(14)ATR
USE STOCH(14, 3)STOCH_K, STOCH_D
USE WILLIAMS(14)WILLIAMS
USE ADX(14)ADX, PLUS_DI, MINUS_DI
USE SLOPE(14)SLOPE
USE SARSAR, SAR_TREND
USE OBVOBV
USE VWAP(20)VWAP

Price primitives (no USE needed): CLOSE, OPEN, HIGH, LOW, VOLUME

Condition Operators

OperatorDescriptionExample
> < >= <=ComparisonRSI > 70
== !=EqualitySAR_TREND == 1
CROSSES_ABOVECrossover upwardMACD CROSSES_ABOVE SIGNAL
CROSSES_BELOWCrossover downwardEMA CROSSES_BELOW SMA(50)
AND OR NOTLogicalRSI > 30 AND ADX > 25

Conditions can be grouped with parentheses:

quantql
BUY WHEN (RSI < 35 AND CLOSE < BB_LOWER) OR STOCH_K CROSSES_ABOVE STOCH_D

Strategy Examples

RSI + MACD Crossover (NSE)

quantql
BACKTEST "RSI + MACD Crossover"
MARKET NSE
TICKER MARUTI
PERIOD 1Y

USE RSI(14)
USE MACD(12, 26, 9)

BUY  WHEN RSI > 30 AND MACD CROSSES_ABOVE SIGNAL
SELL WHEN RSI > 70 OR MACD CROSSES_BELOW SIGNAL

CAPITAL 100000
STOP_LOSS 5%
TAKE_PROFIT 15%
COMMISSION 0.1%

Bollinger Bounce (NSE)

quantql
BACKTEST "Bollinger Bounce"
MARKET NSE
TICKER RELIANCE
PERIOD 6M

USE BB(20)
USE RSI(14)

BUY  WHEN CLOSE < BB_LOWER AND RSI < 35
SELL WHEN CLOSE > BB_MID OR RSI > 65

CAPITAL 500000
STOP_LOSS 3%
TAKE_PROFIT 10%
COMMISSION 0.1%

SMA Trend + ADX Filter (US)

quantql
BACKTEST "SMA Trend Follow"
MARKET US
TICKER AAPL
PERIOD 2Y

USE SMA(50)
USE EMA(20)
USE ADX(14)

BUY  WHEN CLOSE > SMA(50) AND EMA > SMA(50) AND ADX > 25
SELL WHEN CLOSE < SMA(50)

CAPITAL 50000
STOP_LOSS 7%
TAKE_PROFIT 20%
COMMISSION 0.05%

Crypto Momentum (BTC)

quantql
BACKTEST "BTC Momentum"
MARKET CRYPTO
TICKER BTC
PERIOD 6M

USE EMA(20)
USE SMA(50)
USE RSI(14)

BUY  WHEN EMA > SMA(50) AND RSI > 45
SELL WHEN EMA CROSSES_BELOW SMA(50) OR RSI > 80

CAPITAL 50000
STOP_LOSS 8%
TAKE_PROFIT 25%
COMMISSION 0.2%

Running a Backtest

python
from QuantResearch.backtest_engine import compile_strategy, run_backtest, BacktestEngine

# Option 1 โ€” run directly from script string
result = run_backtest(my_strategy_script)

# Option 2 โ€” compile then run separately
strategy = compile_strategy(my_strategy_script)
engine   = BacktestEngine(strategy)
result   = engine.run()

# Access results
print(result.metrics)       # dict of performance metrics
print(result.trades)        # list of Trade objects
print(result.equity_curve)  # pandas.Series
print(result.indicators)    # dict of computed indicator Series
print(result.data)          # pandas.DataFrame of OHLCV data

Or launch the standalone backtest GUI:

python
from QuantResearch.backtest_engine import backtest_dashboard
backtest_dashboard()

Backtest Metrics

After simulation, result.metrics contains:

MetricDescription
Total TradesNumber of completed trades
Winners / LosersCount of profitable and losing trades
Win RatePercentage of winning trades
Net P&LTotal profit/loss after commission
Total ReturnPercentage return over the period
Gross Profit / LossSum of all winning / losing trade P&L
Profit FactorGross Profit / |Gross Loss|
Avg Win / Avg LossAverage profit/loss per trade
Max Consec Wins/LossesLongest consecutive streaks
Avg Hold (days)Average trade holding period
Sharpe RatioRisk-adjusted return (rf = 6.5%)
Max DrawdownLargest peak-to-trough equity decline
VolatilityAnnualised std dev of daily returns
Starting Capital / Final EquityInitial and ending portfolio value

Exporting Results

Export CSV โ€” saves strategy parameters, all metrics, complete trade log, and equity curve with daily returns.
Export PNG โ€” saves the backtest chart (price + trade markers, equity curve, indicators) as a 150 DPI image.

QuantResearch Dashboard

A full-featured GUI built with Tkinter and Matplotlib supporting India (NSE/BSE) and global (US/Crypto) markets with automatic ticker resolution, professional dark-theme charts, real-time live data, and a persistent watchlist.

python
from QuantResearch.dashboard import launch_dashboard
launch_dashboard()
Dashboard
Dashboard interface โ€” main view with ticker input, date selection, and all technical indicators

Tab 1 โ€” Historical

The main analysis tab. Enter any ticker and select a timeframe to fetch and chart historical OHLCV data with any combination of indicators overlaid.

Market Selector: Auto, NSE, BSE, US, or Crypto. In Auto mode, known Indian NSE tickers resolve automatically (e.g. RELIANCE โ†’ RELIANCE.NS with โ‚น formatting).

Timeframe Buttons: 1M, 3M, 6M, 9M, 1Y, 3Y, 5Y โ€” each auto-adjusts indicator periods via adaptive settings.

Overlays: Volume bars, VWAP, Volume Profile (configurable bins 10โ€“200), Benchmark comparison (^NSEI, ^BSESN, ^NSEBANK, SPY, QQQ, BTC-USD, GLD, or custom).

Available Indicators: All 18+ indicators with adjustable period spinboxes. Fibonacci custom date range supported.

Export: PNG image, CSV data export, and Quant Metrics panel toggle.

Dashboard MA
Dashboard displaying multiple moving average lines

Tab 2 โ€” Live OHLC

Live market data streaming via Yahoo Finance WebSocket. Displays real-time OHLC candlestick charts with optional RSI, MACD, Bollinger Bands, Stochastic, Volume, SMA, and EMA overlays. Supports configurable resample intervals (e.g. 1min, 5min) and price alerts.

Live OHLC
Live OHLC tab with real-time WebSocket data streaming

Tab 3 โ€” Multi-Ticker

Fetch and display multiple tickers side by side in a scrollable multi-chart view. Each sub-chart independently shows price with optional RSI, MACD, ATR, Stochastic, and ADX indicator panels.

Multi-Ticker
Multi-ticker comparison view with independent indicator panels

Tab 4 โ€” Watchlist

A persistent watchlist stored in ~/.quant_watchlist.json. Shows live price, % change, 52-week high/low, and exchange for each ticker.

Features: Refresh Prices (background thread), Add Nifty 50 Defaults (top 10: RELIANCE.NS, TCS.NS, INFY.NS, etc.), Chart button (jump to Historical tab), and remove ticker.

Watchlist
Persistent watchlist with live prices and quick-chart access

Tab 5 โ€” Backtest (QuantQL)

Write and run QuantQL strategy scripts directly inside the dashboard. Includes a built-in code editor with 5 example strategies, visual trade book with buy/sell markers, equity curve panel, sub-indicator panels, full metrics table, trade log table, and CSV/PNG export.

Backtest Tab
Backtest tab with QuantQL editor, equity curve, and trade markers

Quant Metrics Panel

Toggle with the ๐Ÿ“ˆ Metrics button in the Historical tab. Computes institutional-grade performance statistics with optional benchmarking:

MetricDescription
Total ReturnCumulative price return over the loaded period
CAGRCompound Annual Growth Rate
VolatilityAnnualised standard deviation (252-day basis)
SharpeRisk-adjusted return (rf = 6.5%)
SortinoDownside risk-adjusted return
Max DrawdownLargest peak-to-trough equity decline
CalmarCAGR / |Max Drawdown|
VaR 95%Value at Risk at 95% confidence
CVaR 95%Conditional VaR (Expected Shortfall)
Win RateFrequency of positive daily returns
Profit FactorAvg daily gain / avg daily loss
BetaSystematic risk vs selected benchmark
Alpha (ann)Annualised excess return vs benchmark
CorrelationReturn correlation with benchmark
BarsTotal trading days in the dataset

Values are color-coded: green = strong, gold = neutral, red = weak, cyan = informational.

Requirements

PackageVersionPurpose
Python>= 3.7Runtime environment
pandas>= 1.3.0Data manipulation
yfinance>= 0.2.0Financial data retrieval
matplotlib>= 3.4.0Visualization
numpy>= 1.19.0Numerical computations
tkinter(stdlib)GUI dashboard
tkcalendar>= 1.6.0Date pickers in dashboard

Authors

Vinayak Shinde

Lead Developer

Vishal Mishra

Co-Developer

Disclaimer

Important: QuantResearch is provided for educational and research purposes only. It is not intended as financial advice.

Always consult with a qualified financial advisor before making investment decisions. Past performance does not guarantee future results. Technical indicators are tools โ€” they should not be used as sole decision-making factors. Use proper risk management and test strategies thoroughly before live trading. Backtest results are simulated and do not account for all real-world trading conditions.