\documentclass[11pt]{article}

\usepackage{amsmath, amssymb, amsthm}
\usepackage{geometry}
\usepackage{booktabs}
\usepackage{array}
\usepackage{hyperref}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{float}
\usepackage{microtype}
\usepackage{parskip}
\usepackage{authblk}

\geometry{margin=1in}

\lstset{
    basicstyle=\ttfamily\small,
    backgroundcolor=\color{gray!10},
    frame=single,
    breaklines=true,
    keywordstyle=\color{blue},
    commentstyle=\color{green!60!black},
    stringstyle=\color{red!70!black},
    language=Python
}

\title{\textbf{A Volume-Weighted Uncertainty Principle for Equity Microstructure:\\
Definitions, Empirical Properties, Regime Analysis, and Theoretical Extensions}}

\author[1]{Songgun Lee}
\affil[1]{Department of Physics, University of California, Santa Barbara}
\date{April 2026 \quad (Preprint)}

\begin{document}

\maketitle

\begin{abstract}
\noindent
  We introduce a volume-weighted uncertainty product $U = \sigma_P \cdot \sigma_t$ for equity microstructure, constructed in direct analogy with the Heisenberg uncertainty principle of quantum mechanics. The price spread $\sigma_P$ and time spread $\sigma_t$ are computed as volume-weighted standard deviations of the intraday 1-minute price and time series, centered on the volume-weighted median price $M$ --- a quantity we term the Volume-Weighted Median Price (VWMP), which we argue is theoretically preferable to the widely-used Volume-Weighted Average Price (VWAP) as a reference price for microstructure analysis. Applying this framework to SPY (S\&P 500 ETF) over 2020--2026 ($N = 1{,}575$ trading days, approximately 614{,}000 intraday 1-minute observations), we find that $U_\mathrm{norm} = (\sigma_P/M)\cdot\sigma_t$ follows a log-normal marginal distribution (KS $p = 0.155$), exhibits strong long memory ($H \approx 0.90$ via R/S analysis), and is significantly correlated with the CBOE VIX ($r = 0.73$) while retaining 54\% independent variance. Granger causality tests confirm that the VIX-orthogonal component of $U_\mathrm{norm}$ linearly precedes daily returns at all lags 1--5 ($p < 0.03$). A market regime analysis reveals a striking monotone relationship: the correlation between $U_\mathrm{norm}$ and forward 5-day rolling volatility rises from effectively zero ($r = 0.002$) in low-VIX environments (VIX $< 15$) to $r = 0.427$ during high-stress regimes (VIX $> 25$), and to $r = 0.610$ during risk-off (flight-to-safety) periods. We further propose the Robertson uncertainty relation as a framework for five candidate conjugate variable pairs in financial markets, and outline theoretical extensions drawing on time-dependent perturbation theory, Clebsch-Gordan decomposition of composite uncertainty states, and a path-integral interpretation of $U_\mathrm{norm}$ as a field amplitude.
\end{abstract}

\noindent\rule{\textwidth}{0.4pt}
\vspace{1em}

% ============================================================
\section{Introduction}
% ============================================================

\subsection{Motivation}

This work originated during an undergraduate course in quantum mechanics at the University of California, Santa Barbara, while studying the Heisenberg uncertainty principle and its generalization, the Robertson uncertainty relation. The core observation is deceptively simple: \textit{financial markets are not so different from quantum systems in one important structural sense} --- neither allows the simultaneous, arbitrary precision of two conjugate observables. In quantum mechanics, the position and momentum of a particle cannot both be specified to arbitrary precision; the product of their uncertainties is bounded below by a fundamental constant. In a financial market, price and time are not independent --- a rapid, concentrated burst of trading (small $\sigma_t$) necessarily compresses the price distribution (large $\sigma_P$), and vice versa. The question this paper investigates is whether this structural analogy can be made quantitative, empirically tested, and ultimately useful for predicting future market behavior.

The second motivation is a dissatisfaction with standard practice. Market microstructure research almost universally uses the Volume-Weighted Average Price (VWAP) as the reference price for intraday analysis. This is the mean of the volume-weighted price distribution. We argue that the median of this distribution --- the Volume-Weighted Median Price (VWMP), defined as the price $M$ at which cumulative traded volume is split exactly in half --- is theoretically superior as a reference price. The VWMP is more robust to block trades and end-of-day imbalances that distort the VWAP, and it is the more natural center for defining a price spread $\sigma_P$ in the spirit of the uncertainty principle. The near-universal adoption of VWAP over VWMP in both academic and practitioner work is, in our view, an artifact of computational convenience rather than principled choice.

\subsection{Contribution}

The contributions of this paper are as follows:

\begin{enumerate}
    \item We formally define the Volume-Weighted Median Price (VWMP) $M$, the intraday price spread $\sigma_P$, the intraday time spread $\sigma_t$, and the uncertainty product $U = \sigma_P \cdot \sigma_t$, drawing explicit parallels to quantum mechanical uncertainty.

    \item We document the empirical properties of $U_\mathrm{norm}$ over six years of SPY 1-minute data: log-normal marginal distribution, strong long memory ($H \approx 0.90$), robust correlation with VIX, and Granger-causal relationship to daily returns.

    \item We introduce a market regime analysis showing that the predictive power of $U_\mathrm{norm}$ is highly regime-dependent, rising monotonically from near-zero in calm markets to $r = 0.43$ in stressed markets and $r = 0.61$ during risk-off regimes.

    \item We propose the Robertson uncertainty relation as a unifying framework for five candidate conjugate variable pairs in equity microstructure, three of which are implemented and computed on the full historical sample.

    \item We outline a research program for applying time-dependent perturbation theory, Clebsch-Gordan decomposition, and path-integral methods to market microstructure, with specific, testable hypotheses.
\end{enumerate}

\subsection{Why VWMP Rather Than VWAP}

Let $\{(P_i, V_i)\}$ be the set of 1-minute bars for a trading day, with volume weights $w_i = V_i / \sum_j V_j$. The VWAP is the weighted mean:
\begin{align}
    \mathrm{VWAP} = \sum_i w_i P_i
\end{align}
The VWMP $M$ is the weighted median:
\begin{align}
    M = \inf\left\{P : \sum_{i:\, P_i \leq P} w_i \geq 0.5\right\}
\end{align}

The theoretical advantages of $M$ over VWAP are:

\begin{enumerate}
    \item \textbf{Robustness.} The weighted mean is sensitive to outlier bars with large volume at extreme prices (e.g., large institutional block trades at the open, or massive market-on-close imbalances). The weighted median is immune to such distortions. On days with a single bar capturing 30\% of total volume at an off-market price, VWAP is pulled significantly; $M$ is not.

    \item \textbf{Consensus interpretation.} $M$ is the price at which exactly half of the day's total volume transacted below it and half above. This is a cleaner definition of ``where the market agreed to trade'' than the mean: it is the price that divides the market's actual transactions in half, not the volume-weighted centroid of prices.

    \item \textbf{Natural center for $\sigma_P$.} The price spread $\sigma_P$ is defined as the volume-weighted standard deviation of prices around $M$. When $M$ is the median, $\sigma_P$ achieves a near-minimal value in the $L^2$ sense (the median minimizes the weighted mean absolute deviation; the mean minimizes the weighted mean squared deviation). Using the median as center gives $\sigma_P$ its tightest interpretation as a genuine spread, not an artifact of distributional skew.

    \item \textbf{Quantum analogy.} In the position-momentum uncertainty relation, $\sigma_x$ is defined relative to $\langle x \rangle$ --- the expectation value, which for a symmetric distribution coincides with the median. For the skewed intraday price distributions typical of equity markets (dominated by open and close volume spikes), the median is arguably closer in spirit to the ``most likely transaction price'' than the mean.
\end{enumerate}

\subsection{Related Work}

The application of physics concepts to financial markets --- econophysics --- has a substantial literature. Mantegna and Stanley~\cite{mantegna1999introduction} established the statistical mechanics of financial data. Bouchaud and Potters~\cite{bouchaud2003theory} developed a comprehensive theory of financial risk using methods from statistical physics. The specific application of the uncertainty principle to finance has been explored in the context of time-frequency analysis (Gabor 1946, applied to trading in various forms), but the direct construction of a volume-weighted uncertainty product from microstructure data, with empirical validation of its distributional properties and predictive content, does not appear to have been previously reported.

\subsection{Organization}

The remainder of the paper is organized as follows. Section~2 describes the data and infrastructure. Section~3 defines the mathematical framework. Sections~4--12 present empirical results: distributional properties, stationarity, long memory, VIX relationship, forward volatility prediction, market regime analysis, Granger causality, VAR analysis, and machine learning results. Section~13 describes the live prediction tracking system. Section~14 covers infrastructure. Section~15 develops the Robertson uncertainty relation framework. Section~16 presents theoretical extensions. Section~17 lists open questions and future directions.

% ============================================================
\section{Instrument and Data}
% ============================================================

\begin{itemize}
    \item \textbf{Instrument:} SPY (SPDR S\&P 500 ETF Trust), used as proxy for the S\&P 500 index
    \item \textbf{Data source:} Alpaca Markets API (free tier), 1-minute OHLCV bars
    \item \textbf{Date range:} 2020-01-02 to 2026-04-10
    \item \textbf{Sample size:} $N = 1571$ trading days
    \item \textbf{Intraday resolution:} 1-minute bars, 390 bars per trading day (9:30am -- 4:00pm ET)
    \item \textbf{Infrastructure:} Raspberry Pi 5 (16GB RAM), Python 3.11, automated daily ingestion via cron
