Skip to main content
Portfolio managers need timely visibility into risk exposure across asset classes, sectors, and individual positions. Manually pulling market data, computing Value at Risk, and comparing against limits is slow and error-prone — especially when markets move quickly. By the time a spreadsheet-based risk report is ready, the window for corrective action may have already closed. Wayak connects your holdings database and market data feeds, computes risk metrics through a playbook with Python code execution, and delivers daily risk snapshots to the right people. An agent lets portfolio managers query risk metrics conversationally, drilling into specific positions or sectors without waiting for a scheduled report.

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
Semantic layer: Define these in your ontology before setting up the agent.
ComponentNameDefinition
ObjectPortfolioMaps to the portfolios table in the holdings database. Represents a managed fund or account
ObjectPositionMaps to positions in the holdings database. Represents a single security holding within a portfolio
MetricValue at Risk (VaR)1-day 95% parametric VaR calculated from position weights and historical return covariance
MetricSharpe Ratio(Portfolio return - risk-free rate) / portfolio standard deviation, annualized
MetricTracking ErrorStandard deviation of the difference between portfolio and benchmark returns
DimensionAsset ClassCategorizes positions as equity, fixed income, commodity, or alternative
DimensionSectorGroups equity positions by GICS sector classification
See building a semantic layer for a step-by-step guide.

Agent setup

1

Create the agent

Go to Agent SpaceNew agent.
FieldValue
NameRisk Monitor
RolePortfolio Risk Analyst
GoalMonitor portfolio risk metrics daily, identify limit breaches and concentration risks, and answer ad-hoc risk queries from portfolio managers
2

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.
3

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
4

Add skills

Trigger: User asks for a risk summary of a specific portfolio or all portfolios.
  1. Pull current positions and weights from the holdings database for the requested portfolio.
  2. Retrieve the latest closing prices and benchmark index levels from the market data API.
  3. Calculate 1-day VaR, Sharpe ratio, and tracking error using the semantic layer metrics.
  4. Compare each metric against the risk limits defined in the core banking system.
  5. Highlight any breaches or near-breaches (within 10% of limit).
  6. Return a formatted summary table with portfolio name, each metric value, limit, and status.
Trigger: User asks about sector, asset class, or single-name concentration.
  1. Query position weights grouped by the requested dimension (sector, asset class, or individual security).
  2. Retrieve the concentration limits from the investment policy statement knowledge space.
  3. Rank exposures from highest to lowest weight.
  4. Flag any that exceed or approach the concentration limit.
  5. Return a ranked table with the dimension value, current weight, limit, and overweight/underweight status.
Trigger: User asks about portfolio drawdown or peak-to-trough loss.
  1. Pull daily portfolio NAV history from the holdings database.
  2. Retrieve the benchmark return series from the market data API.
  3. Calculate the maximum drawdown, current drawdown from peak, and recovery period.
  4. Compare portfolio drawdown to benchmark drawdown over the same period.
  5. Return a summary with drawdown figures, dates, and relative performance versus benchmark.

Automation

Playbook: Daily portfolio risk report

1

Set the trigger

Set the trigger to Schedule — Daily at 7:00 AM, after markets have closed and end-of-day prices are available.
2

Build the workflow

The workflow computes risk metrics across all active portfolios and delivers a consolidated report:
  1. Query all active portfolios and their current positions from the holdings database.
  2. Query the latest closing prices, risk-free rate, and benchmark returns from the market data API.
  3. 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.
  1. 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.
  2. Loop — for each breached portfolio, generate a detailed breakdown showing which metric breached, by how much, and the top contributing positions.
  3. Delivery — compile results into a formatted daily risk report.
3

Configure delivery

  • Email — send the full daily risk report to the risk management distribution list
  • Slack — post a summary to #risk-alerts with breach highlights only
  • Email escalation — if any portfolio has a VaR breach, send an immediate escalation to the Chief Risk Officer
4

Test and activate

Click Run now to test with live data, then toggle to Active.

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.