Quant Lab — GARCH, VaR, Monte Carlo, Kelly trên Vnstock (English)

📅 Translated: 2026-05-25 · Original (Vietnamese): 🇻🇳 Read in Vietnamese
🤖 This article was automatically translated from Vietnamese using Vnstock AI. For the most accurate version, refer to the original Vietnamese article.
{"title": "Quant Lab — GARCH, VaR, Monte Carlo, Kelly on Vnstock", "description": "A suite of 6 professional Quant tools: GARCH(1,1) volatility, VaR/CVaR 95%, Monte Carlo 1000 paths, Kelly Criterion, Microstructure (OFI/Microprice), Regime Detection — packaged in the \"🔬 Quant\" tab", "content_html": "

🔥 GARCH(1,1) — Volatility Forecasting

The model, invented by Robert Engle (2003 Nobel laureate in Economics), is defined as: σ²ₜ = ω + α·r²ₜ₋₁ + β·σ²ₜ₋₁

Vnstock fits the GARCH(1,1) model using Maximum Likelihood Estimation (MLE) on the last 60+ sessions, returning:

📊 VaR / CVaR 95% — Maximum Expected Loss

VaR (Value at Risk) 95%: with a 95% probability, what is the maximum loss in one day? For example, VNM VaR 95% = -1.83% means \"95% of the time, the loss will be ≤ 1.83% in one day\".

CVaR (Conditional VaR): in the worst 5% of cases, what is the average loss? CVaR is always greater than VaR, measuring \"tail risk\" more accurately.

🎲 Monte Carlo 1000 paths

Simulating 1,000 price paths over 20 sessions using drift, Brownian motion, and historical volatility data (with outliers clipped due to splits). Outputs:

5 sample paths are drawn as SVGs in the UI for visualization.

📐 Kelly Criterion — Position Sizing

Formula: f* = (p·b − q) / b, where p = win rate and b = average win/average loss.

Vnstock caps at 25% (quarter Kelly) for safety. Recommendation: Quarter / Half / Full Kelly depending on risk tolerance.

No more reckless \"all-in\" bets — proper sizing is key to long-term survival.

🔬 Microstructure: OFI · Microprice · Kyle · Amihud · VPIN

Inspired by High-Frequency Trading and Lopez de Prado:

"}
← All English articles · 🇻🇳 Original Vietnamese · 🚀 Launch App