\end{itemize}

% ============================================================
\section{Mathematical Framework}
% ============================================================

\subsection{Notation}

For a given trading day, let:
\begin{align}
    \{(P_i, V_i, t_i)\}_{i=1}^{n}
\end{align}
denote the set of 1-minute bars, where $P_i$ is the closing price, $V_i$ is the traded volume, and $t_i$ is the time in minutes elapsed since market open ($t_i = 0$ at 9:30am ET, $t_i = 389$ at 4:00pm ET). Bars with $V_i = 0$ are excluded.

\subsection{Volume Weights}

Volume is treated as a probability measure over the intraday price-time space:
\begin{align}
    w_i = \frac{V_i}{\sum_{j=1}^{n} V_j}, \qquad \sum_{i=1}^{n} w_i = 1
\end{align}

\subsection{Volume-Weighted Median Price \texorpdfstring{$M$}{M}}

$M$ is defined as the 50th percentile of the volume-weighted empirical distribution of prices:
\begin{align}
    M = \inf\left\{ P \;:\; \sum_{i:\, P_i \leq P} w_i \geq 0.5 \right\}
\end{align}
This is the price at which cumulative traded volume is equally split. It is distinct from the volume-weighted average price (VWAP), which is the first moment of the same distribution.

\subsection{Price Spread \texorpdfstring{$\sigma_P$}{sigma\_P}}

Volume-weighted standard deviation of price, centered on the median $M$:
\begin{align}
    \sigma_P = \sqrt{\sum_{i=1}^{n} w_i (P_i - M)^2}
\end{align}
Note: centered on the median, not the mean. Units: USD.

\subsection{Time Spread \texorpdfstring{$\sigma_t$}{sigma\_t} and Volume Center of Mass \texorpdfstring{$\langle t \rangle$}{<t>}}

Volume-weighted mean time (center of mass in time):
\begin{align}
    \langle t \rangle = \sum_{i=1}^{n} w_i\, t_i
\end{align}

Volume-weighted standard deviation of time:
\begin{align}
    \sigma_t = \sqrt{\sum_{i=1}^{n} w_i (t_i - \langle t \rangle)^2}
\end{align}
Units: minutes.

\subsection{Uncertainty Product \texorpdfstring{$U$}{U}}

Motivated by the Heisenberg uncertainty principle and the Gabor time-frequency uncertainty relation $\sigma_t \cdot \sigma_f \geq \frac{1}{4\pi}$:
\begin{align}
    U = \sigma_P \cdot \sigma_t
\end{align}
Units: USD $\cdot$ minutes.

\subsection{Normalized Uncertainty Product \texorpdfstring{$U_\mathrm{norm}$}{U\_norm}}

To remove the price-level effect (SPY price approximately doubled over 2020--2026), $\sigma_P$ is normalized by the median price:
\begin{align}
    U_\mathrm{norm} = \frac{\sigma_P}{M} \cdot \sigma_t
\end{align}
Units: fraction $\cdot$ minutes. This is the primary quantity used in all subsequent analysis.

\subsection{Dimensionless Uncertainty Product \texorpdfstring{$U_\mathrm{dimless}$}{U\_dimless}}

Further normalization by total trading day length (390 minutes):
\begin{align}
    U_\mathrm{dimless} = \frac{\sigma_P}{M} \cdot \frac{\sigma_t}{390}
\end{align}
Units: dimensionless (pure number).

\subsection{Daily Feature Vector}

Each trading day $d$ is represented by the tuple:
\begin{align}
    X_d = \left(M_d,\; \sigma_{P,d},\; \sigma_{t,d},\; U_d,\; U_{\mathrm{norm},d},\; \langle t \rangle_d \right)
\end{align}

% ============================================================
\section{Summary Statistics}
% ============================================================

\begin{table}[htbp]
\centering
\caption{Summary statistics of the daily feature vector ($N = 1571$ trading days, 2020--2026)}
\resizebox{\textwidth}{!}{%
\begin{tabular}{lrrrrrrr}
\toprule
Variable & Mean & Std & Min & 25\% & Median & 75\% & Max \\
\midrule
$M$ (USD)                  & --- & --- & 270 & --- & --- & --- & 670 \\
$\sigma_P$ (USD)           & --- & --- & --- & --- & --- & --- & --- \\
$\sigma_t$ (min)           & --- & --- & 30  & --- & --- & --- & 85  \\
$U$ (USD$\cdot$min)        & 49.05  & 37.87 & 4.78  & 24.29 & 40.13 & 61.90 & 524.52 \\
$U_\mathrm{norm}$          & 0.1120 & 0.1016 & 0.0111 & 0.0535 & 0.0887 & 0.1330 & 1.1081 \\
$U_\mathrm{dimless}$       & 0.000287 & 0.000261 & 0.000028 & 0.000137 & 0.000228 & 0.000341 & 0.002841 \\
$\langle t \rangle$ (min)  & --- & --- & 270 & --- & --- & --- & 345 \\
\bottomrule
\end{tabular}}
\end{table}

\begin{figure}[htbp]
\centering
\includegraphics[width=\textwidth]{figures/fig1_overview.png}
\caption{Overview time series. \textit{Top:} Volume-weighted median price $M$ (SPY, 2020--2026). \textit{Second:} Uncertainty product $U = \sigma_P \cdot \sigma_t$. \textit{Third:} $\sigma_P$ (left axis, orange) and $\sigma_t$ (right axis, purple) plotted separately. \textit{Bottom:} Volume center of mass $\langle t \rangle$ in minutes from open; dashed line marks midday (195 min). Note the persistent afternoon skew and the sharp $U$ spikes during the March 2020 and April 2025 drawdowns.}
\label{fig:overview}
\end{figure}

Key observations:
\begin{itemize}
    \item Coefficient of variation of $U_\mathrm{norm}$: $\mathrm{CV} = \sigma/\mu \approx 0.91$
    \item Mean of $U_\mathrm{norm}$ exceeds median by 26\%: strong right skew
    \item $\langle t \rangle$ is consistently above 195 minutes (midday): volume center of mass is persistently in the afternoon, consistent with the known U-shaped intraday volume pattern
\end{itemize}

% ============================================================
\section{Distributional Properties of \texorpdfstring{$U_\mathrm{norm}$}{U\_norm}}
% ============================================================

\subsection{Distribution Fitting}

Four candidate distributions were fit to $U_\mathrm{norm}$ using maximum likelihood estimation. Goodness-of-fit was assessed via the Kolmogorov-Smirnov (KS) test and log-likelihood.

\begin{table}[htbp]
\centering
\caption{Distribution fitting results for $U_\mathrm{norm}$ ($N = 1571$)}
\begin{tabular}{lrrl}
\toprule
Distribution & KS statistic & KS $p$-value & log-likelihood \\
\midrule
\textbf{Log-normal} & \textbf{0.0284} & \textbf{0.1546} & \textbf{2167.80} \\
Pareto              & 0.1066          & 0.0000          & 2031.96 \\
Exponential         & 0.1061          & 0.0000          & 2031.95 \\
Gamma               & 0.3908          & 0.0000          & 948.78  \\
\bottomrule
\end{tabular}
\end{table}

\begin{figure}[htbp]
\centering
\includegraphics[width=\textwidth]{figures/fig4_distribution_fits.png}
\caption{Distribution fits for $U_\mathrm{norm}$. Each panel overlays the empirical histogram (orange) with the MLE-fitted density (black line). The log-normal fit ($p = 0.1546$) is the only candidate not rejected by the KS test; gamma, Pareto, and exponential are all rejected at $p \approx 0$.}
\label{fig:dist_fits}
\end{figure}

\textbf{Result:} The log-normal distribution is the only candidate not rejected by the KS test ($p = 0.1546 > 0.05$). All other candidates are strongly rejected ($p \approx 0$). The log-normal achieves the highest log-likelihood by a margin of 136 units over the next best candidate.

\subsection{Log-Normal Parameters}

\begin{align}
    U_\mathrm{norm} \sim \mathrm{LogNormal}(\mu,\, \sigma^2)
\end{align}
with fitted parameters:
\begin{align}
    \mu = -2.452, \qquad \sigma = 0.708
\end{align}
Implied median: $e^{-2.452} \approx 0.0865$, consistent with observed median of 0.0887.

\subsection{QQ Plot Verification}

\begin{figure}[htbp]
\centering
\includegraphics[width=\textwidth]{figures/fig5_lognormal_qq.png}
\caption{\textit{Left:} QQ plot of $\log(U_\mathrm{norm})$ against the standard normal. The close adherence to the diagonal confirms log-normality of the marginal distribution. \textit{Right:} Histogram of $\log(U_\mathrm{norm})$ with normal fit overlaid.}
\label{fig:qq}
\end{figure}

A QQ plot of $\log(U_\mathrm{norm})$ against the standard normal distribution shows close adherence to the diagonal across the range $[-2.5, +2.5]$ of theoretical quantiles. A small downward deviation is observed in the lower tail, indicating a slight excess of very-low-$U$ days relative to strict log-normality.

\subsection{Caveat}

The KS test assumes i.i.d.\ observations. $U_\mathrm{norm}$ exhibits strong autocorrelation (lag-1 $\approx 0.62$), which violates this assumption and makes the reported $p$-value optimistic. The distributional claim should be interpreted as applying to the marginal distribution, not the joint process.

