AGENTIC RISK ENGINE

SENTINEL

A junior quant risk analyst, automated.

Two lenses on one book. A market-risk engine — VaR, a Fama-French factor model, Markowitz optimization, ML anomaly detection and stress tests. A forensic-accounting engine — fundamentals, DuPont and manipulation screens straight off SEC filings. Then an AI agent reads both and writes the risk memo.

SHARPE 1.01 · ALPHA +7.5% · BETA 0.92 · VAR95 1.69% · MAXDD −30.0% · R² 0.90 · ANOMALIES 14 · ALTMAN · PIOTROSKI · BENEISH · BENFORD · AAPL +0.4 MSFT −0.2 NVDA +1.8 JPM +0.1 XOM −0.6 JNJ +0.2 PG −0.1 CAT +0.3 NEE −0.4 WMT +0.5 · SHARPE 1.01 · ALPHA +7.5% · BETA 0.92 · VAR95 1.69% · MAXDD −30.0% · R² 0.90 · ANOMALIES 14 · ALTMAN · PIOTROSKI · BENEISH · BENFORD · AAPL +0.4 MSFT −0.2 NVDA +1.8 JPM +0.1 XOM −0.6 JNJ +0.2 PG −0.1 CAT +0.3 NEE −0.4 WMT +0.5 · SHARPE 1.01 · ALPHA +7.5% · BETA 0.92 · VAR95 1.69% · MAXDD −30.0% · R² 0.90 · ANOMALIES 14 · ALTMAN · PIOTROSKI · BENEISH · BENFORD · AAPL +0.4 MSFT −0.2 NVDA +1.8 JPM +0.1 XOM −0.6 JNJ +0.2 PG −0.1 CAT +0.3 NEE −0.4 WMT +0.5 · SHARPE 1.01 · ALPHA +7.5% · BETA 0.92 · VAR95 1.69% · MAXDD −30.0% · R² 0.90 · ANOMALIES 14 · ALTMAN · PIOTROSKI · BENEISH · BENFORD · AAPL +0.4 MSFT −0.2 NVDA +1.8 JPM +0.1 XOM −0.6 JNJ +0.2 PG −0.1 CAT +0.3 NEE −0.4 WMT +0.5 · SHARPE 1.01 · ALPHA +7.5% · BETA 0.92 · VAR95 1.69% · MAXDD −30.0% · R² 0.90 · ANOMALIES 14 · ALTMAN · PIOTROSKI · BENEISH · BENFORD · AAPL +0.4 MSFT −0.2 NVDA +1.8 JPM +0.1 XOM −0.6 JNJ +0.2 PG −0.1 CAT +0.3 NEE −0.4 WMT +0.5 · SHARPE 1.01 · ALPHA +7.5% · BETA 0.92 · VAR95 1.69% · MAXDD −30.0% · R² 0.90 · ANOMALIES 14 · ALTMAN · PIOTROSKI · BENEISH · BENFORD · AAPL +0.4 MSFT −0.2 NVDA +1.8 JPM +0.1 XOM −0.6 JNJ +0.2 PG −0.1 CAT +0.3 NEE −0.4 WMT +0.5 ·

THE PROBLEM

Risk reporting is slow, manual, and backwards-looking.

Every risk desk runs the same loop: pull data, recompute metrics, eyeball charts, write the memo — hours of analyst time producing a report about yesterday. Sentinel automates the loop end to end, across two lenses. On the market side: risk metrics, factor exposure, ML anomaly detection, network structure, stress scenarios and optimization. On the fundamental side: ratios, DuPont and forensic-accounting screens straight off SEC filings. Then the agent reads both and writes the memo, regenerated on demand in minutes.

HOW IT WORKS

One pipeline, from tick data to a written recommendation.

Data
yfinance · SEC EDGAR · Ken French
Warehouse
DuckDB
Models
risk · factor · forensic · optimize
Agent
Claude + tool use
API
FastAPI · Docker
Dashboard
Streamlit

WHAT IT DOES

Two lenses on one portfolio — the markets, and the filings behind them.

CFAMARKET-RISK LENS

Risk & VaR

Historical, Gaussian and Cornish-Fisher VaR, Basel expected shortfall, Sharpe/Sortino/Calmar and a Kupiec backtest — the 95% VaR passes out-of-sample (p=0.58).

Factor Model

A Fama-French 6-factor regression on excess returns: R² 0.90, market beta 0.94, and a factor-adjusted alpha of +7.5% (t=3.7) that survives all six factors.

Portfolio Optimization

A Markowitz efficient frontier via long-only SLSQP: max-Sharpe lifts the equal-weight book from 1.01 to 1.18; min-variance cuts vol from 18.7% to 15.5%.

Anomaly Detection

IsolationForest + a PyTorch autoencoder independently rediscovered the COVID crash and the 2025 tariff shock — from raw returns alone.

Stress Testing

Named macro scenarios replayed over history: a 2008-style crash takes daily VaR from 1.7% to 4.6% and the drawdown to −97%.

Network Risk

A correlation network that recovers sectors with zero labels and ranks systemic importance by eigenvector centrality.

CAFUNDAMENTAL & FORENSIC LENS

Fundamentals & DuPont

SEC EDGAR XBRL → liquidity, solvency and profitability ratios with a 3-step DuPont bridge: Apple's 152% ROE is buyback-shrunk equity; Walmart's 21% is 2.5× asset turnover.

Forensic Screens

Altman Z, Piotroski F, Beneish M, Sloan accruals and Benford's Law — distress and earnings-manipulation screens run straight off the filings, with bank/utility exclusions handled honestly.

AGENTREADS BOTH LENSES

AI Risk Memo

An agent with tool access to every model above answers questions and writes the analyst memo — market risk, factor exposure, forensic flags, stress and allocation, then a recommendation.

SHOWCASE

Real outputs, not mockups.

sentinel — risk terminalopen live →
Sentinel Streamlit dashboard — portfolio KPI cards, growth of $1 chart, and rolling volatility
$curl localhost:8000/memo — auto-generated
# Sentinel Risk Memo — 2026-07-02

## 2. Market Risk & Factor Exposure
Sharpe 1.01, beta 0.92 vs SPY. Fama-French
alpha +7.5% (t=3.7), R² 0.90 — survives all
six factors. NVDA is 10% of capital, 19% of
portfolio risk.

## 4. Fundamental & Forensic Screens
AAPL ROE 152% — buyback-shrunk equity, not
operating strength. NVDA trips Beneish (M
−1.18): a hypergrowth false positive, not
manipulation.

## 5. Stress Tests & Allocation
2008-style crash: VaR95 1.7% → 4.6%. A
max-Sharpe reweight lifts Sharpe 1.01 → 1.18.

## 6. Recommendation
The binding constraint is the systemic
scenario: sector diversification does not
survive correlated drawdowns...

TECH STACK

Boring tools, deliberately.

  • Python
  • pandas
  • PyTorch
  • scikit-learn
  • scipy
  • NetworkX
  • DuckDB
  • SEC EDGAR
  • FastAPI
  • Docker
  • Anthropic API
  • Streamlit
  • Next.js