PROJECT 25 • DAY 22 OF 90 • QUANTITATIVE FINANCE & RISK SIMULATOR

VARLYTIX
QUANT RISK LAB.

A comprehensive quantitative portfolio risk laboratory — modeling parametric and historical VaR, Conditional Value-at-Risk (CVaR), multi-asset correlation heatmaps, Monte Carlo fan simulations, and Markowitz optimization.

Python 3.12Streamlit 1.40+SciPyPlotly 6.0+SQLAlchemyReportLab PDFNSE/BSE Indian Equities30/30 Pytest
VARLYTIX Preview
QUANT RISK
VaR • CVaR • Monte Carlo
PYTEST SUITE
30 / 30 Passed
VaR / CVaR
95% & 99% Confidence Intervals
Monte Carlo
10,000 Fan Path Simulations
Frontier
Markowitz Efficient Optimizer
30 / 30
Automated Pytest Passed
01 / Overview

INSTITUTIONAL QUANTITATIVE RISK MODELING FOR RETAIL INVESTORS.

Retail investors typically judge portfolios only by total profit, ignoring downside tail risk. VARLYTIX brings hedge-fund grade risk metrics, crisis stress tests, and Monte Carlo forecasting to everyday portfolios.

01

Core Risk Metrics Lab

Calculates 95% and 99% Historical & Parametric Value-at-Risk (VaR), Expected Shortfall (CVaR), Sharpe Ratio, and Sortino Ratio.

02

Correlation Matrix Heatmap

Computes Pearson correlation coefficients across holdings to expose hidden concentration risk and cross-asset dependencies.

03

Monte Carlo Fan Simulator

Executes 10,000 Geometric Brownian Motion simulation paths to model portfolio valuation envelopes over 30 to 252 trading days.

04

Crisis Stress Testing

Replays historical market shocks (2008 Lehman Crash, 2020 COVID Liquidity Shock) to evaluate drawdown vulnerability.

05

Markowitz Efficient Frontier

Solves quadratic optimization equations to determine optimal asset weightings for minimum variance or maximum Sharpe ratio.

06

ReportLab PDF Dossier

Compiles executive-grade quantitative risk audit reports with vector charts and stress-test scorecards.

02 / Architecture

HOW IT WORKS.

High-performance SciPy and NumPy matrix calculation engine wrapped in Streamlit.

STAGE 01

Portfolio Ingest

Loads holdings and transactions; fetches adjusted close prices.

→
STAGE 02

Log Returns

Computes log returns, covariance matrix, and volatility vector.

→
STAGE 03

VaR/CVaR Math

Calculates parametric normal and historical empirical quantiles.

→
STAGE 04

Monte Carlo Run

Generates stochastic price paths via Cholesky decomposition.

→
STAGE 05

Optimization & PDF

Solves Markowitz quadratic frontier; generates audit PDF.

03 / Screenshots

APPLICATION SCREENSHOTS.

Live screens captured from the running application. Click any image to view full size, or follow setup instructions in the GitHub repository.

04 / Technical Details

QUANTITATIVE SPECS & VERIFIED CAPABILITIES.

Key modules, rules, safety checks, and automated test results documented in the repository.

Risk Metric Mathematical Formulation Verified Output
Value-at-Risk (VaR) Parametric (Gaussian) & Historical Simulation Daily 95% & 99% portfolio maximum loss
Conditional VaR (CVaR) Expected Shortfall beyond alpha threshold Tail-risk average expected drawdown
Monte Carlo Engine Cholesky Decomposition + Geometric Brownian Motion 10,000 correlated price trajectories
Test Coverage Pytest unit & mathematical accuracy tests 30 / 30 automated tests passed
05 / Tech Stack

CORE TECHNOLOGIES.

Frameworks, databases, visualization tools, and testing libraries used in VARLYTIX.

COMPUTING ENGINE
SciPy • NumPy
INTERACTIVE UI
Streamlit 1.40+
VISUALIZATION
Plotly 6.0+
DATABASE ORM
SQLAlchemy 2.0+ • SQLite
PDF GENERATOR
ReportLab 5.1+
TEST SUITE
Pytest (30/30 Passed)
06 / Next Steps

FUTURE ENHANCEMENTS.

Upcoming improvements planned for VARLYTIX.

GARCH(1,1) dynamic volatility modeling for time-varying market regimes.
Options and derivatives Black-Scholes Greeks sensitivity matrix integration.
Automated Zerodha / Upstox broker API portfolio synchronizer.
OPEN-SOURCE PROJECT • GITHUB.COM/RAGURAMRRP

EXPLORE SOURCE & DOCS.

View the complete codebase, sample datasets, quick-launch scripts, and automated test suites on GitHub.