% ============================================================
\section{Stationarity Analysis}
% ============================================================

\begin{table}[htbp]
\centering
\caption{Stationarity tests. ADF null: unit root present. KPSS null: series is stationary.}
\resizebox{\textwidth}{!}{%
\begin{tabular}{llllll}
\toprule
Series & ADF stat & ADF $p$ & ADF verdict & KPSS stat & KPSS verdict \\
\midrule
$U_\mathrm{norm}$              & $-6.025$ & $0.000$ & stationary     & $0.512$ & non-stationary ($p = 0.039$) \\
$\log(U_\mathrm{norm})$        & $-6.266$ & $0.000$ & stationary     & $0.457$ & stationary ($p > 0.05$) \\
$\Delta\log(U_\mathrm{norm})$  & $-15.89$ & $0.000$ & stationary     & $0.027$ & stationary ($p > 0.10$) \\
\bottomrule
\end{tabular}}
\end{table}

\textbf{Conclusion:} $U_\mathrm{norm}$ gives conflicting test results (likely due to structural breaks / regime changes). $\log(U_\mathrm{norm})$ passes both tests and is the appropriate series for long-memory analysis. $\Delta\log(U_\mathrm{norm})$ is over-differenced for Hurst estimation purposes.

% ============================================================
\section{Long Memory Analysis}
% ============================================================

\subsection{Autocorrelation Function}

\begin{figure}[htbp]
\centering
\includegraphics[width=\textwidth]{figures/fig3_normalized.png}
\caption{\textit{Top:} Raw uncertainty product $U$ (dollar-minutes). \textit{Middle:} Normalized $U_\mathrm{norm} = (\sigma_P/M)\cdot\sigma_t$, which removes the price-level trend visible in $U$. \textit{Bottom:} Autocorrelation function of $U_\mathrm{norm}$; the ACF remains significant well past lag 30, indicating strong persistence.}
\label{fig:normalized}
\end{figure}

\begin{itemize}
    \item Lag-1 autocorrelation of $U_\mathrm{norm}$: $\approx 0.62$
    \item Autocorrelation remains statistically significant above the 95\% confidence band until approximately lag 30 (6 trading weeks)
    \item Lag-1 autocorrelation of $U_\mathrm{residual}$ (VIX-orthogonal component): $\approx 0.25$, significant to lag $\approx 20$
\end{itemize}

\subsection{Hurst Exponent}

Two estimators were applied to $\log(U_\mathrm{norm})$:

\begin{table}[htbp]
\centering
\caption{Hurst exponent estimates for $\log(U_\mathrm{norm})$}
\begin{tabular}{llr}
\toprule
Method & Description & $H$ \\
\midrule
R/S analysis        & Rescaled range & 0.8962 \\
DFA                 & Detrended Fluctuation Analysis & 0.9955 \\
\midrule
Difference          & & 0.0993 \\
\bottomrule
\end{tabular}
\end{table}

\begin{figure}[htbp]
\centering
\includegraphics[width=0.6\textwidth]{figures/fig6_hurst.png}
\caption{R/S analysis for $\log(U_\mathrm{norm})$. The log-log plot of rescaled range $R/S$ against window size $n$ yields slope $H \approx 0.896$, well above the $H=0.5$ random-walk baseline.}
\label{fig:hurst}
\end{figure}

\textbf{Interpretation:} Both estimators give $H \gg 0.5$, indicating strong long memory. $H = 0.5$ corresponds to a random walk (no memory); $H \to 1$ corresponds to strong persistence. The disagreement of 0.099 is within acceptable range; the conservative estimate is $H \approx 0.90 \pm 0.05$.

\textbf{Caveats:}
\begin{itemize}
    \item R/S analysis is known to overestimate $H$ in the presence of strong autocorrelation
    \item DFA value of 0.9955 approaches the boundary $H = 1.0$ (Brownian motion), suggesting possible residual non-stationarity
    \item Both estimators agree qualitatively: $H$ is well above 0.5
\end{itemize}

% ============================================================
\section{Relationship to VIX}
% ============================================================

\subsection{Correlation}

\begin{align}
    \mathrm{Corr}(U_\mathrm{norm},\, \mathrm{VIX}) &= 0.7305 \\
    \mathrm{Corr}(\log U_\mathrm{norm},\, \log \mathrm{VIX}) &= 0.6792
\end{align}

\subsection{Log-Log Regression}

\begin{align}
    \log(U_\mathrm{norm}) = 1.5629 \cdot \log(\mathrm{VIX}) - 7.1288
\end{align}
\begin{align}
    R^2 = 0.4614
\end{align}

\begin{figure}[htbp]
\centering
\includegraphics[width=\textwidth]{figures/fig7_vix.png}
\caption{\textit{Left:} $U_\mathrm{norm}$ (orange, left axis) and VIX (blue, right axis) over time; spikes co-occur during high-volatility episodes. \textit{Right:} Log-log scatter of $U_\mathrm{norm}$ vs VIX with fitted regression line (slope $= 1.56$, $R^2 = 0.46$).}
\label{fig:vix}
\end{figure}

\textbf{Interpretation:} $U_\mathrm{norm} \propto \mathrm{VIX}^{1.56}$. The superlinear exponent ($> 1$) means $U_\mathrm{norm}$ amplifies VIX signals: when VIX doubles, $U_\mathrm{norm}$ nearly triples ($2^{1.56} \approx 2.95$). The $R^2 = 0.46$ implies 54\% of $\log(U_\mathrm{norm})$ variance is statistically independent of VIX.

\subsection{VIX-Orthogonal Residual}

Define:
\begin{align}
    U_\mathrm{residual} = \log(U_\mathrm{norm}) - \widehat{\log(U_\mathrm{norm})\,|\,\log(\mathrm{VIX})}
\end{align}

\begin{itemize}
    \item $U_\mathrm{residual}$ has mean $\approx 0$, std $= 0.52$
    \item Residual correlation with $\log(\mathrm{VIX})$: 0 (by construction)
    \item Lag-1 autocorrelation of $U_\mathrm{residual}$: $\approx 0.25$, significant to lag $\approx 20$
\end{itemize}

\textbf{Conclusion:} The VIX-independent component of $U_\mathrm{norm}$ is not random noise. It has its own persistent autocorrelation structure with memory of approximately 20 trading days (4 weeks).

% ============================================================
\section{Forward Volatility Prediction}
% ============================================================

\subsection{Terminology Clarification}

The volatility measure used in this section is \textbf{not} realized volatility in the sense of Andersen \& Bollerslev (1998), which is computed by summing squared intraday 1-minute log returns within a single day:
\begin{align}
    \mathrm{RV}^{\mathrm{intraday}}_t = \sqrt{252 \cdot 390} \cdot \sqrt{\sum_{i=1}^{390} r_{t,i}^2}, \qquad r_{t,i} = \log(P_{t,i}/P_{t,i-1})
\end{align}

Instead, the forward volatility measure used here is computed from \textit{daily} changes in the volume-weighted median $M$, annualized over a rolling window. We call this \textbf{rolling daily volatility} (RDV):

\subsection{Forward Rolling Daily Volatility}

$n$-day forward rolling daily volatility is defined as:
\begin{align}
    \mathrm{RDV}_{5d}(t) &= \sqrt{252} \cdot \sigma\left(\{\log(M_{t+k}/M_{t+k-1})\}_{k=1}^{5}\right) \\
    \mathrm{RDV}_{10d}(t) &= \sqrt{252} \cdot \sigma\left(\{\log(M_{t+k}/M_{t+k-1})\}_{k=1}^{10}\right)
\end{align}

\textbf{Note:} True intraday RV and RDV are related but distinct. RDV captures inter-day price variability over a rolling window; true intraday RV captures the within-day price path. Because $\sigma_P$ is itself an intraday dispersion measure, comparing $U_\mathrm{norm}$ against true intraday RV is a direction for future work (all raw 1-minute bars are available for this computation).

\subsection{Raw Correlations}

\begin{table}[htbp]
\centering
\caption{Correlations with forward realized volatility}
\begin{tabular}{lrr}
\toprule
Predictor & Corr with RDV$_{5d}$ & Corr with RDV$_{10d}$ \\
\midrule
$U_\mathrm{norm}$ & 0.6153 & 0.6183 \\
VIX               & 0.7263 & --- \\
\bottomrule
\end{tabular}
\end{table}

\subsection{Incremental Predictive Power Beyond VIX}

\begin{table}[htbp]
\centering
\caption{Partial correlation and $R^2$ decomposition for RV$_{5d}$}
\begin{tabular}{lr}
\toprule
Metric & Value \\
\midrule
Partial corr$(U_\mathrm{norm},\, \mathrm{RDV}_{5d}\,|\,\mathrm{VIX})$ & 0.1807 \\
$R^2$: VIX only                & 0.5275 \\
$R^2$: VIX $+$ $U_\mathrm{norm}$ (predicting RDV$_{5d}$) & 0.5429 \\
$R^2$ improvement              & $+0.0154$ \\
\bottomrule
\end{tabular}
\end{table}

\subsection{Regime Breakdown}

