Mathematical Specifications

Financial Calculation
Methodology & Formulas

Real Rate adheres to rigorous quantitative benchmarks. This documentation details the exact mathematical formulas, conversion factors, and data feeds powering our precious metals, currency, and crypto calculations.

Protocol v1.4•Specification Status: Verified Institutional Standard•100% Transparent

1. International Spot (LBMA) to Local Tola & Gram Parity

Standardized Metric & Subcontinental Weight Conversions

Precious metals trade globally on OTC wholesale markets (such as the London Bullion Market Association - LBMA) quoted in US Dollars per Troy Ounce (XAU/USD, XAG/USD). To calculate fair domestic market value, we apply high-precision international weights:

Troy Ounce Constant1 oz = 31.1034768 grams
Subcontinental Tola Constant1 Tola = 11.6638038 grams
Mathematical Formula:
Price per Gram (PKR) = [ LBMA Spot (USD/oz) × Interbank USD/PKR ] ÷ 31.1034768
Price per Tola (24K) = Price per Gram × 11.6638038 ≈ LBMA Spot × USD/PKR × 0.375
Price per 10 Grams = Price per Gram × 10

2. Sarafa Karat Purity Multipliers

Millesimal Fineness & Alloy Density Calibration

Sarafa syndicates price gold based on pure gold parts out of 24. We compute exact karat values by applying standardized millesimal fineness fractions to the base 24K pure bullion spot benchmark:

Karat StandardMillesimal FinenessMathematical FactorPrimary Application
24 Karat (24K)999.0+ Fine1.0000 (24 / 24)Raw investment bars, bullion biscuits, sovereign minting
22 Karat (22K)916.7 Fine0.9167 (22 / 24)Traditional bridal jewelry, high-durability ornament crafting
21 Karat (21K)875.0 Fine0.8750 (21 / 24)Middle Eastern and Gulf jewelry trade standard
18 Karat (18K)750.0 Fine0.7500 (18 / 24)Modern luxury designer jewelry and diamond stone setting

3. Foreign Exchange Spreads: Interbank vs. Open Market

Dual Benchmark Mechanics & Bid-Ask Spread Analytics

Real Rate distinguishes between two foundational currency benchmarks to protect traders and remittance recipients from hidden markups:

Official Interbank Benchmark

The wholesale rate utilized by the State Bank of Pakistan (SBP), commercial banks, and institutional trade entities for electronic wire settlements, sovereign debt, and letters of credit. Characterized by tight spreads (typically 0.20% to 0.40%).

Open Market Cash Rate

The retail cash exchange rate offered at exchange company counters for physical paper banknotes. Incorporates banknote air freight logistics, customs duties, physical vault storage insurance, and retail dealership profit margins.

Spread & Premium Equations:
Bid-Ask Spread (%) = [ (Cash Ask - Cash Bid) ÷ Mid-Market Rate ] × 100%
Open Market Premium = [ (Open Market Rate - Interbank Rate) ÷ Interbank Rate ] × 100%

4. Primary Institutional Data Providers & Feeds

Direct Upstream Telemetry Sources & Ingestion Standards

London Bullion Market (LBMA)

Institutional OTC spot fixing feeds for Gold (XAU), Silver (XAG), Platinum (XPT), and Palladium (XPD) via Gold-API.com and Comex real-time order books.

APSGJA & Sarafa Committees

Daily physical bullion market announcements compiled from All Pakistan Sarafa Gem and Jewellers Association & Rawalpindi / Karachi Sarafa bazaars.

State Bank of Pakistan (SBP)

Official interbank weighted-average exchange rate fixings for sovereign trade settlements and electronic interbank wire clearings.

Forex Association of Pakistan (FAP)

Licensed currency exchange companies retail cash buy/sell bid-ask sheets for physical foreign currency banknotes.

4. Data Pipeline & Zero-Knowledge Security

Sub-Second WebSocket Feeds & Client-Side AES-256-GCM Encryption

Multi-Source Aggregation: Our ingestion cluster cross-references Sarafa association bulletins, Central Bank interbank fixing feeds, and Binance cryptocurrency order books to detect and discard outliers.

Zero-Knowledge Client Encryption: When you manage assets in the Real Rate Portfolio tracker, all quantities, buy prices, and net worth records are encrypted locally in your browser using AES-256-GCM. No unencrypted financial holding data is ever stored on our servers.

Server-Sent Events (SSE): Live market rates are broadcast via lightweight HTTP streaming (`/api/rates/stream`) with automatic reconnection and sub-second price delta alerts.

Notice

Disclaimer

All rates and calculations provided by Real Rate are for informational purposes only. Local market prices may vary significantly from the rates shown. Always verify with your local bullion dealer or bank before making any financial decisions. Real Rate is not liable for any financial losses or damages.