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-MEAN_-0401 | 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) / 0.96) * q, dxi/dt = (xi^2 - 0.011*xi) / 0.96, 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.96, 0.011, 10.0
# Solve Riccati ODE backward in time
dt, steps = 0.001, 1000
xi = np.zeros(steps)
xi[-1] = beta
for t in range(steps - 2, -1, -1):
dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha
xi[t] = xi[t+1] + dxi * dt
print('Equilibrium Riccati terminal/initial xi:', xi[-1], x... |
QCOT-QUANT-0402 | 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 = 3.6$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 0.9000, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 3.6
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0403 | 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.09$, $\sigma_1 = 0.169$, 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.02856*S^2*V + -0.00715*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 = 151.01, 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.09 * dW1 + np.sqrt(1 - -0.09**2) * dZ
dS = 0.1176 * S0 * dt + 0.169 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.235 * np.s... |
QCOT-PDE_A-0404 | 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.214$.
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.078*S*dV/dS + 0.5*0.04580*S^2*d2V/dS2 - 0.078*V = 0, V(S, 1.97) = max(S - 106.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, 106.5, 0.078, 0.214, 1.97
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-0405 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 4.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 = 3.45e-06$, temporary impact is $\eta = 2.54e-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.22e-05 * 0.09 / 2.54e-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.5, 2.54e-05, 6.22e-05, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajecto... |
QCOT-ARBIT-0406 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 101.41$, 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 = 90.61$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 12.4297, Lower bound = 12.4297 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 101.41, 90.61, 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, 12.4297, atol=1e-3) |
QCOT-MEAN_-0407 | 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) / 1.4) * q, dxi/dt = (xi^2 - 0.047*xi) / 1.4, 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.4, 0.047, 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-0408 | quantum_finance_and_ising_formulation | expert | Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 7.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.8250, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 8
Sigma = np.eye(N) * 0.04 + 0.01
lam = 7.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-0409 | 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.8$, $\sigma_1 = 0.171$, and $\sigma_2 = 0.232... | 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.08772*S^3*V + 0.09521*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 = 109.08, 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.8 * dW1 + np.sqrt(1 - 0.8**2) * dZ
dS = 0.0921 * S0 * dt + 0.171 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.232 * np.sqrt(... |
QCOT-PDE_A-0410 | 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.039$ and volatility $\sigma = 0.367$.
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.13469*S^2*d2V/dS2 - 0.039*V = 0, V(S, 1.63) = max(S - 119.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, 119.7, 0.039, 0.367, 1.63
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-0411 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 2.6$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 2.88e-06$, temporary impact is $\eta = 3.72e-05$, and trader risk avers... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 100000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(8.8e-05 * 0.09 / 3.72e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 2.6, 3.72e-05, 8.8e-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-0412 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 96.54$, paying a known discrete dividend $D = 2.62$ 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 = 103.35$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = -4.3249, 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 = 96.54, 103.35, 2.62, 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.3249, atol=1e-3) |
QCOT-MEAN_-0413 | mean_field_games_and_liquidity | phd_level | Consider a continuum of $N = 100$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee... | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$.
The H... | v*(t, q) = (xi(t) / 0.98) * q, dxi/dt = (xi^2 - 0.045*xi) / 0.98, 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.98, 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-0414 | 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 = 8.5$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 2.1250, 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 = 8.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-0415 | 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.21$, $\sigma_1 = 0.151$, 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.0228*S^2*V + -0.01046*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 = 68.03, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = -0.21 * dW1 + np.sqrt(1 - -0.21**2) * dZ
dS = 0.0836 * S0 * dt + 0.151 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.165 * np.sq... |
QCOT-PDE_A-0416 | pde_and_martingale_pricing | advanced | Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.054$ and volatility $\sigma = 0.245$.
Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me... | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | dV/dt + 0.054*S*dV/dS + 0.5*0.06002*S^2*d2V/dS2 - 0.054*V = 0, V(S, 1.39) = max(S - 101.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, 101.9, 0.054, 0.245, 1.39
d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
d2 = d1 - sigma*np.sqrt(T)
call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2)
print('Analytical European Call price:', call_price) |
QCOT-OPTIM-0417 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 1.7$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 2.28e-06$, temporary impact is $\eta = 1.70e-06$, 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.91e-05 * 0.09 / 1.7e-06) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 1.7, 1.7e-06, 5.91e-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-0418 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 102.85$, paying a known discrete dividend $D = 2.00$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 105.19$ 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 = 0.8396, Lower bound = 0.8396 | [
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.85, 105.19, 2.0, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 0.8396, atol=1e-3) |
QCOT-MEAN_-0419 | 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.28) * q, dxi/dt = (xi^2 - 0.045*xi) / 1.28, xi(T) = beta | [
1,
1,
1,
1
] | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy... | 1 | euler_lagrange_sign_error | import numpy as np
alpha, c, beta = 1.28, 0.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-0420 | 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 = 9.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 + 2.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 = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 9.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-0421 | 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.41$, $\sigma_1 = 0.18$, and $\sigma_2 = 0.20... | 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.0972*S^3*V + -0.04539*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 = 172.06, 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.41 * dW1 + np.sqrt(1 - -0.41**2) * dZ
dS = 0.0487 * S0 * dt + 0.18 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.205 * np.sq... |
QCOT-PDE_A-0422 | 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.056$ and volatility $\sigma = 0.341$.
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.056*S*dV/dS + 0.5*0.11628*S^2*d2V/dS2 - 0.056*V = 0, V(S, 1.58) = max(S - 112.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, 112.5, 0.056, 0.341, 1.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-0423 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 4.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.65e-06$, temporary impact is $\eta = 4.13e-05$, and trader risk ave... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(4.37e-05 * 0.09 / 4.13e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 1000000, 4.6, 4.13e-05, 4.37e-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-0424 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 91.43$, paying a known discrete dividend $D = 2.31$ 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 = 109.09$ 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.5926, 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.43, 109.09, 2.31, 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.5926, atol=1e-3) |
QCOT-MEAN_-0425 | 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.9) * q, dxi/dt = (xi^2 - 0.012*xi) / 1.9, 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.9, 0.012, 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-0426 | quantum_finance_and_ising_formulation | expert | Consider a portfolio selection problem across $N = 6$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{6}$, covariance matrix $\Sigma \in \mathbb{R}^{6 \times 6}$, and budget constraint $\sum_{i=1}^{6} x_i = B$ with penalty weight $\lambda_B = 3.6$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 0.9000, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 3.6
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0427 | 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.69$, $\sigma_1 = 0.255$, and $\sigma_2 = 0.23... | Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives:
$\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr... | df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.19508*S^3*V + 0.12352*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 = 74.95, 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.0894 * S0 * dt + 0.255 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.234 * np.sqrt... |
QCOT-PDE_A-0428 | 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.052$ and volatility $\sigma = 0.228$.
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.052*S*dV/dS + 0.5*0.05198*S^2*d2V/dS2 - 0.052*V = 0, V(S, 1.57) = max(S - 104.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, 104.4, 0.052, 0.228, 1.57
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-0429 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 1.5$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 4.89e-06$, temporary impact is $\eta = 4.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(5.27e-05 * 0.09 / 4.13e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 1.5, 4.13e-05, 5.27e-05, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajector... |
QCOT-ARBIT-0430 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 107.19$, paying a known discrete dividend $D = 1.37$ 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.00$ 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 = 5.0235, Lower bound = 5.0235 | [
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.19, 106.0, 1.37, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 5.0235, atol=1e-3) |
QCOT-MEAN_-0431 | mean_field_games_and_liquidity | phd_level | Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee... | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$.
The H... | v*(t, q) = (xi(t) / 1.35) * q, dxi/dt = (xi^2 - 0.014*xi) / 1.35, 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.35, 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-0432 | 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 = 9.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 + 2.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 = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 9.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-0433 | 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.04$, $\sigma_1 = 0.313$, 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.09797*S^2*V + 0.00438*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 = 113.68, 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.04 * dW1 + np.sqrt(1 - 0.04**2) * dZ
dS = 0.047 * S0 * dt + 0.313 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.175 * np.sqrt... |
QCOT-PDE_A-0434 | 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.077$ and volatility $\sigma = 0.3$.
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-Mert... | 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.077*S*dV/dS + 0.5*0.09000*S^2*d2V/dS2 - 0.077*V = 0, V(S, 1.83) = max(S - 112.8, 0) | [
1,
1,
1,
1
] | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | 3 | drift_arbitrage_violation | import numpy as np
from scipy.stats import norm
S, K, r, sigma, T = 100.0, 112.8, 0.077, 0.3, 1.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-0435 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 2.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 = 3.99e-06$, temporary impact is $\eta = 3.27e-05$, and trader risk avers... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 100000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(1.83e-05 * 0.09 / 3.27e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 2.4, 3.27e-05, 1.83e-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-0436 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 108.12$, paying a known discrete dividend $D = 2.11$ 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.40$ 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 = 5.8025, Lower bound = 5.8025 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 108.12, 105.4, 2.11, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 5.8025, atol=1e-3) |
QCOT-MEAN_-0437 | 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) / 0.91) * q, dxi/dt = (xi^2 - 0.041*xi) / 0.91, 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.91, 0.041, 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-0438 | 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 = 8.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 + 2.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 = 8
Sigma = np.eye(N) * 0.04 + 0.01
lam = 8.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-0439 | 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.12$, $\sigma_1 = 0.303$, 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.09181*S^2*V + -0.00945*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2 | [
1,
1,
1,
1
] | Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives:
$\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr... | 2 | ito_cross_variation_omission | import numpy as np
# Verification via Monte Carlo Euler-Maruyama
S0, V0, dt, N = 150.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.12 * dW1 + np.sqrt(1 - -0.12**2) * dZ
dS = 0.1048 * S0 * dt + 0.303 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.13 * np.sq... |
QCOT-PDE_A-0440 | 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.03$ and volatility $\sigma = 0.334$.
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.03*S*dV/dS + 0.5*0.11156*S^2*d2V/dS2 - 0.03*V = 0, V(S, 0.83) = max(S - 114.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, 114.5, 0.03, 0.334, 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-0441 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 100,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 = 9.70e-07$, temporary impact is $\eta = 1.63e-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(2.38e-05 * 0.09 / 1.63e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 1.8, 1.63e-05, 2.38e-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-0442 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 102.76$, paying a known discrete dividend $D = 2.26$ 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.14$ 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 = 10.0558, Lower bound = 10.0558 | [
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.76, 95.14, 2.26, 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, 10.0558, atol=1e-3) |
QCOT-MEAN_-0443 | 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.98) * q, dxi/dt = (xi^2 - 0.03*xi) / 1.98, 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.98, 0.03, 10.0
# Solve Riccati ODE backward in time
dt, steps = 0.001, 1000
xi = np.zeros(steps)
xi[-1] = beta
for t in range(steps - 2, -1, -1):
dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha
xi[t] = xi[t+1] + dxi * dt
print('Equilibrium Riccati terminal/initial xi:', xi[-1], xi... |
QCOT-QUANT-0444 | quantum_finance_and_ising_formulation | expert | Consider a portfolio selection problem across $N = 8$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{8}$, covariance matrix $\Sigma \in \mathbb{R}^{8 \times 8}$, and budget constraint $\sum_{i=1}^{8} x_i = B$ with penalty weight $\lambda_B = 6.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.7000, 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 = 6.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-0445 | 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.77$, $\sigma_1 = 0.239$, 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.17136*S^3*V + -0.13526*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 = 151.38, 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.77 * dW1 + np.sqrt(1 - -0.77**2) * dZ
dS = 0.0754 * S0 * dt + 0.239 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.245 * np.s... |
QCOT-PDE_A-0446 | 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.028$ and volatility $\sigma = 0.176$.
Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me... | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | dV/dt + 0.028*S*dV/dS + 0.5*0.03098*S^2*d2V/dS2 - 0.028*V = 0, V(S, 1.37) = max(S - 109.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, 109.0, 0.028, 0.176, 1.37
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-0447 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 1,000,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 = 3.89e-06$, temporary impact is $\eta = 1.40e-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.49e-05 * 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 = 1000000, 3.4, 1.4e-05, 6.49e-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-0448 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 98.02$, paying a known discrete dividend $D = 1.69$ 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.34$ maturing at $T = 1.0$. Establish the analytical bounds on European call ... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 3.7790, Lower bound = 3.7790 | [
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.02, 97.34, 1.69, 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.779, atol=1e-3) |
QCOT-MEAN_-0449 | mean_field_games_and_liquidity | phd_level | Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee... | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$.
The H... | v*(t, q) = (xi(t) / 1.28) * q, dxi/dt = (xi^2 - 0.013*xi) / 1.28, xi(T) = beta | [
1,
1,
1,
1
] | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy... | 1 | euler_lagrange_sign_error | import numpy as np
alpha, c, beta = 1.28, 0.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-0450 | 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.4$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 1.8500, 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.4
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0451 | 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.29$, $\sigma_1 = 0.204$, and $\sigma_2 = 0.21... | 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.12485*S^3*V + 0.03887*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 = 60.49, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = 0.29 * dW1 + np.sqrt(1 - 0.29**2) * dZ
dS = 0.0912 * S0 * dt + 0.204 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.219 * np.sqrt... |
QCOT-PDE_A-0452 | 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.039$ and volatility $\sigma = 0.233$.
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.05429*S^2*d2V/dS2 - 0.039*V = 0, V(S, 1.99) = max(S - 106.8, 0) | [
1,
1,
1,
1
] | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | 3 | drift_arbitrage_violation | import numpy as np
from scipy.stats import norm
S, K, r, sigma, T = 100.0, 106.8, 0.039, 0.233, 1.99
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-0453 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 2.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 = 1.88e-06$, temporary impact is $\eta = 4.98e-05$, and trader risk avers... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(4.52e-05 * 0.09 / 4.98e-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.3, 4.98e-05, 4.52e-05, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajector... |
QCOT-ARBIT-0454 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 101.61$, paying a known discrete dividend $D = 2.92$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 91.78$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 11.4583, Lower bound = 11.4583 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 101.61, 91.78, 2.92, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 11.4583, atol=1e-3) |
QCOT-MEAN_-0455 | 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.8) * q, dxi/dt = (xi^2 - 0.038*xi) / 0.8, 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.8, 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], xi... |
QCOT-QUANT-0456 | 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 = 2.8$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 0.7000, 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 = 2.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-0457 | 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.47$, $\sigma_1 = 0.22$, and $\sigma_2 = 0.233... | 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.1452*S^3*V + 0.07228*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 = 117.56, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = 0.47 * dW1 + np.sqrt(1 - 0.47**2) * dZ
dS = 0.1005 * S0 * dt + 0.22 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.233 * np.sqrt... |
QCOT-PDE_A-0458 | 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.043$ and volatility $\sigma = 0.18$.
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.043*S*dV/dS + 0.5*0.03240*S^2*d2V/dS2 - 0.043*V = 0, V(S, 0.53) = max(S - 119.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, 119.0, 0.043, 0.18, 0.53
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-0459 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 100,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 = 4.23e-06$, temporary impact is $\eta = 2.65e-05$, and trader risk avers... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 100000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(6.27e-05 * 0.09 / 2.65e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 1.4, 2.65e-05, 6.27e-05, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajector... |
QCOT-ARBIT-0460 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 105.11$, paying a known discrete dividend $D = 2.65$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 92.55$ 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.4891, Lower bound = 14.4891 | [
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.11, 92.55, 2.65, 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.4891, atol=1e-3) |
QCOT-MEAN_-0461 | 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.59) * q, dxi/dt = (xi^2 - 0.016*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.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-0462 | 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 = 3.8$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 0.9500, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 4
Sigma = np.eye(N) * 0.04 + 0.01
lam = 3.8
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0463 | 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.02$, $\sigma_1 = 0.219$, 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.04796*S^2*V + 0.0013*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 = 101.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.02 * dW1 + np.sqrt(1 - 0.02**2) * dZ
dS = 0.0705 * S0 * dt + 0.219 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.148 * np.sqr... |
QCOT-PDE_A-0464 | 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.044$ and volatility $\sigma = 0.262$.
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.044*S*dV/dS + 0.5*0.06864*S^2*d2V/dS2 - 0.044*V = 0, V(S, 1.27) = max(S - 104.0, 0) | [
1,
1,
1,
1
] | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | 3 | drift_arbitrage_violation | import numpy as np
from scipy.stats import norm
S, K, r, sigma, T = 100.0, 104.0, 0.044, 0.262, 1.27
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-0465 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 2.6$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.95e-06$, temporary impact is $\eta = 2.92e-05$, and trader risk ave... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(5.71e-05 * 0.09 / 2.92e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 1000000, 2.6, 2.92e-05, 5.71e-05, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajecto... |
QCOT-ARBIT-0466 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 100.02$, paying a known discrete dividend $D = 2.08$ 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.94$ 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.8280, Lower bound = 4.8280 | [
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.02, 97.94, 2.08, 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.828, atol=1e-3) |
QCOT-MEAN_-0467 | 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.82) * q, dxi/dt = (xi^2 - 0.025*xi) / 1.82, 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.82, 0.025, 10.0
# Solve Riccati ODE backward in time
dt, steps = 0.001, 1000
xi = np.zeros(steps)
xi[-1] = beta
for t in range(steps - 2, -1, -1):
dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha
xi[t] = xi[t+1] + dxi * dt
print('Equilibrium Riccati terminal/initial xi:', xi[-1], x... |
QCOT-QUANT-0468 | 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-0469 | 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.76$, $\sigma_1 = 0.314$, 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.0986*S^2*V + -0.07875*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 = 71.19, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = -0.76 * dW1 + np.sqrt(1 - -0.76**2) * dZ
dS = 0.057 * S0 * dt + 0.314 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.165 * np.sqr... |
QCOT-PDE_A-0470 | 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.062$ and volatility $\sigma = 0.237$.
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.062*S*dV/dS + 0.5*0.05617*S^2*d2V/dS2 - 0.062*V = 0, V(S, 1.46) = max(S - 119.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, 119.0, 0.062, 0.237, 1.46
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-0471 | 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.92e-06$, temporary impact is $\eta = 2.45e-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.21e-05 * 0.09 / 2.45e-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, 2.45e-05, 3.21e-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-0472 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 92.78$, paying a known discrete dividend $D = 2.66$ 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.97$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = -12.5185, 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.78, 107.97, 2.66, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, -12.5185, atol=1e-3) |
QCOT-MEAN_-0473 | 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.74) * q, dxi/dt = (xi^2 - 0.048*xi) / 1.74, 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.74, 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-0474 | 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.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-0475 | 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.08$, $\sigma_1 = 0.177$, and $\sigma_2 = 0.29... | Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives:
$\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr... | df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.09399*S^3*V + 0.01245*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 = 60.23, 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.08 * dW1 + np.sqrt(1 - 0.08**2) * dZ
dS = 0.0421 * S0 * dt + 0.177 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.293 * np.sqrt... |
QCOT-PDE_A-0476 | 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.027$ and volatility $\sigma = 0.299$.
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.027*S*dV/dS + 0.5*0.08940*S^2*d2V/dS2 - 0.027*V = 0, V(S, 1.81) = 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.027, 0.299, 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-0477 | optimal_execution_and_microstructure | expert | 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 = 6.20e-07$, temporary impact is $\eta = 3.24e-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(2.24e-05 * 0.09 / 3.24e-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, 3.24e-05, 2.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-0478 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 103.00$, paying a known discrete dividend $D = 1.12$ 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.04$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 13.4053, Lower bound = 13.4053 | [
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 = 103.0, 93.04, 1.12, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 13.4053, atol=1e-3) |
QCOT-MEAN_-0479 | 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.82) * q, dxi/dt = (xi^2 - 0.018*xi) / 0.82, 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.82, 0.018, 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-0480 | 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 = 10.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.5000, 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 = 10.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-0481 | 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.347$, 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.12041*S^2*V + -0.05855*S^2*sqrt(V)]dt + 2*sigma1*S^2*V*dW1 + sigma2*S^2*sqrt(V)*dW2 | [
1,
1,
1,
1
] | Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives:
$\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr... | 2 | ito_cross_variation_omission | import numpy as np
# Verification via Monte Carlo Euler-Maruyama
S0, V0, dt, N = 58.67, 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.0956 * S0 * dt + 0.347 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.148 * np.sq... |
QCOT-PDE_A-0482 | 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.067$ and volatility $\sigma = 0.216$.
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.04666*S^2*d2V/dS2 - 0.067*V = 0, V(S, 1.54) = max(S - 87.1, 0) | [
1,
1,
1,
1
] | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | 3 | drift_arbitrage_violation | import numpy as np
from scipy.stats import norm
S, K, r, sigma, T = 100.0, 87.1, 0.067, 0.216, 1.54
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-0483 | 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.60e-06$, temporary impact is $\eta = 4.98e-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.16e-05 * 0.09 / 4.98e-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.98e-05, 8.16e-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-0484 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 96.13$, paying a known discrete dividend $D = 2.05$ 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.48$ 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 = -3.3514, 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 = 96.13, 102.48, 2.05, 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.3514, atol=1e-3) |
QCOT-MEAN_-0485 | mean_field_games_and_liquidity | phd_level | Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee... | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$.
The H... | v*(t, q) = (xi(t) / 1.69) * q, dxi/dt = (xi^2 - 0.039*xi) / 1.69, 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.69, 0.039, 10.0
# Solve Riccati ODE backward in time
dt, steps = 0.001, 1000
xi = np.zeros(steps)
xi[-1] = beta
for t in range(steps - 2, -1, -1):
dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha
xi[t] = xi[t+1] + dxi * dt
print('Equilibrium Riccati terminal/initial xi:', xi[-1], x... |
QCOT-QUANT-0486 | 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 = 5.6$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 1.4000, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 8
Sigma = np.eye(N) * 0.04 + 0.01
lam = 5.6
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0487 | 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.37$, $\sigma_1 = 0.233$, and $\sigma_2 = 0.26... | 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.16287*S^3*V + 0.0688*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 = 79.19, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = 0.37 * dW1 + np.sqrt(1 - 0.37**2) * dZ
dS = 0.0694 * S0 * dt + 0.233 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.266 * np.sqrt... |
QCOT-PDE_A-0488 | 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.078$ and volatility $\sigma = 0.212$.
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.078*S*dV/dS + 0.5*0.04494*S^2*d2V/dS2 - 0.078*V = 0, V(S, 1.13) = max(S - 85.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, 85.4, 0.078, 0.212, 1.13
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-0489 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 3.1$ 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.37e-06$, temporary impact is $\eta = 3.83e-05$, and trader risk avers... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(1.46e-05 * 0.09 / 3.83e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 500000, 3.1, 3.83e-05, 1.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-0490 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 94.30$, paying a known discrete dividend $D = 1.48$ 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 = 90.24$ 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.0176, Lower bound = 7.0176 | [
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.3, 90.24, 1.48, 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.0176, atol=1e-3) |
QCOT-MEAN_-0491 | 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.6) * q, dxi/dt = (xi^2 - 0.018*xi) / 0.6, 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.6, 0.018, 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-0492 | 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 = 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-0493 | 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.02$, $\sigma_1 = 0.319$, 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.30528*S^3*V + -0.0023*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 = 132.19, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = -0.02 * dW1 + np.sqrt(1 - -0.02**2) * dZ
dS = 0.0764 * S0 * dt + 0.319 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.12 * np.sq... |
QCOT-PDE_A-0494 | 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.072$ and volatility $\sigma = 0.211$.
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.072*S*dV/dS + 0.5*0.04452*S^2*d2V/dS2 - 0.072*V = 0, V(S, 1.72) = max(S - 106.1, 0) | [
1,
1,
1,
1
] | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | 3 | drift_arbitrage_violation | import numpy as np
from scipy.stats import norm
S, K, r, sigma, T = 100.0, 106.1, 0.072, 0.211, 1.72
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-0495 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 4.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.03e-06$, temporary impact is $\eta = 2.35e-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.87e-05 * 0.09 / 2.35e-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.6, 2.35e-05, 7.87e-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-0496 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 109.11$, paying a known discrete dividend $D = 1.63$ 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.74$ 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 = 6.9372, Lower bound = 6.9372 | [
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.11, 105.74, 1.63, 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, 6.9372, atol=1e-3) |
QCOT-MEAN_-0497 | 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) / 0.61) * q, dxi/dt = (xi^2 - 0.042*xi) / 0.61, 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.61, 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-0498 | 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 = 8.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.1750, 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 = 8.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-0499 | 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.25$, $\sigma_1 = 0.242$, and $\sigma_2 = 0.22... | Step 1: Define the bivariate transformation function $f(S, V) = S^2 V$. Compute all relevant first- and second-order partial derivatives:
$\frac{\partial f}{\partial S} = 2 S^{1} V$, $\frac{\partial f}{\partial V} = S^2$, $\frac{\partial^2 f}{\partial S^2} = 2 S^{0} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr... | df = [2*mu*S^2*V + S^2*kappa*(theta-V) + 0.05856*S^2*V + 0.02747*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 = 55.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.25 * dW1 + np.sqrt(1 - 0.25**2) * dZ
dS = 0.1121 * S0 * dt + 0.242 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.227 * np.sqrt... |
QCOT-PDE_A-0500 | 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.047$ 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.047*S*dV/dS + 0.5*0.04285*S^2*d2V/dS2 - 0.047*V = 0, V(S, 1.18) = max(S - 115.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, 115.6, 0.047, 0.207, 1.18
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) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.