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-0501 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 3.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 = 8.40e-07$, temporary impact is $\eta = 3.71e-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.17e-05 * 0.09 / 3.71e-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, 3.7, 3.71e-05, 5.17e-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-0502 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 90.83$, 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 = 91.70$ 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.2323, Lower bound = 1.2323 | [
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.83, 91.7, 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, 1.2323, atol=1e-3) |
QCOT-MEAN_-0503 | mean_field_games_and_liquidity | phd_level | 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) / 0.66) * q, dxi/dt = (xi^2 - 0.042*xi) / 0.66, 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.66, 0.042, 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-0504 | 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.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 + 2.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 = 4
Sigma = np.eye(N) * 0.04 + 0.01
lam = 9.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-0505 | 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.44$, $\sigma_1 = 0.209$, and $\sigma_2 = 0.17... | 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.04368*S^2*V + 0.03127*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 = 160.63, 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.44 * dW1 + np.sqrt(1 - 0.44**2) * dZ
dS = 0.0683 * S0 * dt + 0.209 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.17 * np.sqrt... |
QCOT-PDE_A-0506 | 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.067$ and volatility $\sigma = 0.239$.
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.067*S*dV/dS + 0.5*0.05712*S^2*d2V/dS2 - 0.067*V = 0, V(S, 1.32) = max(S - 96.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, 96.5, 0.067, 0.239, 1.32
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-0507 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 1.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.85e-06$, temporary impact is $\eta = 1.40e-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(3.1e-06 * 0.09 / 1.4e-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.3, 1.4e-05, 3.1e-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-0508 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 109.36$, paying a known discrete dividend $D = 2.54$ 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 = 95.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 = 15.6503, Lower bound = 15.6503 | [
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.36, 95.91, 2.54, 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, 15.6503, atol=1e-3) |
QCOT-MEAN_-0509 | 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.5) * q, dxi/dt = (xi^2 - 0.049*xi) / 1.5, 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.5, 0.049, 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-0510 | 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.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 + 0.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 = 3.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-0511 | 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.73$, $\sigma_1 = 0.279$, 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.23352*S^3*V + -0.12587*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 = 142.25, 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.102 * S0 * dt + 0.279 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.206 * np.sq... |
QCOT-PDE_A-0512 | 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.039$ and volatility $\sigma = 0.181$.
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.039*S*dV/dS + 0.5*0.03276*S^2*d2V/dS2 - 0.039*V = 0, V(S, 0.67) = max(S - 99.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, 99.0, 0.039, 0.181, 0.67
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-0513 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 3.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 = 2.95e-06$, temporary impact is $\eta = 3.77e-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(8.14e-05 * 0.09 / 3.77e-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, 3.6, 3.77e-05, 8.14e-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-0514 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 92.56$, paying a known discrete dividend $D = 2.86$ 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.77$ 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 = -2.2799, 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 = 92.56, 96.77, 2.86, 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, -2.2799, atol=1e-3) |
QCOT-MEAN_-0515 | 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.06) * q, dxi/dt = (xi^2 - 0.014*xi) / 1.06, 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.06, 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-0516 | 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 = 5.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 + 1.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 = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 5.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-0517 | 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.48$, $\sigma_1 = 0.198$, 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.11761*S^3*V + -0.03535*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.94, 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.48 * dW1 + np.sqrt(1 - -0.48**2) * dZ
dS = 0.1154 * S0 * dt + 0.198 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.124 * np.s... |
QCOT-PDE_A-0518 | 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.021$ and volatility $\sigma = 0.398$.
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.021*S*dV/dS + 0.5*0.15840*S^2*d2V/dS2 - 0.021*V = 0, V(S, 0.98) = max(S - 106.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, 106.9, 0.021, 0.398, 0.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-0519 | 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 = 4.25e-06$, temporary impact is $\eta = 4.60e-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.6e-05 * 0.09 / 4.6e-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.0, 4.6e-05, 2.6e-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 trajectory... |
QCOT-ARBIT-0520 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 99.21$, paying a known discrete dividend $D = 2.46$ 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 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.8187, 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 = 99.21, 106.84, 2.46, 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.8187, atol=1e-3) |
QCOT-MEAN_-0521 | 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) / 0.58) * q, dxi/dt = (xi^2 - 0.017*xi) / 0.58, 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.58, 0.017, 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-0522 | quantum_finance_and_ising_formulation | phd_level | 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 = 8.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.0000, 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 = 8.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-0523 | 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.3$, $\sigma_1 = 0.296$, and $\sigma_2 = 0.122... | 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.26285*S^3*V + 0.0325*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 = 90.4, 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.3 * dW1 + np.sqrt(1 - 0.3**2) * dZ
dS = 0.0832 * S0 * dt + 0.296 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.122 * np.sqrt(V0... |
QCOT-PDE_A-0524 | 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.069$ and volatility $\sigma = 0.203$.
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.069*S*dV/dS + 0.5*0.04121*S^2*d2V/dS2 - 0.069*V = 0, V(S, 1.76) = max(S - 100.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, 100.2, 0.069, 0.203, 1.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-0525 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 3.4$ 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.13e-06$, temporary impact is $\eta = 3.82e-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(7.46e-05 * 0.09 / 3.82e-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, 3.4, 3.82e-05, 7.46e-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-0526 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 92.12$, paying a known discrete dividend $D = 1.19$ 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.03$ 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 = 2.4665, Lower bound = 2.4665 | [
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.12, 93.03, 1.19, 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, 2.4665, atol=1e-3) |
QCOT-MEAN_-0527 | mean_field_games_and_liquidity | advanced | 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.045*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.045, 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-0528 | 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 = 6.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 + 1.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 = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 6.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-0529 | 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.49$, $\sigma_1 = 0.326$, 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.31883*S^3*V + -0.07476*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 = 171.76, 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.49 * dW1 + np.sqrt(1 - -0.49**2) * dZ
dS = 0.0993 * S0 * dt + 0.326 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.156 * np.s... |
QCOT-PDE_A-0530 | 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.068$ and volatility $\sigma = 0.201$.
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.068*S*dV/dS + 0.5*0.04040*S^2*d2V/dS2 - 0.068*V = 0, V(S, 1.6) = max(S - 102.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, 102.2, 0.068, 0.201, 1.6
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-0531 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 3.2$ 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.11e-06$, temporary impact is $\eta = 3.47e-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(3.82e-05 * 0.09 / 3.47e-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.2, 3.47e-05, 3.82e-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-0532 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 100.48$, paying a known discrete dividend $D = 2.68$ 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.96$ 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 = -3.8773, 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 = 100.48, 106.96, 2.68, 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, -3.8773, atol=1e-3) |
QCOT-MEAN_-0533 | 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.62) * q, dxi/dt = (xi^2 - 0.01*xi) / 1.62, 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.62, 0.01, 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-0534 | 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.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.2250, 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.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-0535 | 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.79$, $\sigma_1 = 0.211$, and $\sigma_2 = 0.27... | 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.13356*S^3*V + 0.13752*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 = 99.04, 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.0519 * S0 * dt + 0.211 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.275 * np.sqrt... |
QCOT-PDE_A-0536 | 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.043$ and volatility $\sigma = 0.311$.
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.09672*S^2*d2V/dS2 - 0.043*V = 0, V(S, 0.83) = max(S - 111.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, 111.2, 0.043, 0.311, 0.83
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-0537 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 1.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 = 2.02e-06$, temporary impact is $\eta = 2.12e-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.99e-05 * 0.09 / 2.12e-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.0, 2.12e-05, 6.99e-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-0538 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 102.39$, paying a known discrete dividend $D = 2.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 = 97.11$ 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.4900, Lower bound = 7.4900 | [
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 = 102.39, 97.11, 2.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, 7.49, atol=1e-3) |
QCOT-MEAN_-0539 | mean_field_games_and_liquidity | phd_level | 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.22) * q, dxi/dt = (xi^2 - 0.034*xi) / 1.22, 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.22, 0.034, 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-0540 | quantum_finance_and_ising_formulation | phd_level | 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 = 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 = 6
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-0541 | 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.02$, $\sigma_1 = 0.291$, 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.25404*S^3*V + -0.00194*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 = 65.62, 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.02 * dW1 + np.sqrt(1 - -0.02**2) * dZ
dS = 0.058 * S0 * dt + 0.291 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.111 * np.sqr... |
QCOT-PDE_A-0542 | 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.068$ and volatility $\sigma = 0.217$.
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.068*S*dV/dS + 0.5*0.04709*S^2*d2V/dS2 - 0.068*V = 0, V(S, 1.25) = max(S - 113.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, 113.0, 0.068, 0.217, 1.25
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-0543 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 500,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 = 8.30e-07$, temporary impact is $\eta = 3.51e-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(7.48e-05 * 0.09 / 3.51e-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.9, 3.51e-05, 7.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 trajector... |
QCOT-ARBIT-0544 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 94.20$, paying a known discrete dividend $D = 2.04$ 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.50$ 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.0955, 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 = 94.2, 106.5, 2.04, 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.0955, atol=1e-3) |
QCOT-MEAN_-0545 | 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) / 0.99) * q, dxi/dt = (xi^2 - 0.016*xi) / 0.99, 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.99, 0.016, 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-0546 | 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.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 + 0.9750, 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.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-0547 | 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.37$, $\sigma_1 = 0.31$, and $\sigma_2 = 0.253... | 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.2883*S^3*V + 0.08706*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 = 105.71, 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.37 * dW1 + np.sqrt(1 - 0.37**2) * dZ
dS = 0.045 * S0 * dt + 0.31 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.253 * np.sqrt(... |
QCOT-PDE_A-0548 | 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.059$ and volatility $\sigma = 0.255$.
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.059*S*dV/dS + 0.5*0.06502*S^2*d2V/dS2 - 0.059*V = 0, V(S, 1.68) = max(S - 105.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, 105.4, 0.059, 0.255, 1.68
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-0549 | optimal_execution_and_microstructure | expert | 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.46e-06$, temporary impact is $\eta = 4.96e-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(7.5e-05 * 0.09 / 4.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 = 1000000, 4.0, 4.96e-05, 7.5e-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-0550 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 109.01$, paying a known discrete dividend $D = 2.13$ 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.06$ 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.4600, Lower bound = 17.4600 | [
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.01, 94.06, 2.13, 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.46, atol=1e-3) |
QCOT-MEAN_-0551 | 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.54) * q, dxi/dt = (xi^2 - 0.023*xi) / 0.54, 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.54, 0.023, 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-0552 | 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 = 6.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.6750, 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.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-0553 | 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.71$, $\sigma_1 = 0.336$, 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.1129*S^2*V + -0.12262*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 = 137.97, 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.71 * dW1 + np.sqrt(1 - -0.71**2) * dZ
dS = 0.0958 * S0 * dt + 0.336 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.257 * np.s... |
QCOT-PDE_A-0554 | 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.046$ and volatility $\sigma = 0.368$.
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.13542*S^2*d2V/dS2 - 0.046*V = 0, V(S, 0.78) = max(S - 113.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, 113.7, 0.046, 0.368, 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-0555 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 100,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 = 2.23e-06$, temporary impact is $\eta = 4.69e-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(7.09e-05 * 0.09 / 4.69e-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, 3.5, 4.69e-05, 7.09e-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-0556 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 91.00$, paying a known discrete dividend $D = 2.82$ 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 = 108.08$ 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 = -14.5593, 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.0, 108.08, 2.82, 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, -14.5593, atol=1e-3) |
QCOT-MEAN_-0557 | mean_field_games_and_liquidity | phd_level | 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) / 0.59) * q, dxi/dt = (xi^2 - 0.01*xi) / 0.59, 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.59, 0.01, 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-0558 | quantum_finance_and_ising_formulation | phd_level | 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 = 6.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.7250, 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 = 6.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-0559 | 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.69$, $\sigma_1 = 0.281$, 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.23688*S^3*V + -0.16927*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 = 70.3, 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.69 * dW1 + np.sqrt(1 - -0.69**2) * dZ
dS = 0.1001 * S0 * dt + 0.281 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.291 * np.sqr... |
QCOT-PDE_A-0560 | 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.023$ and volatility $\sigma = 0.159$.
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.023*S*dV/dS + 0.5*0.02528*S^2*d2V/dS2 - 0.023*V = 0, V(S, 0.91) = max(S - 91.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, 91.0, 0.023, 0.159, 0.91
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-0561 | 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 = 1.32e-06$, temporary impact is $\eta = 1.43e-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(7.62e-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 = 500000, 2.8, 1.43e-05, 7.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-0562 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 105.53$, paying a known discrete dividend $D = 1.98$ 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.31$ 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.7421, Lower bound = 16.7421 | [
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.53, 91.31, 1.98, 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.7421, atol=1e-3) |
QCOT-MEAN_-0563 | mean_field_games_and_liquidity | advanced | 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.86) * q, dxi/dt = (xi^2 - 0.013*xi) / 1.86, 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.86, 0.013, 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-0564 | 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 = 4.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.2000, 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.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-0565 | 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.37$, $\sigma_1 = 0.167$, and $\sigma_2 = 0.14... | 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.02789*S^2*V + 0.01817*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 = 97.28, 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.37 * dW1 + np.sqrt(1 - 0.37**2) * dZ
dS = 0.1017 * S0 * dt + 0.167 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.147 * np.sqrt... |
QCOT-PDE_A-0566 | 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.078$ and volatility $\sigma = 0.29$.
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.078*S*dV/dS + 0.5*0.08410*S^2*d2V/dS2 - 0.078*V = 0, V(S, 0.58) = max(S - 117.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, 117.5, 0.078, 0.29, 0.58
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-0567 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 3.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 = 3.68e-06$, temporary impact is $\eta = 4.91e-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.64e-05 * 0.09 / 4.91e-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.6, 4.91e-05, 2.64e-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-0568 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 93.96$, paying a known discrete dividend $D = 1.93$ 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 = 101.31$ 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.2914, 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 = 93.96, 101.31, 1.93, 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.2914, atol=1e-3) |
QCOT-MEAN_-0569 | 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.95) * q, dxi/dt = (xi^2 - 0.048*xi) / 1.95, 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.95, 0.048, 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-0570 | 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 = 2.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 + 0.7250, 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 = 2.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-0571 | 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.1$, $\sigma_1 = 0.2$, and $\sigma_2 = 0.27$.
... | 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.04*S^2*V + 0.0108*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.69, 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.1 * dW1 + np.sqrt(1 - 0.1**2) * dZ
dS = 0.058 * S0 * dt + 0.2 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.27 * np.sqrt(V0) *... |
QCOT-PDE_A-0572 | 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.079$ and volatility $\sigma = 0.207$.
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.079*S*dV/dS + 0.5*0.04285*S^2*d2V/dS2 - 0.079*V = 0, V(S, 1.31) = max(S - 96.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, 96.2, 0.079, 0.207, 1.31
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-0573 | 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.57e-06$, temporary impact is $\eta = 2.76e-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(9.1e-06 * 0.09 / 2.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 = 1000000, 2.8, 2.76e-05, 9.1e-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 trajector... |
QCOT-ARBIT-0574 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 99.69$, paying a known discrete dividend $D = 2.89$ 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.32$ 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 = 8.1027, Lower bound = 8.1027 | [
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.69, 93.32, 2.89, 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, 8.1027, atol=1e-3) |
QCOT-MEAN_-0575 | mean_field_games_and_liquidity | phd_level | 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.19) * q, dxi/dt = (xi^2 - 0.037*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.037, 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-0576 | 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 = 7.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.8000, 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.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-0577 | 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.07$, $\sigma_1 = 0.253$, 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.19203*S^3*V + -0.01387*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 = 131.81, 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.07 * dW1 + np.sqrt(1 - -0.07**2) * dZ
dS = 0.045 * S0 * dt + 0.253 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.261 * np.sq... |
QCOT-PDE_A-0578 | 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.068$ and volatility $\sigma = 0.274$.
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.068*S*dV/dS + 0.5*0.07508*S^2*d2V/dS2 - 0.068*V = 0, V(S, 1.81) = max(S - 93.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, 93.6, 0.068, 0.274, 1.81
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-0579 | optimal_execution_and_microstructure | advanced | 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 = 1.72e-06$, temporary impact is $\eta = 3.81e-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.24e-05 * 0.09 / 3.81e-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, 3.81e-05, 5.24e-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-0580 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 107.56$, paying a known discrete dividend $D = 2.74$ 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.59$ 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 = 2.5449, Lower bound = 2.5449 | [
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.56, 107.59, 2.74, 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, 2.5449, atol=1e-3) |
QCOT-MEAN_-0581 | mean_field_games_and_liquidity | advanced | 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.34) * q, dxi/dt = (xi^2 - 0.048*xi) / 1.34, 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.34, 0.048, 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-0582 | 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 = 6.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 + 1.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 = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 6.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-0583 | 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.17$, $\sigma_1 = 0.219$, 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.04796*S^2*V + -0.01162*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 = 132.88, 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.17 * dW1 + np.sqrt(1 - -0.17**2) * dZ
dS = 0.0475 * S0 * dt + 0.219 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.156 * np.s... |
QCOT-PDE_A-0584 | 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.026$ and volatility $\sigma = 0.314$.
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.026*S*dV/dS + 0.5*0.09860*S^2*d2V/dS2 - 0.026*V = 0, V(S, 1.07) = max(S - 112.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, 112.9, 0.026, 0.314, 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-0585 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 1.4$ 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.26e-06$, temporary impact is $\eta = 1.06e-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.95e-05 * 0.09 / 1.06e-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, 1.4, 1.06e-05, 1.95e-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-0586 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 97.13$, paying a known discrete dividend $D = 1.55$ 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.15$ 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.4035, 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 = 97.13, 105.15, 1.55, 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.4035, atol=1e-3) |
QCOT-MEAN_-0587 | 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.79) * q, dxi/dt = (xi^2 - 0.036*xi) / 0.79, 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.79, 0.036, 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-0588 | 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 = 6.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 + 1.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 = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 6.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-0589 | 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.57$, $\sigma_1 = 0.309$, and $\sigma_2 = 0.16... | 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.05742*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 = 73.69, 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.57 * dW1 + np.sqrt(1 - 0.57**2) * dZ
dS = 0.0957 * S0 * dt + 0.309 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.163 * np.sqrt... |
QCOT-PDE_A-0590 | 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.074$ and volatility $\sigma = 0.192$.
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.074*S*dV/dS + 0.5*0.03686*S^2*d2V/dS2 - 0.074*V = 0, V(S, 1.4) = max(S - 100.3, 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, 100.3, 0.074, 0.192, 1.4
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-0591 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 1.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.00e-06$, temporary impact is $\eta = 4.48e-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.58e-05 * 0.09 / 4.48e-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, 1.6, 4.48e-05, 6.58e-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-0592 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 98.81$, paying a known discrete dividend $D = 1.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 = 102.31$ 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.3486, Lower bound = 0.3486 | [
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.81, 102.31, 1.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, 0.3486, atol=1e-3) |
QCOT-MEAN_-0593 | mean_field_games_and_liquidity | phd_level | 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.26) * q, dxi/dt = (xi^2 - 0.042*xi) / 1.26, 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.26, 0.042, 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-0594 | 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 = 5.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 + 1.3250, 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.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-0595 | 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.61$, $\sigma_1 = 0.277$, 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.07673*S^2*V + 0.04495*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 = 197.62, 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.61 * dW1 + np.sqrt(1 - 0.61**2) * dZ
dS = 0.0934 * S0 * dt + 0.277 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.133 * np.sqr... |
QCOT-PDE_A-0596 | 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.059$ and volatility $\sigma = 0.182$.
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.059*S*dV/dS + 0.5*0.03312*S^2*d2V/dS2 - 0.059*V = 0, V(S, 0.64) = max(S - 107.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, 107.5, 0.059, 0.182, 0.64
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-0597 | optimal_execution_and_microstructure | advanced | 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.13e-06$, temporary impact is $\eta = 1.13e-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(3.85e-05 * 0.09 / 1.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 = 100000, 4.9, 1.13e-05, 3.85e-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-0598 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 96.74$, 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 = 95.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 = 2.7187, Lower bound = 2.7187 | [
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 = 96.74, 95.93, 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, 2.7187, atol=1e-3) |
QCOT-MEAN_-0599 | 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.97) * q, dxi/dt = (xi^2 - 0.038*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.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-0600 | 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.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 = 8
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]) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.