Risk Management for Market Makers | Market Making with XRP | XRP Academy - XRP Academy
3 free lessons remaining this month

Free preview access resets monthly

Upgrade for Unlimited
Skip to main content
advanced55 min

Risk Management for Market Makers

Learning Objectives

Categorize the risks facing market makers (market, operational, counterparty, regulatory)

Quantify risk exposure using VaR, scenario analysis, and stress testing

Design position limits, loss limits, and other risk controls

Develop response protocols for various risk scenarios

Apply risk management principles to XRP-specific situations

The market making graveyard is full of traders who had great strategies but poor risk management. A single bad day—a flash crash, an exchange failure, a fat finger error—can destroy years of careful profit accumulation.

Risk management is what separates market making businesses from market making experiments. It's not glamorous. It doesn't generate returns directly. But without it, nothing else matters.

This lesson will sometimes feel like a catalog of things that can go wrong. That's intentional. The first step in risk management is acknowledging what can hurt you.


MARKET RISK CATEGORIES
  1. Price Risk (Inventory Risk)
  1. Spread Risk
  1. Volatility Risk
  1. Correlation Risk
  1. Liquidity Risk
OPERATIONAL RISK CATEGORIES
  1. Technology Failure
  1. Human Error
  1. Process Failure
  1. Third-Party Failure
  1. Security Breaches
COUNTERPARTY RISK CATEGORIES
  1. Exchange Risk
  1. Settlement Risk
  1. Gateway/Issuer Risk (XRPL specific)
  1. Clearing Risk
REGULATORY RISK CATEGORIES
  1. Enforcement Risk
  1. Market Structure Changes
  1. Tax Risk
  1. Operational Jurisdiction Risk

VAR CALCULATION FOR MARKET MAKERS

VaR answers: "What's the maximum I expect to lose over period X with Y% confidence?"

PARAMETRIC VAR

VaR = Position × Price × Volatility × Z-score × √Time

  • Position: XRP quantity held
  • Price: Current XRP price
  • Volatility: Daily standard deviation of returns
  • Z-score: 1.65 for 95%, 2.33 for 99%
  • Time: Holding period in days
  • Position: 50,000 XRP
  • Price: $2.00
  • Position value: $100,000
  • Daily volatility: 4%
  • 95% 1-day VaR = $100,000 × 4% × 1.65 × √1

Interpretation: 95% of days, won't lose more than $6,600 from position movement.
5% of days (roughly monthly), could lose more.

