RealizeAlpha includes an institutional-grade quantitative risk engine that calculates Beta-Weighted Portfolio Delta ($\Delta_\beta$) and aggregate cross-asset Greeks (Gamma, Vega, Theta) across equities, options, futures, cryptocurrencies, and forex.
Standard portfolio delta sums raw delta values across options contracts ($\sum \Delta_i$), but raw delta suffers from the apples-to-oranges fallacy: 100 deltas of an ultra-volatile tech stock (e.g., NVDA, beta $\beta = 2.1$) represent vastly different dollar exposure than 100 deltas of a defensive consumer staple (e.g., KO, beta $\beta = 0.55$) or a 3x leveraged ETF (e.g., TQQQ, beta $\beta = 3.0$).
Beta-weighting normalizes every position in a multi-asset portfolio against a single liquid benchmark index (by default SPY, with 1-tap switching to QQQ, DIA, or IWM). This translates disparate holdings into equivalent benchmark index shares:
\[\Delta_{\beta, \text{pos}} = \Delta_{\text{pos}} \times \left(\frac{S_{\text{pos}}}{S_{\text{benchmark}}}\right) \times \beta_{\text{pos}}\]Where:
The dollar risk per 1% move in the benchmark is computed directly as:
\[\$ \Delta_{1\%} = \Delta_{\beta, \text{portfolio}} \times S_{\text{benchmark}} \times 0.01\]If a portfolio has $\Delta_{\beta-SPY} = +250$ with SPY at $500, a +1% rally in the S&P 500 will generate an expected gain of:
\[\$ \Delta_{1\%} = 250 \times 500 \times 0.01 = +\$1,250.00\]The analytics engine (AnalyticsUtils.calculateBetaWeightedGreeks) natively aggregates risk across five major asset classes:
| Asset Class | Position Type | Spot Valuation | Beta Fallback Source | Formula |
|---|---|---|---|---|
| Equities | InstrumentPosition |
Last trade quote / average buy price | Fundamental beta or fallback: 1.0 (default), 3.0 (3x bull), -3.0 (3x bear) | $\text{Shares} \times \left(\frac{S}{S_B}\right) \times \beta$ |
| Options | OptionAggregatePosition |
Underlying instrument quote | Underlying fundamental beta or asset fallback | $\text{Contracts} \times 100 \times \Delta \times \left(\frac{S}{S_B}\right) \times \beta$ |
| Futures | FuturesPositionStore |
Product contract quote / trade price | /ES: 1.0, /NQ: 1.25, /YM: 0.95, /RTY: 1.15, /CL: 0.35, /GC: 0.10 | $\text{Contracts} \times \text{Multiplier} \times \left(\frac{S}{S_B}\right) \times \beta$ |
| Crypto | ForexHolding |
Currency pair quote (BTC, ETH, SOL) | BTC: 1.6, ETH: 1.8, SOL: 2.0, other crypto: 1.4 | $\text{Qty} \times \left(\frac{S}{S_B}\right) \times \beta_{\text{crypto}}$ |
| Forex | ForexHolding |
Fiat currency quote (EUR, GBP, JPY) | Fiat currencies: 0.15 | $\text{Qty} \times \left(\frac{S}{S_B}\right) \times 0.15$ |
PortfolioGreeksCard)The PortfolioGreeksCard widget in lib/widgets/portfolio/portfolio_greeks_card.dart provides an interactive, institutional-grade analytics dashboard embedded in the Portfolio Risk Section (RiskSectionPage):
Icons.info_outline) displaying complete mathematical formulations, greek interpretations, and guidance on delta hedging strategies.In RiskSectionPage (lib/widgets/portfolio/risk_section_page.dart), the card is connected to the application’s global state and stores:
PortfolioGreeksCard(
positions: options,
equityPositions: portfolio.positions,
futuresStore: futuresStore,
forexStore: forexStore,
benchmarkSymbol: controller.selectedBenchmark,
benchmarkPrice: controller.benchmarkQuote?.lastTradePrice ?? 500.0,
onBenchmarkChanged: (newBenchmark) {
controller.selectBenchmark(newBenchmark);
},
)
If the controller or live quote is temporarily loading, safe fallback pricing ensures calculation stability without throwing null exceptions.
The engine is validated with unit and widget tests:
test/beta_weighted_greeks_test.dart:
test/portfolio_greeks_card_test.dart: