Search arXivSearch

arXiv · 2309.06393

Real-time VaR Calculations for Crypto Derivatives in kdb+/q

Abstract

Cryptocurrency market is known for exhibiting significantly higher volatility than traditional asset classes. Efficient and adequate risk calculation is vital for managing risk exposures in such market environments where extreme price fluctuations occur in short timeframes. The objective of this thesis is to build a real-time computation workflow that provides VaR estimates for non-linear portfolios of cryptocurrency derivatives. Many researchers have examined the predictive capabilities of time-series models within the context of cryptocurrencies. In this work, we applied three commonly used models - EMWA, GARCH and HAR - to capture and forecast volatility dynamics, in conjunction with delta-gamma-theta approach and Cornish-Fisher expansion to crypto derivatives, examining their performance from the perspectives of calculation efficiency and accuracy. We present a calculation workflow which harnesses the information embedded in high-frequency market data and the computation simplicity inherent in analytical estimation procedures. This workflow yields reasonably robust VaR estimates with calculation latencies on the order of milliseconds.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Yutong Chen, Paul Bilokon, Conan Hales, Laura Kerr. 2023-09-11. Real-time VaR Calculations for Crypto Derivatives in kdb+/q. https://arxiv.org/abs/2309.06393

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Does Crypto Sentiment Extremity Widen Estimated Spreads? Evidence Depends on the Specification

We examine whether extreme values of the Crypto Fear & Greed Index are associated with a daily high-low spread estimate for Bitcoin. The sample contains 2,896 BTC/USDT observations from February 2018 to January 2026. We find an unconditional extreme-minus-neutral gap of 61.99 basis points. After close-to-close realised-volatility-quintile demeaning it is 24.79 basis points, although none of the five separate quintile contrasts survives Holm correction. With quadratic realised-volatility and strictly lagged momentum controls, the HAC estimate is 11.81 basis points (95% CI [-2.31,25.93], p=.101). A fixed non-parametric stratification gives 20.44 basis points (p=.0195 under circular shifts), while separate models for a zero-floored estimate's incidence and positive magnitude are imprecise. The results therefore show only a descriptive, specification-dependent association. We conclude that they do not establish a stable or causal liquidity premium.

q-fin.ST

Do Cryptocurrency Markets Differentiate Infrastructure from Regulatory Shocks? A Multi-Moment Event Study with Dependence-Robust Inference

Do cryptocurrency markets respond differently to infrastructure and regulatory shocks? We study returns and conditional variance on a shared sample of 50 events and six assets (January 2019--August 2025), using GJR-GARCH-X models and dependence-aware inference. Treating event inclusion as a design parameter, we trace the variance differential across inclusion screens. Curated high-salience events yield a $3.49\times$ point-estimate multiplier, whereas a mechanical impact filter on a broad reconstructed candidate pool yields approximately $0.5$--$1.6\times$. This pattern is descriptive and selection-conditional, not an inferential comparison between screens. The curated variance differential is not significant against its fitted sharp per-asset-equality null under the conditional fixed-path Student-$t$-copula bootstrap ($p\approx0.39$). Floored recursive sensitivity gives one-sided $p=0.025$ at baseline and $0.041$ with asset-specific high-variance-regime controls, so the verdict depends on inference scheme and implementation. Across reported dependence inputs, the six-contrast effective sample size is $1.33$--$2.35$; one-sided effective-df sensitivity gives $p=0.044$--$0.116$. Earlier significance from treating correlated per-asset coefficients as independent samples is not robust to dependence and heavy-tail corrections. The cumulative-abnormal-return difference is $+8.69$ percentage points (event-level block-bootstrap $p=0.202$). The asymmetry remains directional, selection-conditional and unresolved. The contribution is an inference ladder and an internal Monte-Carlo calibration study, demonstrated through correction of the author's earlier significance claim.

q-fin.ST

Modeling financial time series with $ϕ^{4}$ quantum field theory

We use a $ϕ^{4}$ quantum field theory with inhomogeneous couplings and explicit symmetry-breaking to model an ensemble of financial time series from the S$\&$P 500 index. The continuum nature of the $ϕ^4$ theory avoids the inaccuracies that occur in Ising-based models which require a discretization of the time series. We demonstrate this using the example of the 2008 global financial crisis. The $ϕ^{4}$ quantum field theory is expressive enough to reproduce the higher-order statistics such as the market kurtosis, which can serve as an indicator of possible market shocks. Accurate reproduction of high kurtosis is absent in binarized models. Therefore Ising models, despite being widely employed in econophysics, are incapable of fully representing empirical financial data, a limitation not present in the generalization of the $ϕ^{4}$ scalar field theory. We then investigate the scaling properties of the $ϕ^{4}$ machine learning algorithm and extract exponents which govern the behavior of the learned couplings (or weights and biases in ML language) in relation to the number of stocks in the model. Finally, we use our model to forecast the price changes of the AAPL, MSFT, and NVDA stocks. We conclude by discussing how the $ϕ^{4}$ scalar field theory could be used to build investment strategies and the possible intuitions that the QFT operations of dimensional compactification and renormalization can provide for financial modelling.

q-fin.ST