LIMITATIONS OF VAR

  • Assumes normal distribution (crypto returns aren't normal)
  • Doesn't capture tail risk well
  • Backward-looking (uses historical volatility)
  • Single number obscures risk distribution
EXPECTED SHORTFALL (CVaR)

Expected shortfall asks: "If we exceed VaR, how bad is it on average?"

Calculation:
ES = Average loss in worst (1-confidence)% of scenarios

  • 95% VaR: $6,600
  • 95% ES might be: $10,000

This means: When we exceed VaR (5% of days), average loss is $10,000.

  • Captures tail risk
  • Sub-additive (portfolio ES ≤ sum of component ES)
  • More relevant for fat-tailed distributions like crypto
SCENARIO ANALYSIS FOR XRP MARKET MAKING

Define specific scenarios and estimate impact:

  • XRP drops 20% in 1 hour

  • Order books thin dramatically

  • Can't exit at normal prices

  • Primary exchange goes offline for 4 hours

  • Can't adjust quotes or hedge

  • Price moves against inventory

  • SEC announces new XRP restrictions

  • Price drops 30%, volatility spikes

  • All correlations go to 1

  • Exchange where capital held fails

  • All funds on exchange lost

STRESS TEST FRAMEWORK
  • Historical events (March 2020, May 2021)
  • Hypothetical events (major exchange hack, US crypto ban)
  • XRP-specific (Ripple bankruptcy, SEC appeal)
  • Price movement: -30% to -50%
  • Volatility spike: 3-5x normal
  • Liquidity: -70% to -90%
  • Correlation: Goes to 1.0
  • Apply parameters to current positions
  • Include second-order effects (can't hedge, spreads blow out)
  • Can you survive this scenario?
  • How much buffer remains?

EXAMPLE STRESS TEST

  • Capital: $200,000
  • XRP position: +30,000 XRP ($60,000)
  • Open orders: $40,000 notional
  • XRP drops 40%
  • Volatility 5x normal
  • Liquidity -80%
  • Position loss: $60,000 × 40% = $24,000
  • Can't exit remaining—forced to hold
  • Spread capture: Zero (too dangerous to quote)
  • Duration: 1 week before normal
  • Capital remaining: $200,000 - $24,000 = $176,000
  • Can still operate: Yes
  • Verdict: Survivable but painful

POSITION LIMIT FRAMEWORK

Maximum position = f(Capital, Volatility, Risk tolerance)

CALCULATION APPROACH

Method 1: Volatility-based
Max position = Capital × Risk% / (Price × Daily_Vol × Z-score)

  • Capital: $200,000
  • Risk per day (willing to lose): 2% = $4,000
  • XRP price: $2.00
  • Daily volatility: 4%
  • Z-score (95%): 1.65

Max position = $4,000 / ($2.00 × 4% × 1.65)
= $4,000 / $0.132
= 30,303 XRP

Method 2: Capital percentage
Max position = Capital × Position% / Price

  • Capital: $200,000
  • Position limit: 30% of capital
  • Max position = $200,000 × 30% / $2.00 = 30,000 XRP

Method 3: Stress-based
Max position = Survivable_loss / Stress_scenario_move

  • Can survive $50,000 loss
  • Stress scenario: 40% drop
  • Max position = $50,000 / 40% = $125,000 = 62,500 XRP

USE THE SMALLEST of all three methods.
```

LOSS LIMIT HIERARCHY
  • Max loss on single trade: 0.1-0.2% of capital
  • Purpose: Prevent single catastrophic trade
  • Example: $200K capital → $200-400 max per trade
  • Max loss in rolling hour: 0.5% of capital
  • Purpose: Catch fast deterioration
  • Example: $200K capital → $1,000 max per hour
  • Max loss in trading day: 1-2% of capital
  • Purpose: Limit daily damage
  • Example: $200K capital → $2,000-4,000 max per day
  • Max loss in week: 3-5% of capital
  • Purpose: Catch sustained losing streaks
  • Example: $200K capital → $6,000-10,000 max per week
  • Max decline from equity peak: 10-20%
  • Purpose: Existential protection
  • Example: $200K capital → $20,000-40,000 max drawdown

BREACH RESPONSE

Breach Level 1-2: Pause trading, review, can resume after analysis
Breach Level 3: Stop for day, mandatory review
Breach Level 4: Stop for week, strategy review required
Breach Level 5: Stop indefinitely, complete reassessment
```

EXPOSURE LIMIT TYPES
  • Max % of capital on single exchange: 30-50%
  • Max % in single currency pair: 50-70%
  • Max % in correlated positions: 60-80%
  • Total notional value of all positions
  • Limits leverage
  • Example: Max 150% of capital gross exposure
  • Net directional exposure across all positions
  • Example: Max 40% of capital net long or short
  • Maximum capital per exchange
  • Diversifies counterparty risk
  • Example: No more than $100K on any single CEX
ADJUSTING LIMITS TO CONDITIONS
  • High volatility: Reduce limits 30-50%
  • Normal volatility: Standard limits
  • Low volatility: Can modestly increase limits
  • At 50% of drawdown limit: Reduce position limits 30%
  • At 75% of drawdown limit: Reduce position limits 50%
  • At 90% of drawdown limit: Minimal positions only
  • Before major announcements: Reduce 50%+
  • During exchange issues: Reduce or halt
  • During XRP-specific news: Reduce or halt

IMPLEMENTATION

def calculate_current_limits(base_limits, conditions):
vol_multiplier = get_volatility_multiplier(conditions.volatility)
drawdown_multiplier = get_drawdown_multiplier(conditions.current_drawdown)
event_multiplier = get_event_multiplier(conditions.pending_events)

current_limits = {}
for limit_name, base_value in base_limits.items():
current_limits[limit_name] = base_value * vol_multiplier *
drawdown_multiplier * event_multiplier
return current_limits
```


EXCHANGE RISK SCENARIOS AND RESPONSES
  • Your funds potentially stolen
  • Mitigation:
  • FTX-style collapse
  • Mitigation:
  • Can't access funds but exchange still operating
  • Mitigation:

CAPITAL ALLOCATION RULE

Never have more than 30-40% of total capital on any single exchange.
Keep 20-30% in self-custody as reserve.
```

VOLATILITY EVENT RESPONSE PROTOCOL
  1. Reduce position limits 50%+
  2. Widen spreads 2-3x
  3. Cancel limit orders far from market
  4. Ensure hedging capability ready
  1. If positions within limits: Hold and adjust quotes
  2. If positions breaching limits: Reduce exposure (accept slippage)
  3. Monitor P&L continuously
  4. Be ready to trigger kill switch
  1. Reconcile all positions
  2. Assess actual P&L impact
  3. Document lessons learned
  4. Gradually return to normal operations

BLACK SWAN PROTOCOL

  1. Immediately trigger kill switch (cancel all orders)
  2. Assess position and P&L
  3. Do NOT try to trade your way out
  4. Wait for market stabilization
  5. Manual review before resuming
TECHNOLOGY FAILURE SCENARIOS
  • Trading system stops unexpectedly
  • Orders may remain open
  • Can't reach exchange(s)
  • Stale quotes exposed to adverse selection
  • Market data is stale or wrong
  • Quoting based on bad information

RECOVERY PROCEDURES

  1. Verify system state (positions, orders, balances)
  2. Reconcile with exchange records
  3. Identify root cause
  4. Implement fix or workaround
  5. Test before resuming
  6. Document incident
XRP-SPECIFIC RISK SCENARIOS
  • Regulatory uncertainty returns
  • Price drops 20-40%, volatility spikes
  • Reduce exposure pre-announcement if possible
  • Wide spreads during uncertainty
  • Maintain ability to exit entirely if needed
  • Ripple sells unusual amount from escrow
  • Sustained selling pressure
  • Monitor escrow release announcements
  • Reduce bids if large sale announced
  • Don't fight the flow
  • Ledger halts or slows dramatically
  • DEX orders stuck
  • This is rare (XRPL has strong uptime)
  • Can't do much if ledger halts
  • CEX positions unaffected
  • Wait for resolution
  • Issuer of currency you hold defaults
  • Your "USD" on XRPL becomes worthless
  • Use only reputable issuers (Bitstamp, GateHub)
  • Don't hold large amounts of issued currencies
  • Prefer XRP positions over issued currency positions

MARKET MAKER RISK FRAMEWORK

┌─────────────────────────────────────────────────────────┐
│ RISK GOVERNANCE │
│ • Risk appetite statement │
│ • Limit approval process │
│ • Exception handling │
│ • Regular review schedule │
└────────────────────────┬────────────────────────────────┘

┌────────────────────────┴────────────────────────────────┐
│ RISK IDENTIFICATION │
│ • Market risks │
│ • Operational risks │
│ • Counterparty risks │
│ • Regulatory risks │
└────────────────────────┬────────────────────────────────┘

┌────────────────────────┴────────────────────────────────┐
│ RISK MEASUREMENT │
│ • VaR / Expected Shortfall │
│ • Scenario analysis │
│ • Stress testing │
│ • Position/P&L monitoring │
└────────────────────────┬────────────────────────────────┘

┌────────────────────────┴────────────────────────────────┐
│ RISK MITIGATION │
│ • Position limits │
│ • Loss limits │
│ • Diversification rules │
│ • Hedging strategies │
└────────────────────────┬────────────────────────────────┘

┌────────────────────────┴────────────────────────────────┐
│ RISK MONITORING │
│ • Real-time dashboards │
│ • Automated alerts │
│ • Daily reports │
│ • Periodic reviews │
└─────────────────────────────────────────────────────────┘
```

RISK BUDGET ALLOCATION

Total risk budget: Define max acceptable loss (e.g., 20% of capital)

  • Market risk: 70% of budget (primary activity risk)
  • Operational risk: 15% of budget
  • Counterparty risk: 10% of budget
  • Other risks: 5% of budget
  • Total risk budget: $40,000 (20%)
  • Market risk budget: $28,000
  • Operational risk budget: $6,000
  • Counterparty risk budget: $4,000
  • Other: $2,000

USING RISK BUDGETS

Size positions so that worst-case market loss stays within market risk budget.
Design operations so that worst-case operational failure stays within operational budget.
Diversify across counterparties so single failure stays within counterparty budget.
```

RISK DOCUMENTATION REQUIREMENTS
  • Risk appetite statement
  • Limit framework document
  • Emergency procedures
  • Recovery procedures
  • Current limits (updated with changes)
  • Counterparty list with limits
  • Alert threshold configuration
  • Contact list for emergencies
  • Daily: P&L review, limit utilization
  • Weekly: Risk metrics, near-misses
  • Monthly: Full limit review, stress tests
  • Quarterly: Framework review, policy updates
  • Annually: Complete reassessment

POST-INCIDENT REQUIREMENTS

  1. Incident report (what happened, impact, response)
  2. Root cause analysis
  3. Lessons learned
  4. Control improvements
  5. Policy updates if needed


Assignment: Create a comprehensive risk management framework for your market making operation.

Requirements:

  1. Risk Identification: Catalog all relevant risks for your specific operation
  2. Quantification: Calculate VaR, define stress scenarios, estimate exposures
  3. Limits: Specify position limits, loss limits, exposure limits with rationale
  4. Monitoring: Define metrics, thresholds, and alert conditions
  5. Procedures: Document response protocols for key scenarios
  6. Review: Establish documentation and review schedule

Format: Policy document, 3,000-4,000 words
Time Investment: 4-5 hours


Q1: What's the primary limitation of VaR as a risk measure?
A: Doesn't capture tail risk well; assumes normal distribution; backward-looking

Q2: If you're willing to risk 2% of $200K capital daily and volatility is 4%, what's max position at $2/XRP?
A: $4,000 / ($2 × 4% × 1.65) ≈ 30,000 XRP

Q3: What should happen when daily loss limit is breached?
A: Stop trading for the day; mandatory review before resuming

Q4: What's the recommended maximum capital concentration on a single exchange?
A: 30-40% of total capital

Q5: What triggers a black swan protocol response?
A: Extreme moves (>3 sigma); immediate kill switch and wait for stabilization


End of Lesson 7
Total Words: ~6,900

Key Takeaways

1

Risks are multi-dimensional:

Market, operational, counterparty, and regulatory risks all matter. Address all categories.

2

Quantify before you trade:

Calculate VaR, run stress tests, and know your worst-case exposure before committing capital.

3

Limits must be enforced:

Having limits means nothing if breaches don't trigger action. Automate enforcement where possible.

4

Diversification is defense:

Don't concentrate capital, positions, or technology. Redundancy is expensive but essential.

5

Survive first, profit second:

Conservative risk management may reduce returns in good times, but it ensures you're around for the good times. ---