AI / ML2024

Quantitative Risk Engine

This Ospina case study documents how Carlos Rico-Ospina approached a specific risk, infrastructure, revenue, or research problem and what was built to address it.

Built an ML-driven risk platform that processes 89 million trades and identifies dangerous behavior before blowouts happen.

Machine LearningK-Means ClusteringXGBoostDaskParquetBig Data
Quantitative Risk Engine

The Problem

The firm had grown to process hundreds of trades per second with 89 million historical trades. Standard risk reporting was obsolete—they were reacting to P&L swings rather than anticipating them. They sat on a goldmine of behavioral data but lacked infrastructure to mine it for predictive risk signals.

The Insight

The firm treated risk management as a static 'balance check' (Did they hit the loss limit?). I saw it as a behavioral classification problem. Bad risk leaves a fingerprint long before a blowout. By applying unsupervised ML to trader behavior, we could segment users into distinct profiles—separating skilled sharpe-ratio traders from high-leverage gamblers.

What I Built

  • Architected a quantitative risk dashboard for real-time big data processing
  • Implemented K-Means Clustering (10-cluster segmentation) and XGBoost classifiers on normalized behavioral features
  • Built Dask + Parquet pipeline for parallel processing across the 89M row dataset
  • Created account-level Factor Ranks using normalized distributions, mirroring hedge fund factor investing strategies

Outcomes

  • Successfully indexed and analyzed 89 million trades
  • ML models identified high-risk behavioral clusters (martingale strategies, gambling patterns)
  • Enabled risk team to flag dangerous accounts before catastrophic losses
  • Account-level D+1 expected P&L signal for proactive intervention

Why It Matters

A standard developer builds a faster database. A standard CFO asks for a spreadsheet. This was a quantitative research lab inside a production engineering environment.

Demonstrates that Risk is a derivative of Behavior—and the technical skills to measure it at scale.

Client details anonymized. Technical implementation details available upon request.

Have a Similar Challenge?

Let's discuss how I can help you achieve similar results.

Start a Conversation