System User Guide

Learn how to use the Exchange Risk Alert System features

System Introduction

Exchange Risk Alert System is a professional FX risk analysis platform integrating ARIMA trend forecasting, GJR-GARCH volatility modeling, and Monte Carlo probability distribution, providing data-driven risk assessment tools for institutional investors and forex traders. Built on 100% real API data with 300-day historical backtest validation, achieving 90-93% Monte Carlo simulation accuracy.

Core Modules

1. Trend & Volatility Analysis (/analysis)

  • Bollinger Bands: Switchable 30/60-day windows showing MA±2σ volatility range
  • Smart interpretation panel: Auto-generates market status (normal/overbought/oversold) and recommendations
  • Interactive chart: Hover for details, zoom and pan support
  • Use cases: Daily monitoring, support/resistance identification, medium-term trend analysis

2. MC Failure Alert Center (/risk)

  • Dual-layer filtering: Layer 1 Naive anomaly detection + Layer 2 Naive@P95 dynamic verification
  • Three-level alerts: Level 0 Normal (5% failure) / Level 1 Caution (9.3% precision) / Level 2 Risk (61.7% precision)
  • Quick Summary: P25/P50/P75 price forecast, ensemble direction, Naive accuracy
  • Monte Carlo distribution: 10,000 simulations, VaR/CVaR metrics, probability charts
  • ⚠️ USD/CNY only, other pairs under development

3. Model Accuracy Validation (/accuracy-v3)

  • MC accuracy: 95% CI accuracy ~93%, P50 quantile accuracy ~92%
  • VaR breach rate: 95% VaR breach ~5% (matches theoretical expectation)
  • Direction (Testing): Ensemble model direction accuracy, three-model consensus analysis
  • Backtest: Out-of-sample validation on 300 trading days, 660 prediction samples

4. Historical Backtest Downloads (/backtest)

  • MC Alert Methodology: 5 worksheets, 660 samples, 59 failure cases detailed
  • MC Accuracy Report: Daily backtest, accuracy trends, error distribution stats
  • Naive Baseline Report: 30-day rolling window, comparison with other models
  • Auto-update: Refreshes every 20 days, version-checked on download

Model Principles

ARIMA Model (Trend Forecasting)

  • Principle: AutoRegressive Integrated Moving Average, forecasts future FX trend direction
  • Parameters: Auto-selects optimal (p,d,q) based on AIC criterion and ADF stationarity test
  • Configuration: Minimum 80 days data (optimized balance), max p=5, d=2, q=5
  • Strengths: Solid statistical foundation, interpretable | Limitations: Linear assumption, lags on shocks

GJR-GARCH Model (Volatility Forecasting)

  • Principle: Captures leverage effect ("bad news > good news"), predicts future volatility
  • Formula: σ²ₜ = ω + α·ε²ₜ₋₁ + γ·I·ε²ₜ₋₁ + β·σ²ₜ₋₁ (γ = asymmetry parameter)
  • Configuration: Fixed GJR-GARCH(1,1), annualized volatility (260 trading days)
  • Strengths: Volatility clustering, suitable for FX | Limitations: Requires 100 days return data

Monte Carlo Simulation (Probability Distribution)

  • Principle: Geometric Brownian Motion dS = μ·S·dt + σ·S·dW, 10,000 random simulations
  • Inputs: μ from ARIMA drift, σ from GARCH volatility forecast
  • Outputs: Final price distribution, P5-P95 confidence intervals, VaR/CVaR risk metrics
  • Accuracy: 95% CI accuracy 90-93% (based on 300-day out-of-sample backtest)

True Naive Model (Baseline Comparison)

  • Principle: Simplest forecast - Tomorrow's rate = Today's rate (Yesterday=Today)
  • Uses: ① Baseline comparison ② Low-volatility gatekeeper ③ Market efficiency test
  • Confidence intervals: ±0.03%/±0.05%/±0.10% (e.g., 7.20±0.05% = [7.1964, 7.2036])
  • Typical accuracy (USD/CNY): ±0.05% ~40%, high accuracy = stable market

Key Indicators

Risk Indicators

  • VaR 95%: Max possible loss at 95% confidence (e.g., -2.3% = 5% probability of exceeding 2.3% loss)
  • CVaR 95%: Average loss beyond VaR, measures tail risk (e.g., -3.1% = avg loss in worst 5%)
  • P5/P95: 5th and 95th percentiles, representing price boundaries in extreme scenarios
  • P50 (Median): 50th percentile, most likely price (more robust than mean)

Accuracy Indicators

  • CI Coverage: Proportion of actual values within predicted interval (target 95% CI = 95%)
  • Quantile accuracy: |Predicted-Actual|/Actual < 1% counts as accurate (validates distribution quality)
  • VaR breach rate: Frequency of actual loss exceeding VaR (should approach target: 95% VaR ~5%)
  • Direction accuracy (Testing): Proportion of correct direction predictions