\begin{table}[htbp]
\centering
\caption{Partial correlation by $U_\mathrm{norm}$ regime}
\begin{tabular}{lrr}
\toprule
Regime & Partial corr$(U_\mathrm{norm},\, \mathrm{RDV}_{5d}\,|\,\mathrm{VIX})$ & $n$ \\
\midrule
All days                   & 0.1807 & 1564 \\
High $U_\mathrm{norm}$ (top 25\%)    & 0.1440 & 391 \\
Low $U_\mathrm{norm}$ (bottom 75\%)  & 0.1312 & 1173 \\
\bottomrule
\end{tabular}
\end{table}

\textbf{Observation:} The independent contribution of $U_\mathrm{norm}$ does not concentrate during high-stress periods. During high-$U_\mathrm{norm}$ regimes, $U_\mathrm{norm}$ and VIX are more correlated (both responding to the same events), leaving less independent variation.

% ============================================================
\section{Market Regime Analysis}
% ============================================================

\subsection{Motivation}

The relationship between $U_\mathrm{norm}$ and forward volatility may not be uniform across market conditions. We segment the full sample by VIX level and by TLT trend (a proxy for flight-to-safety / risk appetite) to test whether $U_\mathrm{norm}$ is more informative in specific regimes.

\subsection{Regime Definitions}

\textbf{VIX regimes} (based on daily VIX closing level):
\begin{table}[htbp]
\centering
\begin{tabular}{llr}
\toprule
Regime & Condition & Approx.\ $n$ \\
\midrule
Low volatility    & VIX $< 15$  & $\sim$600 days \\
Medium volatility & $15 \leq$ VIX $< 25$ & $\sim$650 days \\
High volatility   & VIX $\geq 25$ & $\sim$325 days \\
\bottomrule
\end{tabular}
\end{table}

\textbf{TLT trend regimes} (20-day rolling slope of TLT closing price):
\begin{itemize}
    \item \textbf{Risk-off} (TLT rising): investors rotating into bonds, expecting lower growth / higher uncertainty
    \item \textbf{Risk-on} (TLT falling): investors rotating out of bonds, expecting higher growth / lower uncertainty
\end{itemize}

\subsection{Hypotheses}

\begin{enumerate}
    \item $U_\mathrm{norm}$ is most correlated with forward volatility during \textbf{high-VIX} regimes, where microstructure dispersion is driven by genuine information uncertainty rather than noise.
    \item During \textbf{risk-off} (TLT rising) periods, $U_\mathrm{norm}$ carries more independent information beyond VIX, because macro stress manifests in intraday microstructure before it is fully priced into the VIX term structure.
    \item During \textbf{low-VIX} regimes, $U_\mathrm{norm}$ is largely uninformative — the market is calm and microstructure dispersion is dominated by mechanical open/close volume patterns rather than genuine uncertainty.
\end{enumerate}

\subsection{Results}

\begin{figure}[htbp]
\centering
\includegraphics[width=\textwidth]{figures/fig10_regime_analysis.png}
\caption{Market regime analysis. \textit{Top row:} Distribution of $U_\mathrm{norm}$ across VIX regimes (low/medium/high). \textit{Bottom row:} Scatter of $U_\mathrm{norm}$ vs RDV$_{5d}$ by TLT regime (risk-off vs risk-on) and all regimes overlaid.}
\label{fig:regime}
\end{figure}

\begin{table}[htbp]
\centering
\caption{Corr$(U_\mathrm{norm},\, \mathrm{RDV}_{5d})$ by VIX regime ($N = 1574$ trading days, 2020--2026)}
\begin{tabular}{lrr}
\toprule
VIX Regime & Corr$(U_\mathrm{norm},\, \mathrm{RDV}_{5d})$ & $n$ \\
\midrule
Low ($< 15$)        & 0.0016 & 284 \\
Medium ($15$--$25$) & 0.2565 & 944 \\
High ($> 25$)       & 0.4271 & 346 \\
\midrule
All days (unconditional) & 0.6153 & 1574 \\
\bottomrule
\end{tabular}
\end{table}

\begin{table}[htbp]
\centering
\caption{Corr$(U_\mathrm{norm},\, \mathrm{RDV}_{5d})$ by TLT trend regime}
\begin{tabular}{lrr}
\toprule
TLT Regime & Corr$(U_\mathrm{norm},\, \mathrm{RDV}_{5d})$ & $n$ \\
\midrule
Risk-off (TLT rising)  & 0.6098 & 717 \\
Risk-on (TLT falling)  & 0.3665 & 857 \\
\bottomrule
\end{tabular}
\end{table}

\textbf{Key findings:}
\begin{enumerate}
    \item \textbf{Low-VIX regime: $U_\mathrm{norm}$ is essentially uninformative.} Corr $= 0.0016 \approx 0$ during calm markets (VIX $< 15$, $n = 284$ days). During low-volatility regimes, intraday price dispersion is dominated by mechanical open/close volume patterns rather than genuine uncertainty, and carries no forward predictive content.
    \item \textbf{High-VIX regime: strongest signal.} Corr $= 0.4271$ when VIX $> 25$ ($n = 346$ days). During stressed markets, $U_\mathrm{norm}$ reflects genuine information uncertainty that persists into the following week's price variability.
    \item \textbf{Risk-off periods amplify the signal.} Corr$(U_\mathrm{norm}, \mathrm{RDV}_{5d}) = 0.6098$ when TLT is rising (flight-to-safety), versus $0.3665$ when TLT is falling (risk-on). This is consistent with the hypothesis that macro stress manifests in intraday microstructure before being fully priced.
    \item \textbf{Monotone VIX relationship.} The correlation rises monotonically with VIX regime: $0.002 \to 0.257 \to 0.427$. This is a clean result with a natural interpretation.
\end{enumerate}

\subsection{Implications}

These results suggest a natural \textbf{regime filter} for any strategy based on $U_\mathrm{norm}$:
\begin{itemize}
    \item \textbf{Activate} signals when VIX $\geq 15$ or TLT is in a rising trend
    \item \textbf{Suppress} signals during low-VIX environments (VIX $< 15$), where $U_\mathrm{norm}$ is noise
\end{itemize}
This would reduce signal frequency but substantially improve quality. The cost is inactivity during prolonged low-volatility periods (e.g., most of 2021). A formal backtest of this filter is left for future work.

% ============================================================
\section{Granger Causality Analysis}
% ============================================================

\subsection{Setup}

Log returns computed from the volume-weighted median:
\begin{align}
    r_t = \log(M_t / M_{t-1})
\end{align}

Granger causality tests were run at maxlag = 5 for two pairs: $(r_t, U_\mathrm{norm})$ and $(r_t, U_\mathrm{residual})$.

\subsection{Does \texorpdfstring{$U_\mathrm{norm}$}{U\_norm} Granger-Cause Returns?}

\begin{table}[htbp]
\centering
\caption{Granger causality: $U_\mathrm{norm} \to r_t$}
\begin{tabular}{rrr}
\toprule
Lag & F statistic & $p$-value \\
\midrule
1 & 0.6614 & 0.4162 \\
2 & 0.8570 & 0.4246 \\
3 & 5.6013 & 0.0008 \\
4 & 6.8352 & $<0.0001$ \\
5 & 6.1389 & $<0.0001$ \\
\bottomrule
\end{tabular}
\end{table}

\subsection{Does \texorpdfstring{$U_\mathrm{residual}$}{U\_residual} Granger-Cause Returns?}

\begin{table}[htbp]
\centering
\caption{Granger causality: $U_\mathrm{residual} \to r_t$}
\begin{tabular}{rrr}
\toprule
Lag & F statistic & $p$-value \\
\midrule
1 & 7.0801 & 0.0079 \\
2 & 4.1810 & 0.0155 \\
3 & 2.7669 & 0.0405 \\
4 & 3.1148 & 0.0145 \\
5 & 2.5038 & 0.0288 \\
\bottomrule
\end{tabular}
\end{table}

\textbf{Key contrast:} $U_\mathrm{norm}$ is not Granger-causal at lags 1--2 but becomes significant at lags 3--5. $U_\mathrm{residual}$ (the VIX-orthogonal component) is significant at all lags 1--5, with the strongest signal at lag 1 ($p = 0.0079$). The predictive content of $U_\mathrm{norm}$ derives primarily from its microstructure-specific component.

\textbf{Caveat:} Granger causality is a test of linear predictive precedence, not structural causality.

% ============================================================
\section{Vector Autoregression (VAR) Analysis}
% ============================================================

\subsection{Model}

VAR(5) estimated on $(r_t,\, U_\mathrm{residual,t})$, $N = 1563$ observations.

\begin{align}
    \mathrm{AIC} &= -10.436 \\
    \mathrm{BIC} &= -10.361 \\
    \log L &= 3742.16
\end{align}

Residual correlation matrix:
\begin{align}
    \mathrm{Corr}(\hat{\varepsilon}_{r},\, \hat{\varepsilon}_{U_\mathrm{res}}) = -0.0757
\end{align}
Contemporaneous shocks are essentially uncorrelated.

\subsection{Significant Coefficients: Return Equation}

\begin{table}[htbp]
\centering
\caption{Selected coefficients in the $r_t$ equation (VAR(5))}
\begin{tabular}{lrrrr}
\toprule
Variable & Coefficient & Std.\ Error & $t$-stat & $p$-value \\
\midrule
$U_{\mathrm{res}, t-1}$ & $+0.001681$ & 0.000606 & 2.774 & 0.006 \\
$U_{\mathrm{res}, t-4}$ & $-0.001252$ & 0.000610 & $-2.052$ & 0.040 \\
\midrule
\multicolumn{5}{l}{\textit{All lagged return terms: insignificant ($p > 0.28$)}} \\
\bottomrule
\end{tabular}
\end{table}

