What you need
Data sources
- Holdings database — current positions, cost basis, allocation targets, and asset class tags
- Market data API — daily closing prices, benchmark indices, interest rates, and volatility measures
- Core banking system — fund-level metadata, client mandates, and risk limit definitions
Knowledge spaces
- Investment policy statements — upload fund mandates, risk tolerance parameters, and allocation constraints
- Risk management guidelines — internal procedures for limit breaches, escalation protocols, and reporting standards
| Component | Name | Definition |
|---|---|---|
| Object | Portfolio | Maps to the portfolios table in the holdings database. Represents a managed fund or account |
| Object | Position | Maps to positions in the holdings database. Represents a single security holding within a portfolio |
| Metric | Value at Risk (VaR) | 1-day 95% parametric VaR calculated from position weights and historical return covariance |
| Metric | Sharpe Ratio | (Portfolio return - risk-free rate) / portfolio standard deviation, annualized |
| Metric | Tracking Error | Standard deviation of the difference between portfolio and benchmark returns |
| Dimension | Asset Class | Categorizes positions as equity, fixed income, commodity, or alternative |
| Dimension | Sector | Groups equity positions by GICS sector classification |
Agent setup
Create the agent
Go to Agent Space → New agent.
| Field | Value |
|---|---|
| Name | Risk Monitor |
| Role | Portfolio Risk Analyst |
| Goal | Monitor portfolio risk metrics daily, identify limit breaches and concentration risks, and answer ad-hoc risk queries from portfolio managers |
Set the description
You are a quantitative risk analyst focused on portfolio surveillance. You compute and interpret risk metrics including VaR, Sharpe ratio, and tracking error. You flag any positions or sectors that exceed defined limits and provide concise, data-driven explanations. You avoid making investment recommendations and instead present risk data objectively so portfolio managers can make informed decisions.
Scope data access
Grant access to:
- Holdings database (portfolios, positions)
- Market data API (prices, indices, rates)
- Core banking system (fund metadata, risk limits)
- Investment policy statements knowledge space
- Risk management guidelines knowledge space
- Portfolio and Position objects, VaR, Sharpe Ratio, and Tracking Error metrics
Add skills
Daily risk snapshot
Daily risk snapshot
Trigger: User asks for a risk summary of a specific portfolio or all portfolios.
- Pull current positions and weights from the holdings database for the requested portfolio.
- Retrieve the latest closing prices and benchmark index levels from the market data API.
- Calculate 1-day VaR, Sharpe ratio, and tracking error using the semantic layer metrics.
- Compare each metric against the risk limits defined in the core banking system.
- Highlight any breaches or near-breaches (within 10% of limit).
- Return a formatted summary table with portfolio name, each metric value, limit, and status.
Concentration analysis
Concentration analysis
Trigger: User asks about sector, asset class, or single-name concentration.
- Query position weights grouped by the requested dimension (sector, asset class, or individual security).
- Retrieve the concentration limits from the investment policy statement knowledge space.
- Rank exposures from highest to lowest weight.
- Flag any that exceed or approach the concentration limit.
- Return a ranked table with the dimension value, current weight, limit, and overweight/underweight status.
Drawdown analysis
Drawdown analysis
Trigger: User asks about portfolio drawdown or peak-to-trough loss.
- Pull daily portfolio NAV history from the holdings database.
- Retrieve the benchmark return series from the market data API.
- Calculate the maximum drawdown, current drawdown from peak, and recovery period.
- Compare portfolio drawdown to benchmark drawdown over the same period.
- Return a summary with drawdown figures, dates, and relative performance versus benchmark.
Automation
Playbook: Daily portfolio risk report
Set the trigger
Set the trigger to Schedule — Daily at 7:00 AM, after markets have closed and end-of-day prices are available.
Build the workflow
The workflow computes risk metrics across all active portfolios and delivers a consolidated report:
- Query all active portfolios and their current positions from the holdings database.
- Query the latest closing prices, risk-free rate, and benchmark returns from the market data API.
- Python code block — compute VaR, Sharpe ratio, and tracking error for each portfolio. The code uses position weights and a covariance matrix built from 252-day historical returns to calculate parametric VaR at the 95% confidence level. You can customize the lookback window and confidence interval.
The risk metrics computation step uses a Python code block to calculate Value at Risk using variance-covariance methodology, Sharpe ratio from annualized returns, and tracking error against the benchmark. You can customize the confidence level, lookback period, and risk-free rate source.
- Condition — check each portfolio for limit breaches. If any metric exceeds its defined threshold, flag the portfolio as “breach” and include it in an escalation list.
- Loop — for each breached portfolio, generate a detailed breakdown showing which metric breached, by how much, and the top contributing positions.
- Delivery — compile results into a formatted daily risk report.
Configure delivery
- Email — send the full daily risk report to the risk management distribution list
- Slack — post a summary to
#risk-alertswith breach highlights only - Email escalation — if any portfolio has a VaR breach, send an immediate escalation to the Chief Risk Officer
What’s next
Transaction anomaly detection
Detect unusual transactions that may signal fraud or operational errors across your accounts.
All Finance & Banking use cases
See the full list.