MC Alert Indicators

  • Precision: Proportion of actual failures after alert (Level 2 = 61.7%)
  • Capture: Proportion of failures that were alerted (Level 2 = 86.4%)
  • Naive@P95: Naive accuracy at MC P95 volatility (<90% triggers Layer 2)
  • Failure definition: 95% CI or 68% CI accuracy <80%, or VaR breach rate >15%

Use Case Guide

Scenario 1: Daily FX Monitoring (3-5 min)

  • ① Homepage: Check real-time rate (auto-refresh 15 min) vs settlement rate
  • ② Analysis page: View 30-day Bollinger Bands, read smart interpretation for market status
  • ③ If abnormal: Visit Risk page, check MC alert status (Level 2 = heightened vigilance)
  • Best for: Daily routine monitoring, quick market health check

Scenario 2: Hedging Strategy (15-20 min)

  • ① Risk page: Select 7-day range, view MC 95% CI and VaR 95%
  • ② Check MC alert: Level 0 = use normally, Level 2 = caution + expand safety margin
  • ③ Reference Bollinger Bands: 60-day for medium-term trend, lower band = potential bounce, upper = pullback
  • ④ Download Excel: Report risk assessment and hedging recommendations to management

Scenario 3: Model Reliability Review (10-15 min)

  • ① Accuracy page: Select common time range (e.g., 3 days), view MC accuracy tab
  • ② Check metrics: 95% CI accuracy >90%, P50 accuracy >85%, VaR breach rate ≈5%
  • ③ If metrics abnormal: Download MC accuracy report, check trends and error distribution
  • ④ Regular archiving: Download 3 Excel reports monthly, build historical performance archive

Best Practices

  • ✅ USD/CNY first: MC alert only validated for this pair (61.7% precision)
  • ✅ Heed Level 2 alerts: Historical data shows 62% probability of actual failure, reduce position & expand stop-loss
  • ✅ Short-term more accurate: 1-3 day forecast 90-93%, 4-5 day 85-90%, 6-7 day 80-85%
  • ✅ Multi-model reference: Combine ARIMA trend, GARCH volatility, MC probability, Bollinger Band position
  • ✅ Regular validation: Monthly check accuracy page to ensure model reliability (MC accuracy should be >90%)
  • ✅ Build archive: Download Excel reports monthly to track model performance and market characteristic evolution
  • ⚠️ Weekend closure: FX markets closed on weekends, real-time rate falls back to last trading day settlement

Limitations

  • Historical data does not guarantee future performance
  • Cannot predict sudden events (e.g., central bank interventions, geopolitical events)
  • Models assume normal market conditions, may fail in extreme situations
  • Predictions are for reference only, not investment advice
  • Requires at least 200 days of historical data for accurate predictions

Technical Notes

• Data Source: 100% real OpenExchangeRates API, no synthetic data. Fallback: Frankfurter API and ExchangeRate.host

• Update Frequency: Real-time rates auto-refresh every 15 min, accuracy data daily at 04:00 UTC, Excel reports every 20 days

• Computing Performance: First prediction takes 30-60 sec (MC 10,000 simulations), then cached for 1 hour (manual refresh available)

• Data Storage: SQLite for historical accuracy, Redis cache for performance, no sensitive user data stored

• Backtest Validation: Out-of-sample validation on 300 trading days (~1.2 years), 660 prediction samples for reliable accuracy

Important Note on "Real-time Rates"

Why might Real-time and Settlement rates be identical?

Answer: Our free APIs (OpenExchangeRates, Frankfurter, etc.) only provide daily data, not minute/second-level real-time data. These APIs update once per day (typically at UTC 00:00), providing the daily closing price.

Current Implementation:

  • Settlement: Previous trading day actual close (100% accurate)
  • Real-time: Weekdays market hours = latest close + simulated movement (±0.5σ historical volatility)
  • Weekends/Closed: Real-time = latest close (no simulation)
  • Transparent Labeling: Blue notice box shown on weekdays indicating simulated data

Impact on Risk Predictions:

No Impact. All risk predictions (ARIMA, GARCH, Monte Carlo) use 100% real historical closing prices. The "real-time rate" on homepage is for reference display only and does not affect core prediction features.

For questions or suggestions, please contact technical support

Risk Disclaimer

The exchange rate predictions and risk analysis provided by this system are for reference only and do not constitute investment advice. The forex market is highly uncertain, and actual rates may significantly differ from predictions.

Please consult professional advisors before making any financial decisions. Developers are not responsible for any losses incurred from using this system.