\subsection{Significant Coefficients: \texorpdfstring{$U_\mathrm{residual}$}{U\_residual} Equation}

\begin{table}[htbp]
\centering
\caption{Selected coefficients in the $U_\mathrm{residual}$ equation (VAR(5))}
\begin{tabular}{lrrrr}
\toprule
Variable & Coefficient & Std.\ Error & $t$-stat & $p$-value \\
\midrule
$r_{t-1}$ & $-5.687$ & 1.057 & $-5.381$ & $<0.001$ \\
$r_{t-2}$ & $-3.012$ & 1.067 & $-2.824$ & 0.005 \\
$U_{\mathrm{res}, t-1}$ & $+0.138$ & 0.025 & 5.470 & $<0.001$ \\
$U_{\mathrm{res}, t-2}$ & $+0.158$ & 0.025 & 6.235 & $<0.001$ \\
$U_{\mathrm{res}, t-3}$ & $+0.078$ & 0.026 & 3.043 & 0.002 \\
$U_{\mathrm{res}, t-4}$ & $+0.075$ & 0.025 & 2.949 & 0.003 \\
$U_{\mathrm{res}, t-5}$ & $+0.148$ & 0.025 & 5.903 & $<0.001$ \\
\bottomrule
\end{tabular}
\end{table}

\subsection{Impulse Response Function Observations}

\begin{itemize}
    \item \textbf{$U_\mathrm{residual} \to r_t$:} Small, oscillatory response. Positive at lag 1, reverses at lag 4. Confidence bands are wide; effect is statistically present but economically modest.
    \item \textbf{$r_t \to U_\mathrm{residual}$:} Large, negative, highly significant. A positive return shock ($r_t > 0$) strongly suppresses $U_\mathrm{residual}$, with the effect persisting for 8--10 days. This is interpreted as a microstructure analog of the leverage effect: positive price movement collapses the VIX-independent uncertainty component.
\end{itemize}

\textbf{Asymmetry:} The dominant causal direction in the VAR system is $r_t \to U_\mathrm{residual}$, not the reverse. Returns predict microstructure uncertainty more strongly than uncertainty predicts returns.

\begin{figure}[htbp]
\centering
\includegraphics[width=\textwidth]{figures/fig8_irf.png}
\caption{VAR(5) impulse response functions for the system $(r_t, U_\mathrm{residual})$. Each panel shows the response of one variable to a one-standard-deviation shock in the other, over 20 trading days. The dominant effect is $r_t \to U_\mathrm{residual}$: a positive return shock strongly suppresses microstructure uncertainty for 8--10 days.}
\label{fig:irf}
\end{figure}

% ============================================================
\section{Machine Learning Results}
% ============================================================

\subsection{Feature Construction}

For each day $t$, lag features are constructed:
\begin{align}
    \mathbf{f}_t = \left\{ x_{t-k} \;:\; x \in \{M, \sigma_P, \sigma_t, U, \langle t \rangle\},\; k = 1, \ldots, 5 \right\}
\end{align}
plus rolling statistics:
\begin{align}
    \bar{U}^{(10)}_{t-1}, \quad s^{(10)}_{U,t-1}, \quad z_{U,t-1} = \frac{U_{t-1} - \bar{U}^{(10)}_{t-1}}{s^{(10)}_{U,t-1}}
\end{align}

\subsection{Model}

Gradient Boosting Classifier (scikit-learn):
\begin{itemize}
    \item \texttt{n\_estimators = 200}, \texttt{max\_depth = 3}, \texttt{learning\_rate = 0.05}
    \item Evaluation: TimeSeriesSplit with 5 folds (no future leakage)
\end{itemize}

\subsection{Target 1: Next-Day Return Direction}

\begin{table}[htbp]
\centering
\caption{5-fold CV accuracy: next-day return direction ($+1$ / $-1$)}
\begin{tabular}{lrr}
\toprule
Model & Mean accuracy & Std \\
\midrule
Baseline (majority class) & 0.5008 & 0.0371 \\
Full model (with $U$ features) & 0.4900 & 0.0380 \\
Improvement & $-0.0108$ & --- \\
\bottomrule
\end{tabular}
\end{table}

\textbf{Result:} No improvement over baseline. Consistent with weak-form market efficiency at the daily scale.

\subsection{Target 2: Next-Day Uncertainty Regime}

Target defined as: is next-day $U_\mathrm{norm}$ above the 20-day rolling median?

\begin{table}[htbp]
\centering
\caption{5-fold CV accuracy: uncertainty regime classification}
\begin{tabular}{lrr}
\toprule
Model & Mean accuracy & Std \\
\midrule
Baseline (majority class) & 0.5174 & --- \\
$U_\mathrm{norm}$ regime model & 0.5535 & 0.0290 \\
Improvement & $+0.0361$ & --- \\
\bottomrule
\end{tabular}
\end{table}

\textbf{Result:} Meaningful improvement over baseline ($+3.6$ pp). Consistent with the strong autocorrelation ($H \approx 0.90$) of $\log(U_\mathrm{norm})$.

% ============================================================
\section{Prediction Log and Win Rate Tracking}
% ============================================================

\subsection{Format}

Each trading day, the following is logged to \texttt{logs/predictions.jsonl}:
\begin{lstlisting}
{
  "date":         "YYYY-MM-DD",
  "prediction":   "UP" | "DOWN",
  "prob_up":      float,     # P(next-day M > today's M)
  "prob_down":    float,
  "confidence":   float,     # max(prob_up, prob_down)
  "last_M":       float,     # volume-weighted median price today
  "last_U":       float,
  "last_sigma_P": float,
  "last_sigma_t": float,
  "actual":       "UP" | "DOWN",   # filled in next trading day
  "correct":      bool             # filled in next trading day
}
\end{lstlisting}

\subsection{Grading Mechanism}

Each run of \texttt{predict.py} grades all pending (ungraded) entries by comparing the stored \texttt{last\_M} of entry $i$ to \texttt{last\_M} of entry $i+1$:
\begin{align}
    \mathrm{actual}_i = \begin{cases} \mathrm{UP} & \text{if } M_{i+1} > M_i \\ \mathrm{DOWN} & \text{otherwise} \end{cases}
\end{align}

\subsection{Live Results as of April 18, 2026}

\begin{table}[htbp]
\centering
\caption{Full prediction log as of April 18, 2026}
\resizebox{\textwidth}{!}{%
\begin{tabular}{llrrll}
\toprule
Date & Prediction & Prob UP & Last $M$ & Actual & Result \\
\midrule
2026-04-03 & DOWN & ---    & 653.49 & DOWN & WIN  \\
2026-04-06 & DOWN & ---    & 653.49 & UP   & LOSS \\
2026-04-07 & UP   & ---    & 657.30 & DOWN & LOSS \\
2026-04-08 & UP   & ---    & 653.73 & UP   & WIN  \\
2026-04-09 & UP   & ---    & 674.79 & UP   & WIN  \\
2026-04-10 & UP   & 0.6706 & 675.13 & DOWN & LOSS \\
2026-04-13 & DOWN & 0.2979 & 675.13 & DOWN & WIN  \\
2026-04-14 & UP   & 0.5300 & ---    & UP   & WIN  \\
2026-04-15 & UP   & 0.6900 & ---    & UP   & WIN  \\
2026-04-16 & UP   & 0.6600 & ---    & UP   & WIN  \\
\midrule
\multicolumn{6}{l}{\textbf{Win rate: 7/10 = 70.00\%}} \\
\bottomrule
\end{tabular}}
\end{table}

\textbf{Notes:}
\begin{itemize}
    \item April 3 prediction used stale data (Good Friday market closure; same $M = 653.49$ as prior day). Included in log but flagged.
    \item The April 3 entry was logged twice due to a manual run coinciding with the cron job; duplicate removed in log cleanup.
    \item Predictions prior to April 10 lack \texttt{prob\_up} values (logged before probability tracking was added).
    \item \textbf{Sample size caveat:} $n = 10$ predictions is far too small for statistical inference. A binomial test of $H_0: p = 0.5$ against $H_1: p > 0.5$ gives $p\text{-value} = \sum_{k=7}^{10} \binom{10}{k} \cdot 0.5^{10} \approx 0.172$, not significant at any conventional level. A minimum of $\sim$30--50 graded predictions is needed before drawing conclusions.
\end{itemize}

% ============================================================
\section{Infrastructure Summary}
% ============================================================

\begin{table}[htbp]
\centering
\caption{Project infrastructure}
\begin{tabular}{ll}
\toprule
Component & Details \\
\midrule
Hardware        & Raspberry Pi 5, 16GB RAM \\
OS              & Debian GNU/Linux (Bookworm), aarch64 \\
Python          & 3.11, virtual environment (\texttt{venv}) \\
Key libraries   & \texttt{alpaca-py}, \texttt{pandas}, \texttt{numpy}, \texttt{pyarrow}, \texttt{scikit-learn}, \texttt{lightgbm}, \texttt{statsmodels} \\
Data storage    & Parquet files (one per trading day for raw; one cumulative for features) \\
Automation      & \texttt{cron}: daily ingest/features/predict at 4:30pm ET (Mon--Fri) \\
                & \texttt{cron}: weekly retrain at 2:00am ET (Sun) \\
Jupyter access  & Pi serves on port 8888; Mac tunnels via SSH \texttt{-L 8888:localhost:8888} \\
\bottomrule
\end{tabular}
\end{table}

