problem_id
stringlengths
15
15
domain
stringclasses
6 values
difficulty
stringclasses
3 values
problem_statement
stringlengths
448
710
ground_truth_cot
stringlengths
1.05k
1.25k
ground_truth_answer
stringlengths
38
126
step_prm_labels
listlengths
4
4
injected_hallucination_cot
stringclasses
113 values
injected_error_step_index
int64
0
3
injected_error_type
stringclasses
4 values
verification_code
stringlengths
212
608
QCOT-OPTIM-0201
optimal_execution_and_microstructure
advanced
An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 4.0$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 4.70e-06$, temporary impact is $\eta = 9.90e-06$, and trader risk ave...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(7.6e-06 * 0.09 / 9.9e-06)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 1000000, 4.0, 9.9e-06, 7.6e-06, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajectory...
QCOT-ARBIT-0202
arbitrage_bounds_and_hedging
advanced
Let an underlying equity trade at spot $S_0 = 101.49$, paying a known discrete dividend $D = 1.28$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 106.84$ maturing at $T = 1.0$. Establish the analytical bounds on European cal...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = -1.3878, Lower bound = 0.0000
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 101.49, 106.84, 1.28, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, -1.3878, atol=1e-3)
QCOT-MEAN_-0203
mean_field_games_and_liquidity
advanced
Consider a continuum of $N = 50$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution speed...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.7) * q, dxi/dt = (xi^2 - 0.04*xi) / 1.7, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.7, 0.04, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], xi[...
QCOT-QUANT-0204
quantum_finance_and_ising_formulation
advanced
Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 3.3$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 0.8250, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 8 Sigma = np.eye(N) * 0.04 + 0.01 lam = 3.3 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0205
stochastic_calculus
expert
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = 0.6$, $\sigma_1 = 0.255$, and $\sigma_2 = 0.172...
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [2*mu*S^2*V + S^2*kappa*(theta-V) + 0.06502*S^2*V + 0.05263*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 172.19, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = 0.6 * dW1 + np.sqrt(1 - 0.6**2) * dZ dS = 0.0932 * S0 * dt + 0.255 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.172 * np.sqrt(...
QCOT-PDE_A-0206
pde_and_martingale_pricing
expert
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.061$ and volatility $\sigma = 0.263$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.061*S*dV/dS + 0.5*0.06917*S^2*d2V/dS2 - 0.061*V = 0, V(S, 1.85) = max(S - 108.6, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 108.6, 0.061, 0.263, 1.85 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0207
optimal_execution_and_microstructure
expert
An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 1.9$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 1.58e-06$, temporary impact is $\eta = 3.76e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 100000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(5.08e-05 * 0.09 / 3.76e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 100000, 1.9, 3.76e-05, 5.08e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0208
arbitrage_bounds_and_hedging
expert
Let an underlying equity trade at spot $S_0 = 107.99$, paying a known discrete dividend $D = 2.09$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 97.68$ maturing at $T = 1.0$. Establish the analytical bounds on European call...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 13.0355, Lower bound = 13.0355
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 107.99, 97.68, 2.09, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 13.0355, atol=1e-3)
QCOT-MEAN_-0209
mean_field_games_and_liquidity
expert
Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.15) * q, dxi/dt = (xi^2 - 0.032*xi) / 1.15, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.15, 0.032, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0210
quantum_finance_and_ising_formulation
expert
Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 7.0$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 1.7500, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 8 Sigma = np.eye(N) * 0.04 + 0.01 lam = 7.0 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0211
stochastic_calculus
phd_level
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = 0.05$, $\sigma_1 = 0.309$, and $\sigma_2 = 0.22...
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [2*mu*S^2*V + S^2*kappa*(theta-V) + 0.09548*S^2*V + 0.00692*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 100.24, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = 0.05 * dW1 + np.sqrt(1 - 0.05**2) * dZ dS = 0.0511 * S0 * dt + 0.309 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.224 * np.sqr...
QCOT-PDE_A-0212
pde_and_martingale_pricing
phd_level
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.054$ and volatility $\sigma = 0.399$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.054*S*dV/dS + 0.5*0.15920*S^2*d2V/dS2 - 0.054*V = 0, V(S, 1.56) = max(S - 110.1, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 110.1, 0.054, 0.399, 1.56 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0213
optimal_execution_and_microstructure
phd_level
An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 4.0$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.75e-06$, temporary impact is $\eta = 2.60e-06$, and trader risk ave...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(5.74e-05 * 0.09 / 2.6e-06)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 1000000, 4.0, 2.6e-06, 5.74e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0214
arbitrage_bounds_and_hedging
phd_level
Let an underlying equity trade at spot $S_0 = 107.54$, paying a known discrete dividend $D = 2.64$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 96.84$ maturing at $T = 1.0$. Establish the analytical bounds on European call...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 12.8481, Lower bound = 12.8481
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 107.54, 96.84, 2.64, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 12.8481, atol=1e-3)
QCOT-MEAN_-0215
mean_field_games_and_liquidity
phd_level
Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.19) * q, dxi/dt = (xi^2 - 0.025*xi) / 1.19, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.19, 0.025, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0216
quantum_finance_and_ising_formulation
phd_level
Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 8.4$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 2.1000, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 8 Sigma = np.eye(N) * 0.04 + 0.01 lam = 8.4 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0217
stochastic_calculus
advanced
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = 0.23$, $\sigma_1 = 0.294$, and $\sigma_2 = 0.24...
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [2*mu*S^2*V + S^2*kappa*(theta-V) + 0.08644*S^2*V + 0.033*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 72.49, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = 0.23 * dW1 + np.sqrt(1 - 0.23**2) * dZ dS = 0.0583 * S0 * dt + 0.294 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.244 * np.sqrt...
QCOT-PDE_A-0218
pde_and_martingale_pricing
advanced
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.054$ and volatility $\sigma = 0.329$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.054*S*dV/dS + 0.5*0.10824*S^2*d2V/dS2 - 0.054*V = 0, V(S, 1.74) = max(S - 104.0, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 104.0, 0.054, 0.329, 1.74 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0219
optimal_execution_and_microstructure
advanced
An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 2.8$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 4.55e-06$, temporary impact is $\eta = 2.96e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(4.07e-05 * 0.09 / 2.96e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 500000, 2.8, 2.96e-05, 4.07e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0220
arbitrage_bounds_and_hedging
advanced
Let an underlying equity trade at spot $S_0 = 108.95$, paying a known discrete dividend $D = 2.17$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 93.07$ maturing at $T = 1.0$. Establish the analytical bounds on European call...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 18.3027, Lower bound = 18.3027
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 108.95, 93.07, 2.17, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 18.3027, atol=1e-3)
QCOT-MEAN_-0221
mean_field_games_and_liquidity
advanced
Consider a continuum of $N = 100$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 0.88) * q, dxi/dt = (xi^2 - 0.014*xi) / 0.88, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 0.88, 0.014, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0222
quantum_finance_and_ising_formulation
advanced
Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 9.5$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 2.3750, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 8 Sigma = np.eye(N) * 0.04 + 0.01 lam = 9.5 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0223
stochastic_calculus
expert
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.56$, $\sigma_1 = 0.334$, and $\sigma_2 = 0.2...
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.33467*S^3*V + -0.13523*S^3*sqrt(V)]dt + 3*sigma1*S^3*V*dW1 + sigma2*S^3*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 134.77, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.56 * dW1 + np.sqrt(1 - -0.56**2) * dZ dS = 0.0957 * S0 * dt + 0.334 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.241 * np.s...
QCOT-PDE_A-0224
pde_and_martingale_pricing
expert
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.042$ and volatility $\sigma = 0.167$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.042*S*dV/dS + 0.5*0.02789*S^2*d2V/dS2 - 0.042*V = 0, V(S, 0.66) = max(S - 83.1, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 83.1, 0.042, 0.167, 0.66 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0225
optimal_execution_and_microstructure
expert
An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 4.9$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 4.64e-06$, temporary impact is $\eta = 2.31e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 100000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(1.22e-05 * 0.09 / 2.31e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 100000, 4.9, 2.31e-05, 1.22e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0226
arbitrage_bounds_and_hedging
expert
Let an underlying equity trade at spot $S_0 = 106.78$, paying a known discrete dividend $D = 2.84$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 92.49$ maturing at $T = 1.0$. Establish the analytical bounds on European call...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 16.0309, Lower bound = 16.0309
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 106.78, 92.49, 2.84, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 16.0309, atol=1e-3)
QCOT-MEAN_-0227
mean_field_games_and_liquidity
expert
Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 0.84) * q, dxi/dt = (xi^2 - 0.022*xi) / 0.84, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 0.84, 0.022, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0228
quantum_finance_and_ising_formulation
expert
Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 5.2$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 1.3000, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 8 Sigma = np.eye(N) * 0.04 + 0.01 lam = 5.2 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0229
stochastic_calculus
phd_level
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.27$, $\sigma_1 = 0.311$, and $\sigma_2 = 0.1...
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [2*mu*S^2*V + S^2*kappa*(theta-V) + 0.09672*S^2*V + -0.01696*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 58.21, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.27 * dW1 + np.sqrt(1 - -0.27**2) * dZ dS = 0.0668 * S0 * dt + 0.311 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.101 * np.sq...
QCOT-PDE_A-0230
pde_and_martingale_pricing
phd_level
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.045$ and volatility $\sigma = 0.366$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.045*S*dV/dS + 0.5*0.13396*S^2*d2V/dS2 - 0.045*V = 0, V(S, 1.2) = max(S - 116.9, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 116.9, 0.045, 0.366, 1.2 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0231
optimal_execution_and_microstructure
phd_level
An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 2.8$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.71e-06$, temporary impact is $\eta = 2.32e-05$, and trader risk ave...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(2.32e-05 * 0.09 / 2.32e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 1000000, 2.8, 2.32e-05, 2.32e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajecto...
QCOT-ARBIT-0232
arbitrage_bounds_and_hedging
phd_level
Let an underlying equity trade at spot $S_0 = 92.82$, paying a known discrete dividend $D = 2.00$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 93.53$ maturing at $T = 1.0$. Establish the analytical bounds on European call ...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 1.9009, Lower bound = 1.9009
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 92.82, 93.53, 2.0, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 1.9009, atol=1e-3)
QCOT-MEAN_-0233
mean_field_games_and_liquidity
phd_level
Consider a continuum of $N = 100$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 0.97) * q, dxi/dt = (xi^2 - 0.011*xi) / 0.97, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 0.97, 0.011, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0234
quantum_finance_and_ising_formulation
phd_level
Consider a portfolio selection problem across $N = 4$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{4}$, covariance matrix $\Sigma \in \mathbb{R}^{4 \times 4}$, and budget constraint $\sum_{i=1}^{4} x_i = B$ with penalty weight $\lambda_B = 6.6$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 1.6500, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 4 Sigma = np.eye(N) * 0.04 + 0.01 lam = 6.6 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0235
stochastic_calculus
advanced
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = 0.74$, $\sigma_1 = 0.283$, and $\sigma_2 = 0.13...
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [2*mu*S^2*V + S^2*kappa*(theta-V) + 0.08009*S^2*V + 0.05696*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 144.84, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = 0.74 * dW1 + np.sqrt(1 - 0.74**2) * dZ dS = 0.041 * S0 * dt + 0.283 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.136 * np.sqrt...
QCOT-PDE_A-0236
pde_and_martingale_pricing
advanced
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.053$ and volatility $\sigma = 0.365$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.053*S*dV/dS + 0.5*0.13322*S^2*d2V/dS2 - 0.053*V = 0, V(S, 0.78) = max(S - 101.4, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 101.4, 0.053, 0.365, 0.78 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0237
optimal_execution_and_microstructure
advanced
An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 1.8$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.02e-06$, temporary impact is $\eta = 4.30e-06$, and trader risk ave...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(7.52e-05 * 0.09 / 4.3e-06)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 1000000, 1.8, 4.3e-06, 7.52e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0238
arbitrage_bounds_and_hedging
advanced
Let an underlying equity trade at spot $S_0 = 107.96$, paying a known discrete dividend $D = 1.38$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 94.10$ maturing at $T = 1.0$. Establish the analytical bounds on European call...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 17.1034, Lower bound = 17.1034
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 107.96, 94.1, 1.38, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 17.1034, atol=1e-3)
QCOT-MEAN_-0239
mean_field_games_and_liquidity
advanced
Consider a continuum of $N = 50$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution speed...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.75) * q, dxi/dt = (xi^2 - 0.025*xi) / 1.75, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.75, 0.025, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0240
quantum_finance_and_ising_formulation
advanced
Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 2.5$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 0.6250, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 8 Sigma = np.eye(N) * 0.04 + 0.01 lam = 2.5 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0241
stochastic_calculus
expert
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.16$, $\sigma_1 = 0.255$, and $\sigma_2 = 0.1...
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.19508*S^3*V + -0.02301*S^3*sqrt(V)]dt + 3*sigma1*S^3*V*dW1 + sigma2*S^3*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 166.33, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.16 * dW1 + np.sqrt(1 - -0.16**2) * dZ dS = 0.0763 * S0 * dt + 0.255 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.188 * np.s...
QCOT-PDE_A-0242
pde_and_martingale_pricing
expert
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.066$ and volatility $\sigma = 0.176$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.066*S*dV/dS + 0.5*0.03098*S^2*d2V/dS2 - 0.066*V = 0, V(S, 0.61) = max(S - 93.4, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 93.4, 0.066, 0.176, 0.61 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0243
optimal_execution_and_microstructure
expert
An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 2.6$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 1.93e-06$, temporary impact is $\eta = 1.43e-05$, and trader risk ave...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(6.48e-05 * 0.09 / 1.43e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 1000000, 2.6, 1.43e-05, 6.48e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajecto...
QCOT-ARBIT-0244
arbitrage_bounds_and_hedging
expert
Let an underlying equity trade at spot $S_0 = 90.51$, paying a known discrete dividend $D = 2.43$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 93.12$ maturing at $T = 1.0$. Establish the analytical bounds on European call ...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = -0.4385, Lower bound = 0.0000
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 90.51, 93.12, 2.43, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, -0.4385, atol=1e-3)
QCOT-MEAN_-0245
mean_field_games_and_liquidity
expert
Consider a continuum of $N = 50$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution speed...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.33) * q, dxi/dt = (xi^2 - 0.026*xi) / 1.33, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.33, 0.026, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0246
quantum_finance_and_ising_formulation
expert
Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 3.8$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 0.9500, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 8 Sigma = np.eye(N) * 0.04 + 0.01 lam = 3.8 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0247
stochastic_calculus
phd_level
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.51$, $\sigma_1 = 0.171$, and $\sigma_2 = 0.2...
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [2*mu*S^2*V + S^2*kappa*(theta-V) + 0.02924*S^2*V + -0.04535*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 150.78, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.51 * dW1 + np.sqrt(1 - -0.51**2) * dZ dS = 0.0416 * S0 * dt + 0.171 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.26 * np.sq...
QCOT-PDE_A-0248
pde_and_martingale_pricing
phd_level
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.053$ and volatility $\sigma = 0.33$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Mer...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.053*S*dV/dS + 0.5*0.10890*S^2*d2V/dS2 - 0.053*V = 0, V(S, 1.98) = max(S - 112.2, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 112.2, 0.053, 0.33, 1.98 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0249
optimal_execution_and_microstructure
phd_level
An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 1.8$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 4.17e-06$, temporary impact is $\eta = 2.05e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(6.71e-05 * 0.09 / 2.05e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 500000, 1.8, 2.05e-05, 6.71e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0250
arbitrage_bounds_and_hedging
phd_level
Let an underlying equity trade at spot $S_0 = 95.86$, paying a known discrete dividend $D = 1.03$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 107.93$ maturing at $T = 1.0$. Establish the analytical bounds on European call...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = -7.8108, Lower bound = 0.0000
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 95.86, 107.93, 1.03, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, -7.8108, atol=1e-3)
QCOT-MEAN_-0251
mean_field_games_and_liquidity
phd_level
Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.77) * q, dxi/dt = (xi^2 - 0.039*xi) / 1.77, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.77, 0.039, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0252
quantum_finance_and_ising_formulation
phd_level
Consider a portfolio selection problem across $N = 4$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{4}$, covariance matrix $\Sigma \in \mathbb{R}^{4 \times 4}$, and budget constraint $\sum_{i=1}^{4} x_i = B$ with penalty weight $\lambda_B = 9.0$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 2.2500, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 4 Sigma = np.eye(N) * 0.04 + 0.01 lam = 9.0 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0253
stochastic_calculus
advanced
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.26$, $\sigma_1 = 0.332$, and $\sigma_2 = 0.2...
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [2*mu*S^2*V + S^2*kappa*(theta-V) + 0.11022*S^2*V + -0.03884*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 146.44, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.26 * dW1 + np.sqrt(1 - -0.26**2) * dZ dS = 0.0963 * S0 * dt + 0.332 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.225 * np.s...
QCOT-PDE_A-0254
pde_and_martingale_pricing
advanced
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.043$ and volatility $\sigma = 0.298$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.043*S*dV/dS + 0.5*0.08880*S^2*d2V/dS2 - 0.043*V = 0, V(S, 1.44) = max(S - 90.7, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 90.7, 0.043, 0.298, 1.44 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0255
optimal_execution_and_microstructure
advanced
An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 1.9$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.89e-06$, temporary impact is $\eta = 1.88e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(8.62e-05 * 0.09 / 1.88e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 500000, 1.9, 1.88e-05, 8.62e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0256
arbitrage_bounds_and_hedging
advanced
Let an underlying equity trade at spot $S_0 = 109.49$, paying a known discrete dividend $D = 1.23$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 105.60$ maturing at $T = 1.0$. Establish the analytical bounds on European cal...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 7.8406, Lower bound = 7.8406
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 109.49, 105.6, 1.23, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 7.8406, atol=1e-3)
QCOT-MEAN_-0257
mean_field_games_and_liquidity
advanced
Consider a continuum of $N = 100$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.84) * q, dxi/dt = (xi^2 - 0.029*xi) / 1.84, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.84, 0.029, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0258
quantum_finance_and_ising_formulation
advanced
Consider a portfolio selection problem across $N = 4$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{4}$, covariance matrix $\Sigma \in \mathbb{R}^{4 \times 4}$, and budget constraint $\sum_{i=1}^{4} x_i = B$ with penalty weight $\lambda_B = 5.9$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 1.4750, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 4 Sigma = np.eye(N) * 0.04 + 0.01 lam = 5.9 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0259
stochastic_calculus
expert
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.45$, $\sigma_1 = 0.29$, and $\sigma_2 = 0.18...
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.2523*S^3*V + -0.07086*S^3*sqrt(V)]dt + 3*sigma1*S^3*V*dW1 + sigma2*S^3*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 126.87, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.45 * dW1 + np.sqrt(1 - -0.45**2) * dZ dS = 0.0993 * S0 * dt + 0.29 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.181 * np.sq...
QCOT-PDE_A-0260
pde_and_martingale_pricing
expert
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.07$ and volatility $\sigma = 0.396$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Mer...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.07*S*dV/dS + 0.5*0.15682*S^2*d2V/dS2 - 0.07*V = 0, V(S, 0.76) = max(S - 101.0, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 101.0, 0.07, 0.396, 0.76 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0261
optimal_execution_and_microstructure
expert
An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 4.3$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.45e-06$, temporary impact is $\eta = 4.13e-05$, and trader risk ave...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(5.34e-05 * 0.09 / 4.13e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 1000000, 4.3, 4.13e-05, 5.34e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajecto...
QCOT-ARBIT-0262
arbitrage_bounds_and_hedging
expert
Let an underlying equity trade at spot $S_0 = 99.96$, paying a known discrete dividend $D = 1.81$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 91.34$ maturing at $T = 1.0$. Establish the analytical bounds on European call ...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 11.3094, Lower bound = 11.3094
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 99.96, 91.34, 1.81, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 11.3094, atol=1e-3)
QCOT-MEAN_-0263
mean_field_games_and_liquidity
expert
Consider a continuum of $N = 100$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 0.81) * q, dxi/dt = (xi^2 - 0.043*xi) / 0.81, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 0.81, 0.043, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0264
quantum_finance_and_ising_formulation
expert
Consider a portfolio selection problem across $N = 6$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{6}$, covariance matrix $\Sigma \in \mathbb{R}^{6 \times 6}$, and budget constraint $\sum_{i=1}^{6} x_i = B$ with penalty weight $\lambda_B = 3.1$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 0.7750, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 6 Sigma = np.eye(N) * 0.04 + 0.01 lam = 3.1 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0265
stochastic_calculus
phd_level
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = 0.21$, $\sigma_1 = 0.296$, and $\sigma_2 = 0.15...
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [2*mu*S^2*V + S^2*kappa*(theta-V) + 0.08762*S^2*V + 0.01865*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 89.55, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = 0.21 * dW1 + np.sqrt(1 - 0.21**2) * dZ dS = 0.0613 * S0 * dt + 0.296 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.15 * np.sqrt(...
QCOT-PDE_A-0266
pde_and_martingale_pricing
phd_level
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.031$ and volatility $\sigma = 0.379$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.031*S*dV/dS + 0.5*0.14364*S^2*d2V/dS2 - 0.031*V = 0, V(S, 1.07) = max(S - 96.8, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 96.8, 0.031, 0.379, 1.07 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0267
optimal_execution_and_microstructure
phd_level
An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 1.7$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 2.17e-06$, temporary impact is $\eta = 1.83e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(9.59e-05 * 0.09 / 1.83e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 500000, 1.7, 1.83e-05, 9.59e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0268
arbitrage_bounds_and_hedging
phd_level
Let an underlying equity trade at spot $S_0 = 91.81$, paying a known discrete dividend $D = 1.14$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 105.42$ maturing at $T = 1.0$. Establish the analytical bounds on European call...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = -9.5805, Lower bound = 0.0000
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 91.81, 105.42, 1.14, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, -9.5805, atol=1e-3)
QCOT-MEAN_-0269
mean_field_games_and_liquidity
phd_level
Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.03) * q, dxi/dt = (xi^2 - 0.022*xi) / 1.03, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.03, 0.022, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0270
quantum_finance_and_ising_formulation
phd_level
Consider a portfolio selection problem across $N = 4$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{4}$, covariance matrix $\Sigma \in \mathbb{R}^{4 \times 4}$, and budget constraint $\sum_{i=1}^{4} x_i = B$ with penalty weight $\lambda_B = 7.8$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 1.9500, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 4 Sigma = np.eye(N) * 0.04 + 0.01 lam = 7.8 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0271
stochastic_calculus
advanced
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.58$, $\sigma_1 = 0.229$, and $\sigma_2 = 0.2...
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.15732*S^3*V + -0.11595*S^3*sqrt(V)]dt + 3*sigma1*S^3*V*dW1 + sigma2*S^3*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 141.56, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.58 * dW1 + np.sqrt(1 - -0.58**2) * dZ dS = 0.1159 * S0 * dt + 0.229 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.291 * np.s...
QCOT-PDE_A-0272
pde_and_martingale_pricing
advanced
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.033$ and volatility $\sigma = 0.158$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.033*S*dV/dS + 0.5*0.02496*S^2*d2V/dS2 - 0.033*V = 0, V(S, 1.39) = max(S - 90.5, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 90.5, 0.033, 0.158, 1.39 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0273
optimal_execution_and_microstructure
advanced
An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 3.5$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 4.25e-06$, temporary impact is $\eta = 4.78e-05$, and trader risk ave...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(1.63e-05 * 0.09 / 4.78e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 1000000, 3.5, 4.78e-05, 1.63e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajecto...
QCOT-ARBIT-0274
arbitrage_bounds_and_hedging
advanced
Let an underlying equity trade at spot $S_0 = 99.48$, paying a known discrete dividend $D = 1.70$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 96.89$ maturing at $T = 1.0$. Establish the analytical bounds on European call ...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 5.6574, Lower bound = 5.6574
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 99.48, 96.89, 1.7, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 5.6574, atol=1e-3)
QCOT-MEAN_-0275
mean_field_games_and_liquidity
advanced
Consider a continuum of $N = 50$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution speed...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.53) * q, dxi/dt = (xi^2 - 0.03*xi) / 1.53, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.53, 0.03, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], xi...
QCOT-QUANT-0276
quantum_finance_and_ising_formulation
advanced
Consider a portfolio selection problem across $N = 6$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{6}$, covariance matrix $\Sigma \in \mathbb{R}^{6 \times 6}$, and budget constraint $\sum_{i=1}^{6} x_i = B$ with penalty weight $\lambda_B = 5.7$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 1.4250, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 6 Sigma = np.eye(N) * 0.04 + 0.01 lam = 5.7 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0277
stochastic_calculus
expert
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.79$, $\sigma_1 = 0.15$, and $\sigma_2 = 0.29...
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.0675*S^3*V + -0.10452*S^3*sqrt(V)]dt + 3*sigma1*S^3*V*dW1 + sigma2*S^3*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 61.39, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.79 * dW1 + np.sqrt(1 - -0.79**2) * dZ dS = 0.0462 * S0 * dt + 0.15 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.294 * np.sqr...
QCOT-PDE_A-0278
pde_and_martingale_pricing
expert
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.042$ and volatility $\sigma = 0.173$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.042*S*dV/dS + 0.5*0.02993*S^2*d2V/dS2 - 0.042*V = 0, V(S, 0.71) = max(S - 116.7, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 116.7, 0.042, 0.173, 0.71 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0279
optimal_execution_and_microstructure
expert
An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 4.8$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.48e-06$, temporary impact is $\eta = 2.65e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(9.6e-06 * 0.09 / 2.65e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 500000, 4.8, 2.65e-05, 9.6e-06, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajectory...
QCOT-ARBIT-0280
arbitrage_bounds_and_hedging
expert
Let an underlying equity trade at spot $S_0 = 105.17$, paying a known discrete dividend $D = 2.52$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 102.78$ maturing at $T = 1.0$. Establish the analytical bounds on European cal...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 4.9448, Lower bound = 4.9448
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 105.17, 102.78, 2.52, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 4.9448, atol=1e-3)
QCOT-MEAN_-0281
mean_field_games_and_liquidity
expert
Consider a continuum of $N = 50$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution speed...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.77) * q, dxi/dt = (xi^2 - 0.038*xi) / 1.77, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.77, 0.038, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0282
quantum_finance_and_ising_formulation
expert
Consider a portfolio selection problem across $N = 4$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{4}$, covariance matrix $\Sigma \in \mathbb{R}^{4 \times 4}$, and budget constraint $\sum_{i=1}^{4} x_i = B$ with penalty weight $\lambda_B = 9.2$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 2.3000, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 4 Sigma = np.eye(N) * 0.04 + 0.01 lam = 9.2 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0283
stochastic_calculus
phd_level
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.73$, $\sigma_1 = 0.16$, and $\sigma_2 = 0.23...
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.0768*S^3*V + -0.08199*S^3*sqrt(V)]dt + 3*sigma1*S^3*V*dW1 + sigma2*S^3*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 147.0, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.73 * dW1 + np.sqrt(1 - -0.73**2) * dZ dS = 0.0955 * S0 * dt + 0.16 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.234 * np.sqr...
QCOT-PDE_A-0284
pde_and_martingale_pricing
phd_level
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.076$ and volatility $\sigma = 0.195$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.076*S*dV/dS + 0.5*0.03803*S^2*d2V/dS2 - 0.076*V = 0, V(S, 1.87) = max(S - 102.7, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 102.7, 0.076, 0.195, 1.87 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0285
optimal_execution_and_microstructure
phd_level
An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 1.5$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 6.90e-07$, temporary impact is $\eta = 3.68e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(2.01e-05 * 0.09 / 3.68e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 500000, 1.5, 3.68e-05, 2.01e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0286
arbitrage_bounds_and_hedging
phd_level
Let an underlying equity trade at spot $S_0 = 98.44$, paying a known discrete dividend $D = 2.49$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 105.91$ maturing at $T = 1.0$. Establish the analytical bounds on European call...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = -4.7332, Lower bound = 0.0000
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 98.44, 105.91, 2.49, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, -4.7332, atol=1e-3)
QCOT-MEAN_-0287
mean_field_games_and_liquidity
phd_level
Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.28) * q, dxi/dt = (xi^2 - 0.028*xi) / 1.28, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.28, 0.028, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0288
quantum_finance_and_ising_formulation
phd_level
Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 2.3$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 0.5750, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 8 Sigma = np.eye(N) * 0.04 + 0.01 lam = 2.3 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0289
stochastic_calculus
advanced
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = 0.31$, $\sigma_1 = 0.174$, and $\sigma_2 = 0.11...
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.09083*S^3*V + 0.01861*S^3*sqrt(V)]dt + 3*sigma1*S^3*V*dW1 + sigma2*S^3*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 139.44, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = 0.31 * dW1 + np.sqrt(1 - 0.31**2) * dZ dS = 0.0584 * S0 * dt + 0.174 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.115 * np.sqr...
QCOT-PDE_A-0290
pde_and_martingale_pricing
advanced
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.046$ and volatility $\sigma = 0.251$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.046*S*dV/dS + 0.5*0.06300*S^2*d2V/dS2 - 0.046*V = 0, V(S, 1.71) = max(S - 102.9, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 102.9, 0.046, 0.251, 1.71 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0291
optimal_execution_and_microstructure
advanced
An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 2.7$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.34e-06$, temporary impact is $\eta = 3.72e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 100000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(5.25e-05 * 0.09 / 3.72e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 100000, 2.7, 3.72e-05, 5.25e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0292
arbitrage_bounds_and_hedging
advanced
Let an underlying equity trade at spot $S_0 = 107.53$, paying a known discrete dividend $D = 1.92$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 98.35$ maturing at $T = 1.0$. Establish the analytical bounds on European call...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = 12.1040, Lower bound = 12.1040
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 107.53, 98.35, 1.92, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, 12.104, atol=1e-3)
QCOT-MEAN_-0293
mean_field_games_and_liquidity
advanced
Consider a continuum of $N = 100$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 1.81) * q, dxi/dt = (xi^2 - 0.011*xi) / 1.81, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 1.81, 0.011, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0294
quantum_finance_and_ising_formulation
advanced
Consider a portfolio selection problem across $N = 4$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{4}$, covariance matrix $\Sigma \in \mathbb{R}^{4 \times 4}$, and budget constraint $\sum_{i=1}^{4} x_i = B$ with penalty weight $\lambda_B = 5.1$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 1.2750, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 4 Sigma = np.eye(N) * 0.04 + 0.01 lam = 5.1 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])
QCOT-STOCH-0295
stochastic_calculus
expert
Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system: $$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$ $$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$ with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.66$, $\sigma_1 = 0.152$, and $\sigma_2 = 0.1...
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.06931*S^3*V + -0.03341*S^3*sqrt(V)]dt + 3*sigma1*S^3*V*dW1 + sigma2*S^3*sqrt(V)*dW2
[ 1, 1, 1, 1 ]
Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives: $\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr...
2
ito_cross_variation_omission
import numpy as np # Verification via Monte Carlo Euler-Maruyama S0, V0, dt, N = 189.89, 0.04, 1e-4, 50000 dW1 = np.random.normal(0, np.sqrt(dt), N) dZ = np.random.normal(0, np.sqrt(dt), N) dW2 = -0.66 * dW1 + np.sqrt(1 - -0.66**2) * dZ dS = 0.0456 * S0 * dt + 0.152 * S0 * dW1 dV = 1.5 * (0.04 - V0) * dt + 0.111 * np.s...
QCOT-PDE_A-0296
pde_and_martingale_pricing
expert
Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.049$ and volatility $\sigma = 0.307$. Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me...
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
dV/dt + 0.049*S*dV/dS + 0.5*0.09425*S^2*d2V/dS2 - 0.049*V = 0, V(S, 1.98) = max(S - 114.9, 0)
[ 1, 1, 1, 1 ]
Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition. Step 2: Expand $dV(S_t, t)$ via Itô's formula: $$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ...
3
drift_arbitrage_violation
import numpy as np from scipy.stats import norm S, K, r, sigma, T = 100.0, 114.9, 0.049, 0.307, 1.98 d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T)) d2 = d1 - sigma*np.sqrt(T) call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2) print('Analytical European Call price:', call_price)
QCOT-OPTIM-0297
optimal_execution_and_microstructure
expert
An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 3.9$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 5.50e-07$, temporary impact is $\eta = 1.75e-05$, and trader risk avers...
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(5.27e-05 * 0.09 / 1.75e-05)
[ 1, 1, 1, 1 ]
Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$. Step 2: Construct the Lagrangian functional: $$L(t, x, \dot{x}) = \eta \dot{x}^2 +...
2
euler_lagrange_sign_error
import numpy as np X0, T, eta, lam, sigma = 500000, 3.9, 1.75e-05, 5.27e-05, 0.30 kappa = np.sqrt(lam * sigma**2 / eta) t = np.linspace(0, T, 100) x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T) assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0) print('Optimal Almgren-Chriss liquidation trajector...
QCOT-ARBIT-0298
arbitrage_bounds_and_hedging
expert
Let an underlying equity trade at spot $S_0 = 90.07$, paying a known discrete dividend $D = 1.59$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$. Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 99.35$ maturing at $T = 1.0$. Establish the analytical bounds on European call ...
Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $...
C0 - P0 = -5.9853, Lower bound = 0.0000
[ 1, 1, 1, 1 ]
Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$. Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)...
0
drift_arbitrage_violation
import numpy as np S0, K, D, r, tD, T = 90.07, 99.35, 1.59, 0.05, 0.5, 1.0 pv_D = D * np.exp(-r * tD) pv_K = K * np.exp(-r * T) parity = S0 - pv_D - pv_K print('Parity delta C - P:', parity) assert np.isclose(parity, -5.9853, atol=1e-3)
QCOT-MEAN_-0299
mean_field_games_and_liquidity
expert
Consider a continuum of $N = 100$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee...
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$. The H...
v*(t, q) = (xi(t) / 0.85) * q, dxi/dt = (xi^2 - 0.022*xi) / 0.85, xi(T) = beta
[ 1, 1, 1, 1 ]
Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$. Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy...
1
euler_lagrange_sign_error
import numpy as np alpha, c, beta = 0.85, 0.022, 10.0 # Solve Riccati ODE backward in time dt, steps = 0.001, 1000 xi = np.zeros(steps) xi[-1] = beta for t in range(steps - 2, -1, -1): dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha xi[t] = xi[t+1] + dxi * dt print('Equilibrium Riccati terminal/initial xi:', xi[-1], x...
QCOT-QUANT-0300
quantum_finance_and_ising_formulation
expert
Consider a portfolio selection problem across $N = 4$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{4}$, covariance matrix $\Sigma \in \mathbb{R}^{4 \times 4}$, and budget constraint $\sum_{i=1}^{4} x_i = B$ with penalty weight $\lambda_B = 4.2$. Convert the quadratic ...
Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$. Step 2: Expand the quadratic risk ...
J_ij = (1/8)*Sigma_ij + 1.0500, x_i = (I - Z_i)/2
[ 1, 1, 1, 1 ]
Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$. Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri...
0
pauli_matrix_commutation_error
import numpy as np N = 4 Sigma = np.eye(N) * 0.04 + 0.01 lam = 4.2 Q = 0.5 * Sigma + lam * np.ones((N, N)) J = 0.25 * Q np.fill_diagonal(J, 0.0) print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1])