Unlisted
Like
Optionevents
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data ā all from the browser, and deployed in milliseconds.
index.ts
https://MRPRRSIDENT--e422e520949911f0a25e0224a6c84d84.web.val.run
A comprehensive FRTB (Fundamental Review of the Trading Book) Calculator built for MP Capital's risk management operations. This application calculates market risk capital requirements for banks and financial institutions according to the Basel III FRTB framework using the Simplified Standardized Approach.
This professional-grade financial risk management tool helps calculate regulatory capital requirements across four major asset classes:
- Equities (stocks, indices)
- Fixed Income (bonds, treasuries, corporate debt)
- Foreign Exchange (currency pairs, FX derivatives)
- Commodities (energy, metals, agricultural products)
- Delta Risk: Linear price risk from underlying asset movements
- Vega Risk: Risk from volatility changes
- Curvature Risk: Non-linear price risk (gamma effects)
- Basel III Compliance: Uses official risk weights and correlation factors
- MP Capital Branding: Custom styling with company colors and fonts
- Results Dashboard: Comprehensive risk visualization
- Input Methods: Manual forms, Excel upload, sample data
- Responsive Design: Works on desktop and mobile devices
POST /api/calculate
: Performs FRTB calculationsGET /api/sample-data
: Returns sample trading book data
āāā backend/
ā āāā index.ts # Hono API server with HTTP trigger
āāā frontend/
ā āāā index.html # Results dashboard
ā āāā input.html # Data input interface
āāā shared/
ā āāā frtb-calculator.ts # Core calculation engine
āāā README.md
With pre-loaded sample data:
- Total Capital Requirement: ~$4.35 million
- Risk-Weighted Assets: ~$54.3 million
- Asset Class Breakdown:
- Fixed Income: $2.9M (largest risk component)
- FX: $518K
- Commodities: $475K
- Equities: $455K
- Primary:
#1a365d
(Deep Navy) - Secondary:
#2d5a87
(Medium Blue) - Accent:
#4a90b8
(Light Blue)
- Font: Inter (Google Fonts)
- Weights: 300, 400, 500, 600, 700
- Backend: Hono.js framework
- Frontend: Vanilla HTML/CSS/JavaScript
- Styling: TailwindCSS + Custom MP Capital theme
- File Handling: SheetJS for Excel processing
- Deployment: Val Town serverless platform
This calculator implements:
- Basel III FRTB Simplified Standardized Approach
- Official risk weights for all asset classes
- Correlation adjustments and stress scenarios
- Proper risk aggregation methodologies
- Transparent calculations with detailed explanations
- Access the Application: Navigate to the main URL
- View Results: See pre-calculated sample results on the dashboard
- Input Data: Use
/input
to enter your own trading book positions - Multiple Input Methods:
- Manual form entry
- Excel file upload (with template)
- Load sample data for testing
- Risk Managers calculating regulatory capital
- Compliance Teams ensuring Basel III adherence
- Finance Professionals learning FRTB methodology
- Banks & Financial Institutions requiring capital calculations
Ā© 2024 MP Capital. All rights reserved.
Basel III FRTB Compliance Tool