\begin{table}[htbp]
\centering
\caption{Source files}
\begin{tabular}{ll}
\toprule
File & Purpose \\
\midrule
\texttt{src/utils.py}    & Core math: weighted median, $\sigma_P$, $\sigma_t$ \\
\texttt{src/ingest.py}   & Pull 1-min bars from Alpaca, save to parquet \\
\texttt{src/features.py} & Compute daily feature tuple from raw bars \\
\texttt{src/train.py}    & Build lag features, train GBC, save model \\
\texttt{src/predict.py}  & Grade pending predictions, log new prediction \\
\texttt{winrate.py}      & Print cumulative win rate table \\
\texttt{cron/daily.sh}   & Shell script: ingest $\to$ features $\to$ predict \\
\bottomrule
\end{tabular}
\end{table}

% ============================================================
\section{Robertson Uncertainty Relation --- Candidate Variable Pairs}
% ============================================================

\subsection{The Robertson Uncertainty Relation}

The Robertson uncertainty relation generalizes the Heisenberg principle to arbitrary observables. For two self-adjoint operators $\hat{A}$ and $\hat{B}$:
\begin{align}
    \sigma_A \cdot \sigma_B \geq \frac{1}{2}\left|\langle [\hat{A}, \hat{B}] \rangle\right|
\end{align}
where $[\hat{A}, \hat{B}] = \hat{A}\hat{B} - \hat{B}\hat{A}$ is the commutator, and the expectation $\langle \cdot \rangle$ is taken with respect to the current state.

\textbf{Mapping to the market framework:} The quantum state $|\psi\rangle$ is replaced by the volume distribution $\{w_i\}$. The expectation value $\langle \hat{A} \rangle$ becomes the volume-weighted mean. The right-hand side $\frac{1}{2}|\langle[\hat{A},\hat{B}]\rangle|$ is not a universal constant but a state-dependent lower bound --- it changes every trading day. This is richer than the Heisenberg case (where $[\hat{x},\hat{p}] = i\hbar$ is constant).

The current implementation uses $(P, t)$ as the observable pair and computes $\sigma_P \cdot \sigma_t$ as the left-hand side. The right-hand side (the commutator expectation) has not yet been computed.

\subsection{Five Candidate Pairs}

Five observable pairs are proposed for investigation. Each defines a distinct uncertainty product and captures a different channel of market microstructure information.

\begin{table}[htbp]
\centering
\caption{Candidate Robertson pairs, their market interpretation, and data requirements}
\resizebox{\textwidth}{!}{%
\begin{tabular}{clllll}
\toprule
\# & Pair $(\hat{A}, \hat{B})$ & Market analog & Lower bound & Data needed & Status \\
\midrule
1 & $(P,\; t)$               & Price vs.\ time              & Empirical              & Already have          & Implemented \\
2 & $(P,\; f)$               & Price vs.\ trading frequency & $\frac{1}{4\pi}$ (exact) & \texttt{trade\_count} & Not yet     \\
3 & $(P,\; V)$               & Position vs.\ momentum       & Kyle's $\lambda$       & Already have          & Not yet     \\
4 & $(P,\; \mathrm{OIB})$    & Position vs.\ signed momentum & Empirical             & Level 2 / tick data   & Not yet     \\
5 & $(P,\; H_V)$             & Price vs.\ volume entropy    & $\log(\pi e)$ (exact)  & Already have          & Not yet     \\
\bottomrule
\end{tabular}}
\end{table}

\subsubsection{Pair 1: Price and Time --- $(P, t)$}

\textbf{Already implemented.} See Section 2.

The uncertainty product $U = \sigma_P \cdot \sigma_t$ captures the joint spread of price and trading time within a day. Motivated by analogy to the Heisenberg and Gabor relations. The lower bound is empirical (no exact theorem).

\subsubsection{Pair 2: Price and Trading Frequency --- $(P, f)$}

Let $f_i = \texttt{trade\_count}_i / \Delta t$ be the number of trades per minute in bar $i$.

\begin{align}
    \langle f \rangle &= \sum_i w_i f_i \\
    \sigma_f &= \sqrt{\sum_i w_i (f_i - \langle f \rangle)^2} \\
    U_f &= \sigma_P \cdot \sigma_f
\end{align}

\textbf{Physical interpretation:} trading frequency measures information arrival rate. Burst trading (concentrated $f$) is associated with price dispersion. This pair has a mathematically exact lower bound via the Gabor--Heisenberg theorem:
\begin{align}
    \sigma_t \cdot \sigma_f \geq \frac{1}{4\pi}
\end{align}
Note: this exact bound applies to the $(t, f)$ pair, not $(P, f)$. However, computing both $\sigma_t \cdot \sigma_f$ and comparing to $\frac{1}{4\pi}$ would provide the first exact uncertainty principle test on market data.

\textbf{Data requirement:} \texttt{trade\_count} field in Alpaca 1-minute bars. Already being ingested; currently unused.

\subsubsection{Pair 3: Price and Volume --- $(P, V)$}

\begin{align}
    \sigma_V &= \sqrt{\sum_i w_i (V_i - \langle V \rangle)^2}, \qquad \langle V \rangle = \sum_i w_i V_i \\
    U_V &= \sigma_P \cdot \sigma_V
\end{align}

\textbf{Physical interpretation:} price is position; volume is momentum. This directly mirrors the canonical pair $(\hat{x}, \hat{p})$. In Kyle's (1985) model of market microstructure, price impact is:
\begin{align}
    \Delta P = \lambda \cdot Q
\end{align}
where $Q$ is order flow and $\lambda$ is Kyle's lambda (price impact coefficient). The commutator analog is $[P, V] \propto \lambda$, which is empirically estimable from the data.

\textbf{Data requirement:} volume is already in all bars. No new data needed.

\subsubsection{Pair 4: Price and Order Imbalance --- $(P, \mathrm{OIB})$}

\begin{align}
    \mathrm{OIB}_i &= \frac{V_{\mathrm{buy},i} - V_{\mathrm{sell},i}}{V_{\mathrm{buy},i} + V_{\mathrm{sell},i}} \in [-1,\, 1] \\
    U_{\mathrm{OIB}} &= \sigma_P \cdot \sigma_{\mathrm{OIB}}
\end{align}

\textbf{Physical interpretation:} order imbalance is the signed momentum of the market. Positive OIB means more buying than selling; negative means more selling. This is the most exact analog to $(\hat{x}, \hat{p})$ in quantum mechanics. The commutator $[P, \mathrm{OIB}]$ has a direct microstructure interpretation: it quantifies how much price moves per unit of order flow asymmetry.

\textbf{Data requirement:} requires tick-level data with trade direction (buy-initiated vs.\ sell-initiated), or Level 2 order book data. Not available in standard OHLCV bars. Requires paid data source (e.g., Polygon.io full tier, TAQ database).

\textbf{Note:} This pair is the most physically motivated but the most expensive to implement. Flagged for future work.

\subsubsection{Pair 5: Price and Shannon Entropy of Volume --- $(P, H_V)$}

The Shannon entropy of the volume distribution:
\begin{align}
    H_V = -\sum_{i=1}^{n} w_i \log w_i \geq 0
\end{align}

The entropic uncertainty product:
\begin{align}
    U_H = \sigma_P \cdot H_V
\end{align}

\textbf{Physical interpretation:} $H_V$ measures how informationally dispersed the volume is across price levels. A perfectly concentrated volume distribution (all trading at one price and one time) has $H_V \to 0$. A flat distribution has maximum $H_V = \log n$. The entropic uncertainty relation (Bialynicki-Birula and Mycielski, 1975):
\begin{align}
    H(x) + H(p) \geq \log(\pi e \hbar)
\end{align}
provides an exact lower bound in terms of Shannon entropies of complementary observables. This is a \textit{stronger} result than Robertson (it implies Robertson but is not implied by it), and does not assume Gaussian distributions.

\textbf{Data requirement:} $H_V$ is computed from the weights $\{w_i\}$ which are already computed. No new data needed.

\subsection{Proposed Uncertainty Product Hierarchy}

All five products can be computed simultaneously for each trading day:

\begin{align}
    \mathbf{U}_d = \left( U_{Pt,d},\; U_{Pf,d},\; U_{PV,d},\; U_{PH,d} \right)
\end{align}

(Pair 4 excluded until tick data is obtained.)

Each component captures a different aspect of market state:

\begin{table}[htbp]
\centering
\caption{Interpretation of uncertainty product hierarchy}
\begin{tabular}{lll}
\toprule
Product & Captures & Analogous concept \\
\midrule
$U_{Pt} = \sigma_P \cdot \sigma_t$       & Price--time joint dispersion        & Heisenberg / Gabor \\
$U_{Pf} = \sigma_P \cdot \sigma_f$       & Price--activity rate dispersion     & Gabor (price-freq) \\
$U_{PV} = \sigma_P \cdot \sigma_V$       & Price--volume joint dispersion      & Position--momentum \\
$U_{PH} = \sigma_P \cdot H_V$            & Price dispersion × volume entropy   & Entropic uncertainty \\
\bottomrule
\end{tabular}
\end{table}

\begin{figure}[htbp]
\centering
\includegraphics[width=\textwidth]{figures/fig9_robertson_pairs.png}
\caption{Time series of the three computable Robertson uncertainty products: $U_{Pf} = \sigma_P \cdot \sigma_f$ (price $\times$ spectral frequency spread), $U_{PV} = \sigma_P \cdot \sigma_V$ (price $\times$ volume burstiness), and $U_{PH} = \sigma_P \cdot H_V$ (price $\times$ volume entropy). All three co-spike during high-volatility episodes, but differ in magnitude and persistence.}
\label{fig:robertson_pairs}
\end{figure}

\textbf{Research question:} do the four products carry independent information? Are they correlated? Does a composite uncertainty index (e.g., $U_{\mathrm{composite}} = f(U_{Pt}, U_{Pf}, U_{PV}, U_{PH})$) outperform any individual product in predicting realized volatility or uncertainty regimes? These are open empirical questions.

% ============================================================
\section{Theoretical Extensions --- Open Questions}
% ============================================================

\subsection{Time-Dependent Perturbation Theory}

\subsubsection{Framework}

In quantum mechanics, time-dependent perturbation theory (TDPT) addresses a Hamiltonian of the form:
\begin{align}
    \hat{H}(t) = \hat{H}_0 + \hat{V}(t)
\end{align}
where $\hat{H}_0$ is the unperturbed Hamiltonian and $\hat{V}(t)$ is a time-dependent perturbation. The first-order transition amplitude from state $|i\rangle$ to state $|f\rangle$ is:
\begin{align}
    c_f^{(1)}(t) = \frac{1}{i\hbar} \int_0^t \langle f | \hat{V}(t') | i \rangle\, e^{i\omega_{fi} t'}\, dt'
\end{align}
where $\omega_{fi} = (E_f - E_i)/\hbar$.

\subsubsection{Market Mapping}

\begin{table}[htbp]
\centering
\caption{TDPT concepts mapped to market framework}
\begin{tabular}{ll}
\toprule
QM concept & Market analog \\
\midrule
Unperturbed Hamiltonian $\hat{H}_0$     & Baseline market dynamics (no news, normal trading) \\
Perturbation $\hat{V}(t)$               & External shock: Fed announcement, earnings, geopolitical event \\
State $|i\rangle$                       & Market microstructure regime (e.g., low-$U$ calm state) \\
State $|f\rangle$                       & Target regime (e.g., high-$U$ turbulent state) \\
Transition probability $|c_f|^2$        & Probability of regime transition \\
Matrix element $\langle f|\hat{V}|i\rangle$ & Coupling strength: how strongly a shock drives regime change \\
$\omega_{fi}$                           & Energy gap between regimes (related to $U_f - U_i$) \\
\bottomrule
\end{tabular}
\end{table}

\subsubsection{Fermi's Golden Rule Analog}

In the limit of a slowly varying perturbation, TDPT gives Fermi's Golden Rule:
\begin{align}
    \Gamma_{i \to f} = \frac{2\pi}{\hbar} \left| \langle f | \hat{V} | i \rangle \right|^2 \rho(E_f)
\end{align}
where $\rho(E_f)$ is the density of final states.

Market analog:
\begin{align}
    \Gamma_{\mathrm{low}\text{-}U \to \mathrm{high}\text{-}U} \propto |\text{shock magnitude}|^2 \cdot \rho(U_{\mathrm{high}})
\end{align}

The density of states $\rho(U_{\mathrm{high}})$ is empirically estimable from the log-normal distribution of $U_\mathrm{norm}$. The shock magnitude $|\langle f|\hat{V}|i\rangle|$ could be proxied by news sentiment scores, VIX spike magnitude, or Fed surprise measures.

\subsubsection{Scope}

TDPT is a \textbf{macroscopic} tool in this context. It does not model individual trades. It models \textbf{regime transitions} — the probability that an external event drives the market from a calm state to a turbulent state. This is fully consistent with the macroscopic philosophy of the project.

\textbf{Empirical test:} identify dated external events (Fed meetings, CPI releases, earnings). For each event, measure the pre-event $U$ regime and the post-event $U$ regime. Test whether transition probabilities scale with event magnitude, consistent with the Fermi's Golden Rule structure.

\subsection{Quantum Field Theory}

\subsubsection{Path Integral Formulation}

The QFT path integral gives the propagator --- the probability amplitude for a field to evolve from one configuration to another:
\begin{align}
    K(P_f, t_f\,|\, P_i, t_i) = \int_{P(t_i)=P_i}^{P(t_f)=P_f} \mathcal{D}[P(t)]\; e^{-S[P(t)]/\hbar}
\end{align}
where the action $S[P(t)]$ encodes the dynamics.

For a free scalar field (Gaussian action):
\begin{align}
    S[P(t)] = \frac{1}{2} \int_{t_i}^{t_f} \left(\frac{dP}{dt}\right)^2 dt
\end{align}
This is equivalent to the Black--Scholes framework (geometric Brownian motion) in financial terms: the action is the quadratic variation of the price path.

\subsubsection{Interpretation of $U_\mathrm{norm}$}

In QFT, the two-point correlation function (propagator) gives the vacuum fluctuations of the field:
\begin{align}
    \langle \hat{\phi}(x,t)\, \hat{\phi}(x',t') \rangle - \langle \hat{\phi} \rangle^2 = \sigma^2_\phi \propto \text{propagator}
\end{align}
This is structurally identical to $\sigma_P^2$. The uncertainty product $U_\mathrm{norm}$ can therefore be interpreted as a measure of the \textbf{fluctuation amplitude of the price field} over the intraday time window, weighted by the volume measure.

\subsubsection{Renormalization Group Connection}

The empirical properties of $U_\mathrm{norm}$ suggest a connection to renormalization group (RG) theory:

\begin{itemize}
    \item \textbf{Log-normal distribution:} consistent with a multiplicative stochastic process driven by many small independent factors. In RG language: the log-normal emerges as a fixed point of multiplicative renormalization.
    \item \textbf{Long memory ($H \approx 0.90$):} suggests the system is near a critical point. In condensed matter, systems near phase transitions show long-range correlations and power-law behavior --- a signature of critical slowing down.
    \item \textbf{Volatility clustering:} the autocorrelation structure of $U_\mathrm{norm}$ resembles the critical fluctuations near a second-order phase transition.
\end{itemize}

\textbf{Hypothesis:} market crashes (extreme $U_\mathrm{norm}$ events) are analogous to phase transitions in statistical mechanics. The approach to a crash corresponds to the system approaching a critical point, where $\xi \to \infty$ (diverging correlation length), long memory increases, and the uncertainty product spikes.

\subsubsection{Gauge Theory Interpretation}

Ilinski (2001) and others have proposed that arbitrage-free markets obey a gauge symmetry analogous to electromagnetism. In this framework:
\begin{itemize}
    \item The price process $P(t)$ is a gauge field
    \item Arbitrage is a gauge transformation
    \item Market efficiency corresponds to gauge invariance
\end{itemize}
The uncertainty product $U_\mathrm{norm}$ could be interpreted as a gauge-invariant observable --- a quantity that does not change under reparametrization of the price axis.

\subsubsection{Scope}

QFT applied to finance is a macroscopic framework when the ``field'' is the aggregate price process (not individual trades). The path integral sums over all possible price trajectories, which is inherently macroscopic. Individual-trade-level QFT (order book as a quantum field) is the microscopic version and is beyond the scope of this project.

\textbf{Most tractable near-term application:} treat $U_\mathrm{norm}$ as a fluctuation field, compute its two-point correlation function $\langle U_\mathrm{norm}(t)\, U_\mathrm{norm}(t+\tau) \rangle$ as a function of lag $\tau$, and compare to the propagator of a free scalar field. Deviations from the free-field propagator indicate interactions (non-Gaussian dynamics).

% ============================================================
\section{Clebsch-Gordan Decomposition and Intraday Range Trading}
% ============================================================

\subsection{Motivation}

The four Robertson uncertainty products $(U_{Pt}, U_{Pf}, U_{PV}, U_{PH})$ defined in Section~15 each characterize a different ``dimension'' of market microstructure uncertainty. In quantum mechanics, when a system possesses multiple independent angular momenta $\mathbf{J}_1$ and $\mathbf{J}_2$, the Clebsch-Gordan (CG) coefficients provide the transformation between the uncoupled basis $|j_1, m_1\rangle \otimes |j_2, m_2\rangle$ and the coupled basis $|J, M\rangle$:
\begin{align}
    |J, M\rangle = \sum_{m_1, m_2} \langle j_1, m_1; j_2, m_2 | J, M \rangle\, |j_1, m_1\rangle \otimes |j_2, m_2\rangle
\end{align}
The central idea of this section is to treat the four uncertainty products as ``quantum numbers'' of the market state, and to use the CG decomposition to construct a \textit{composite uncertainty state} that bounds the intraday price range from below.

\subsection{Composite Market State}

Define the daily market uncertainty state vector:
\begin{align}
    |\psi_d\rangle \sim \left( U_{Pt,d},\; U_{Pf,d},\; U_{PV,d},\; U_{PH,d} \right)
\end{align}
Each component is normalized by its long-run median to obtain dimensionless ``quantum numbers'':
\begin{align}
    u_k = \frac{U_{k,d}}{\tilde{U}_k}, \qquad k \in \{Pt, Pf, PV, PH\}
\end{align}
where $\tilde{U}_k$ is the sample median of $U_k$ over the historical period.

The CG-inspired composite uncertainty index is then:
\begin{align}
    U_\mathrm{composite} = \left(\sum_{k} \lambda_k\, u_k^2\right)^{1/2}
\end{align}
where the weights $\lambda_k$ are analogous to CG coefficients and are estimated empirically by optimizing predictive power for the forward intraday range $R_d = P_\mathrm{high} - P_\mathrm{low}$.

\subsection{Intraday Range Bound}

The key application is a \textit{principled lower bound on the intraday price range}. By analogy with the uncertainty principle:
\begin{align}
    R_d \geq \alpha \cdot \sigma_{P,d}
\end{align}
where $\alpha$ is an empirically determined constant (approximately 2--4 for SPY based on the observed ratio of intraday range to $\sigma_P$). This bound states that the day's high-low range cannot be smaller than a fixed multiple of the intraday price spread.

A stronger, composite version using all four uncertainty products:
\begin{align}
    R_d \geq f(U_\mathrm{composite,d})
\end{align}
where $f(\cdot)$ is a monotone function to be estimated from data. On days where $U_\mathrm{composite}$ is predictably large (e.g., following a high-VIX regime entry), the range bound is wide, providing a large profit opportunity for a range-trading strategy.

\subsection{Intraday Range Trading Application}

The practical application is as follows. At market open on day $d$:

\begin{enumerate}
    \item Compute $U_\mathrm{composite,d-1}$ from yesterday's microstructure data (available before today's open).
    \item Predict today's range: $\hat{R}_d = f(U_\mathrm{composite,d-1})$.
    \item Place limit buy order at $M_{d-1} - \beta \hat{R}_d$ and limit sell order at $M_{d-1} + \beta \hat{R}_d$, where $\beta \in (0, 0.5)$ controls the aggressiveness of the strategy.
    \item If both orders fill during the session, the profit per share is $2\beta \hat{R}_d$ minus transaction costs.
    \item If the range prediction is too narrow (actual range exceeds prediction), the strategy is safe --- both orders fill, profit is realized. If the prediction is too wide (actual range smaller than prediction), neither order may fill, resulting in zero profit but no loss.
\end{enumerate}

This is a fundamentally different application from the direction-prediction model explored in Section~12. Instead of asking ``will the market go up or down?'', it asks ``how far will the market move?'' --- a question for which the uncertainty product provides a principled, physics-motivated answer.

\subsection{Connection to Perturbation Theory}

The range-trading strategy can be refined using TDPT. On days following a macroeconomic announcement (FOMC, CPI, NFP), the ``perturbation'' $\hat{V}(t)$ is large, driving a transition from a low-$U$ state to a high-$U$ state. By Fermi's Golden Rule, the transition probability scales with the square of the matrix element $|\langle \mathrm{high}|\hat{V}|\mathrm{low}\rangle|^2$. Empirically, this matrix element can be proxied by the announcement surprise magnitude (actual minus consensus forecast, normalized by historical standard deviation of surprises). The hypothesis is:
\begin{align}
    \mathbb{P}(U_{d} > U_\mathrm{threshold}) \propto |\Delta_d|^2 \cdot \rho(U_\mathrm{threshold})
\end{align}
where $\Delta_d$ is the standardized announcement surprise and $\rho$ is the density of $U$ near the threshold. Testing this hypothesis requires an event calendar with quantified surprises, which is a direction for future data collection.

\subsection{Implementation Plan}

The following steps are required to implement and test this framework:
\begin{enumerate}
    \item Collect intraday high and low prices (available from Alpaca OHLCV bars) to compute $R_d$ for the historical sample.
    \item Estimate the CG weights $\lambda_k$ by regressing $R_d$ on $(u_{Pt}^2, u_{Pf}^2, u_{PV}^2, u_{PH}^2)$ using the historical data, with TimeSeriesSplit cross-validation.
    \item Backtest the range-trading strategy on the out-of-sample period using realistic transaction costs (Alpaca: zero commissions, $\sim$\$0.005 per share SEC/FINRA fees).
    \item Collect macro event surprise data (Bloomberg or Econoday) and test the TDPT transition probability hypothesis.
\end{enumerate}

% ============================================================
\section{Open Questions and Unresolved Issues}
% ============================================================

\begin{enumerate}
    \item \textbf{Robertson commutator.} The current implementation computes $\sigma_P \cdot \sigma_t$ (left-hand side of Robertson) but never computes $\frac{1}{2}|\langle[\hat{P},\hat{t}]\rangle|$ (right-hand side). The commutator expectation is state-dependent and should be computed daily from the volume distribution. This would convert the framework from an analogy to a direct test of the Robertson inequality.

    \item \textbf{Five uncertainty products.} Pairs $(P,f)$, $(P,V)$, and $(P,H_V)$ are fully computable from existing data. Pair $(P,\mathrm{OIB})$ requires tick-level order flow data. All four should be implemented and their mutual correlations, stationarity, long memory, and predictive power characterized and compared to the existing $(P,t)$ result.

    \item \textbf{Gabor bound test.} Compute $\sigma_t \cdot \sigma_f$ for each trading day using \texttt{trade\_count} from Alpaca bars. Compare to the exact lower bound $\frac{1}{4\pi}$. Report the daily ratio $\sigma_t \sigma_f / (1/4\pi)$ and its distribution. Days where the ratio is near 1.0 are in the ``minimum uncertainty'' state.

    \item \textbf{Entropic uncertainty.} Compute $H_V$ for each day and test the entropic uncertainty relation $H(P) + H(V) \geq \log(\pi e)$ directly.

    \item \textbf{TDPT empirical test.} Collect a dated event calendar (FOMC meetings, CPI releases, non-farm payrolls). For each event, measure $U_\mathrm{norm}$ in the $[-5, +5]$ trading day window. Test whether transition probabilities from low-$U$ to high-$U$ states scale with event surprise magnitude (consistent with Fermi's Golden Rule).

    \item \textbf{QFT two-point function.} Compute $C(\tau) = \langle U_\mathrm{norm}(t)\, U_\mathrm{norm}(t+\tau)\rangle$ and compare to the free scalar field propagator $C_0(\tau) \propto e^{-m\tau}$ (massive) or $C_0(\tau) \propto \tau^{-(d-2)}$ (massless). Deviations characterize interaction strength.

    \item \textbf{Phase transition hypothesis.} Test whether extreme $U_\mathrm{norm}$ events (top 1\%) are preceded by a measurable increase in the Hurst exponent $H$ and autocorrelation --- consistent with critical slowing down before a phase transition.

    \item \textbf{Name of $M$.} The term ``median'' is potentially misleading. $M$ is the volume-weighted 50th percentile of the intraday price distribution. Candidate names: \textit{volume-weighted price equilibrium}, \textit{price expectation under the volume measure}, \textit{market center of mass}.

    \item \textbf{Market holiday handling.} The ingest script fetches the previous calendar day's data without checking trading calendars. Stale predictions result on days following holidays or weekends. Integrate \texttt{pandas\_market\_calendars}.

    \item \textbf{KS test validity.} The KS test assumes i.i.d.\ observations. Block-bootstrap or stationary bootstrap should replace it for the log-normal fit assessment.

    \item \textbf{Hurst exponent resolution.} R/S and DFA estimates disagree by 0.099. A third estimator (Whittle MLE via ARFIMA) should be applied and a confidence interval reported.

    \item \textbf{Win rate.} Live prediction tracking began April 2026. Statistically meaningful win rate ($\pm 2\%$ precision at 95\% confidence) requires $n \geq 2500$ observations (approximately 10 years). Interim checkpoints at $n = 100$, $250$, $500$.
\end{enumerate}

\begin{thebibliography}{9}

\bibitem{heisenberg1927}
W.~Heisenberg, ``\"{U}ber den anschaulichen Inhalt der quantentheoretischen Kinematik und Mechanik,'' \textit{Zeitschrift f\"{u}r Physik}, vol.~43, pp.~172--198, 1927.

\bibitem{robertson1929}
H.~P. Robertson, ``The uncertainty principle,'' \textit{Physical Review}, vol.~34, no.~1, pp.~163--164, 1929.

\bibitem{griffiths2018}
D.~J. Griffiths and D.~F. Schroeter, \textit{Introduction to Quantum Mechanics}, 3rd ed. Cambridge University Press, 2018.

\bibitem{gabor1946}
D.~Gabor, ``Theory of communication,'' \textit{Journal of the Institution of Electrical Engineers}, vol.~93, no.~26, pp.~429--457, 1946.

\bibitem{mantegna1999introduction}
R.~N. Mantegna and H.~E. Stanley, \textit{An Introduction to Econophysics: Correlations and Complexity in Finance}. Cambridge University Press, 1999.

\bibitem{bouchaud2003theory}
J.-P. Bouchaud and M.~Potters, \textit{Theory of Financial Risk and Derivative Pricing: From Statistical Physics to Risk Management}, 2nd ed. Cambridge University Press, 2003.

\bibitem{andersen1998}
T.~G. Andersen and T.~Bollerslev, ``Answering the skeptics: Yes, standard volatility models do provide accurate forecasts,'' \textit{International Economic Review}, vol.~39, no.~4, pp.~885--905, 1998.

\bibitem{kyle1985}
A.~S. Kyle, ``Continuous auctions and insider trading,'' \textit{Econometrica}, vol.~53, no.~6, pp.~1315--1335, 1985.

\bibitem{hurst1951}
H.~E. Hurst, ``Long-term storage capacity of reservoirs,'' \textit{Transactions of the American Society of Civil Engineers}, vol.~116, pp.~770--799, 1951.

\end{thebibliography}

\end{document}
