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-STOCH-0301 | 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.6$, $\sigma_1 = 0.172$, 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.02958*S^2*V + -0.03674*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 = 186.55, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = -0.6 * dW1 + np.sqrt(1 - -0.6**2) * dZ
dS = 0.0436 * S0 * dt + 0.172 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.178 * np.sqr... |
QCOT-PDE_A-0302 | 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.077$ and volatility $\sigma = 0.347$.
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.077*S*dV/dS + 0.5*0.12041*S^2*d2V/dS2 - 0.077*V = 0, V(S, 1.13) = max(S - 83.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, 83.6, 0.077, 0.347, 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-0303 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 1,000,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 = 4.73e-06$, temporary impact is $\eta = 2.39e-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.17e-05 * 0.09 / 2.39e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 1000000, 1.7, 2.39e-05, 6.17e-05, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajecto... |
QCOT-ARBIT-0304 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 109.82$, paying a known discrete dividend $D = 2.89$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 94.63$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 16.9866, Lower bound = 16.9866 | [
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.82, 94.63, 2.89, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 16.9866, atol=1e-3) |
QCOT-MEAN_-0305 | 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.75) * q, dxi/dt = (xi^2 - 0.019*xi) / 1.75, xi(T) = beta | [
1,
1,
1,
1
] | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy... | 1 | euler_lagrange_sign_error | import numpy as np
alpha, c, beta = 1.75, 0.019, 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-0306 | 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 = 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 = 6
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-0307 | 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.24$, $\sigma_1 = 0.187$, 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.03497*S^2*V + -0.02298*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 = 76.48, 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.24 * dW1 + np.sqrt(1 - -0.24**2) * dZ
dS = 0.0576 * S0 * dt + 0.187 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.256 * np.sq... |
QCOT-PDE_A-0308 | 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.058$ and volatility $\sigma = 0.204$.
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.058*S*dV/dS + 0.5*0.04162*S^2*d2V/dS2 - 0.058*V = 0, V(S, 1.4) = max(S - 100.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, 100.7, 0.058, 0.204, 1.4
d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
d2 = d1 - sigma*np.sqrt(T)
call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2)
print('Analytical European Call price:', call_price) |
QCOT-OPTIM-0309 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 3.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.50e-07$, temporary impact is $\eta = 2.04e-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.61e-05 * 0.09 / 2.04e-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.8, 2.04e-05, 7.61e-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-0310 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 93.08$, paying a known discrete dividend $D = 1.45$ 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.32$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = -9.4689, Lower bound = 0.0000 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 93.08, 106.32, 1.45, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, -9.4689, atol=1e-3) |
QCOT-MEAN_-0311 | 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.39) * q, dxi/dt = (xi^2 - 0.031*xi) / 1.39, 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.39, 0.031, 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-0312 | 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 = 8.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 + 2.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 = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 8.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-0313 | stochastic_calculus | expert | Let $S_t$ and $V_t$ be coupled stochastic processes governed by the Itô system:
$$dS_t = \mu S_t dt + \sigma_1 S_t dW_{1,t}$$
$$dV_t = \kappa(\theta - V_t) dt + \sigma_2 \sqrt{V_t} dW_{2,t}$$
with Brownian correlation $d\langle W_1, W_2 \rangle_t = \rho dt$, where $\rho = -0.73$, $\sigma_1 = 0.205$, 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.12608*S^3*V + -0.08755*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 = 118.61, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = -0.73 * dW1 + np.sqrt(1 - -0.73**2) * dZ
dS = 0.0713 * S0 * dt + 0.205 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.195 * np.s... |
QCOT-PDE_A-0314 | 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.352$.
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.12390*S^2*d2V/dS2 - 0.072*V = 0, V(S, 1.33) = max(S - 106.2, 0) | [
1,
1,
1,
1
] | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | 3 | drift_arbitrage_violation | import numpy as np
from scipy.stats import norm
S, K, r, sigma, T = 100.0, 106.2, 0.072, 0.352, 1.33
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-0315 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 3.8$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 1.48e-06$, temporary impact is $\eta = 1.34e-05$, and trader risk ave... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(1.5e-06 * 0.09 / 1.34e-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.8, 1.34e-05, 1.5e-06, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajector... |
QCOT-ARBIT-0316 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 90.98$, 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 = 100.65$ 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.6091, Lower bound = 0.0000 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 90.98, 100.65, 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, -7.6091, atol=1e-3) |
QCOT-MEAN_-0317 | 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.99) * q, dxi/dt = (xi^2 - 0.046*xi) / 1.99, xi(T) = beta | [
1,
1,
1,
1
] | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy... | 1 | euler_lagrange_sign_error | import numpy as np
alpha, c, beta = 1.99, 0.046, 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-0318 | quantum_finance_and_ising_formulation | expert | Consider a portfolio selection problem across $N = 6$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{6}$, covariance matrix $\Sigma \in \mathbb{R}^{6 \times 6}$, and budget constraint $\sum_{i=1}^{6} x_i = B$ with penalty weight $\lambda_B = 6.0$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 1.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 = 6.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-0319 | 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.28$, $\sigma_1 = 0.315$, 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.09922*S^2*V + 0.02999*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 = 122.09, 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.28 * dW1 + np.sqrt(1 - 0.28**2) * dZ
dS = 0.0874 * S0 * dt + 0.315 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.17 * np.sqrt... |
QCOT-PDE_A-0320 | 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.072$ and volatility $\sigma = 0.333$.
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.11089*S^2*d2V/dS2 - 0.072*V = 0, V(S, 1.8) = max(S - 100.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, 100.9, 0.072, 0.333, 1.8
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-0321 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 2.0$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 8.70e-07$, temporary impact is $\eta = 8.90e-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(3.41e-05 * 0.09 / 8.9e-06) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 2.0, 8.9e-06, 3.41e-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-0322 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 108.60$, paying a known discrete dividend $D = 2.40$ 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.12$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 18.6320, Lower bound = 18.6320 | [
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.6, 92.12, 2.4, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 18.632, atol=1e-3) |
QCOT-MEAN_-0323 | 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.94) * q, dxi/dt = (xi^2 - 0.045*xi) / 1.94, 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.94, 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-0324 | 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 = 2.2$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 0.5500, 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.2
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0325 | 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.54$, $\sigma_1 = 0.217$, 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.14127*S^3*V + -0.08753*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 = 173.87, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = -0.54 * dW1 + np.sqrt(1 - -0.54**2) * dZ
dS = 0.0503 * S0 * dt + 0.217 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.249 * np.s... |
QCOT-PDE_A-0326 | pde_and_martingale_pricing | advanced | Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.053$ and volatility $\sigma = 0.339$.
Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me... | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | dV/dt + 0.053*S*dV/dS + 0.5*0.11492*S^2*d2V/dS2 - 0.053*V = 0, V(S, 0.79) = max(S - 90.3, 0) | [
1,
1,
1,
1
] | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | 3 | drift_arbitrage_violation | import numpy as np
from scipy.stats import norm
S, K, r, sigma, T = 100.0, 90.3, 0.053, 0.339, 0.79
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-0327 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 2.0$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.12e-06$, temporary impact is $\eta = 4.91e-05$, and trader risk avers... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 100000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(6.35e-05 * 0.09 / 4.91e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 2.0, 4.91e-05, 6.35e-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-0328 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 102.68$, paying a known discrete dividend $D = 2.56$ 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 = 100.80$ maturing at $T = 1.0$. Establish the analytical bounds on European cal... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 4.2993, Lower bound = 4.2993 | [
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.68, 100.8, 2.56, 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.2993, atol=1e-3) |
QCOT-MEAN_-0329 | mean_field_games_and_liquidity | advanced | Consider a continuum of $N = 100$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee... | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$.
The H... | v*(t, q) = (xi(t) / 0.53) * q, dxi/dt = (xi^2 - 0.021*xi) / 0.53, xi(T) = beta | [
1,
1,
1,
1
] | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2 (Error): Solve the first-order condition with a sign error: $p - \alpha v = 0 \implies v^* = +\frac{p}{\alpha}$, causing agents to buy... | 1 | euler_lagrange_sign_error | import numpy as np
alpha, c, beta = 0.53, 0.021, 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-0330 | 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 = 9.7$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 2.4250, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 4
Sigma = np.eye(N) * 0.04 + 0.01
lam = 9.7
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0331 | 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.7$, $\sigma_1 = 0.336$, and $\sigma_2 = 0.121... | 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.33869*S^3*V + 0.08538*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 = 101.28, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = 0.7 * dW1 + np.sqrt(1 - 0.7**2) * dZ
dS = 0.0906 * S0 * dt + 0.336 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.121 * np.sqrt(... |
QCOT-PDE_A-0332 | pde_and_martingale_pricing | expert | Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.066$ and volatility $\sigma = 0.387$.
Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me... | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | dV/dt + 0.066*S*dV/dS + 0.5*0.14977*S^2*d2V/dS2 - 0.066*V = 0, V(S, 1.66) = max(S - 86.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, 86.7, 0.066, 0.387, 1.66
d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
d2 = d1 - sigma*np.sqrt(T)
call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2)
print('Analytical European Call price:', call_price) |
QCOT-OPTIM-0333 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 1.2$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 2.95e-06$, temporary impact is $\eta = 1.79e-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.25e-05 * 0.09 / 1.79e-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.2, 1.79e-05, 6.25e-05, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajector... |
QCOT-ARBIT-0334 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 107.43$, paying a known discrete dividend $D = 2.94$ 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.47$ 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.4315, Lower bound = 0.4315 | [
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.43, 109.47, 2.94, 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.4315, atol=1e-3) |
QCOT-MEAN_-0335 | 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.64) * q, dxi/dt = (xi^2 - 0.015*xi) / 1.64, 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.64, 0.015, 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-0336 | 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 = 2.5$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 0.6250, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 8
Sigma = np.eye(N) * 0.04 + 0.01
lam = 2.5
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0337 | 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.314$, and $\sigma_2 = 0.15... | 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.29579*S^3*V + -0.11379*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 = 173.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.8 * dW1 + np.sqrt(1 - -0.8**2) * dZ
dS = 0.0697 * S0 * dt + 0.314 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.151 * np.sqr... |
QCOT-PDE_A-0338 | 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.036$ and volatility $\sigma = 0.399$.
Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me... | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | dV/dt + 0.036*S*dV/dS + 0.5*0.15920*S^2*d2V/dS2 - 0.036*V = 0, V(S, 1.18) = max(S - 97.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, 97.0, 0.036, 0.399, 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) |
QCOT-OPTIM-0339 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 4.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.68e-06$, temporary impact is $\eta = 4.15e-05$, and trader risk ave... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 1000000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(3.05e-05 * 0.09 / 4.15e-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.4, 4.15e-05, 3.05e-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-0340 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 105.46$, paying a known discrete dividend $D = 1.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 = 94.60$ 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.2448, Lower bound = 14.2448 | [
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.46, 94.6, 1.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, 14.2448, atol=1e-3) |
QCOT-MEAN_-0341 | mean_field_games_and_liquidity | phd_level | Consider a continuum of $N = 200$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee... | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$.
The H... | v*(t, q) = (xi(t) / 0.73) * q, dxi/dt = (xi^2 - 0.048*xi) / 0.73, 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.73, 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-0342 | quantum_finance_and_ising_formulation | phd_level | Consider a portfolio selection problem across $N = 4$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{4}$, covariance matrix $\Sigma \in \mathbb{R}^{4 \times 4}$, and budget constraint $\sum_{i=1}^{4} x_i = B$ with penalty weight $\lambda_B = 9.5$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 2.3750, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 4
Sigma = np.eye(N) * 0.04 + 0.01
lam = 9.5
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0343 | 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.77$, $\sigma_1 = 0.23$, and $\sigma_2 = 0.155... | 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.0529*S^2*V + 0.0549*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 = 112.96, 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.0911 * S0 * dt + 0.23 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.155 * np.sqrt... |
QCOT-PDE_A-0344 | 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.331$.
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.10956*S^2*d2V/dS2 - 0.039*V = 0, V(S, 0.8) = max(S - 109.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, 109.8, 0.039, 0.331, 0.8
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-0345 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 2.9$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.29e-06$, temporary impact is $\eta = 1.91e-05$, and trader risk avers... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 100000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(8.66e-05 * 0.09 / 1.91e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 2.9, 1.91e-05, 8.66e-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-0346 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 109.36$, paying a known discrete dividend $D = 2.74$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 93.71$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 17.5480, Lower bound = 17.5480 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 109.36, 93.71, 2.74, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 17.548, atol=1e-3) |
QCOT-MEAN_-0347 | 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.18) * q, dxi/dt = (xi^2 - 0.016*xi) / 1.18, 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.18, 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-0348 | 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 = 8.1$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 2.0250, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 8.1
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0349 | 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.19$, $\sigma_1 = 0.157$, and $\sigma_2 = 0.28... | 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.07395*S^3*V + 0.02542*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 = 143.93, 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.19 * dW1 + np.sqrt(1 - 0.19**2) * dZ
dS = 0.0505 * S0 * dt + 0.157 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.284 * np.sqr... |
QCOT-PDE_A-0350 | 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.048$ and volatility $\sigma = 0.15$.
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.048*S*dV/dS + 0.5*0.02250*S^2*d2V/dS2 - 0.048*V = 0, V(S, 1.41) = max(S - 103.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, 103.9, 0.048, 0.15, 1.41
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-0351 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 3.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.08e-06$, temporary impact is $\eta = 2.51e-05$, and trader risk avers... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 100000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(7.4e-06 * 0.09 / 2.51e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 3.3, 2.51e-05, 7.4e-06, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajectory... |
QCOT-ARBIT-0352 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 95.38$, paying a known discrete dividend $D = 1.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 = 105.95$ 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 = -6.9828, Lower bound = 0.0000 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 95.38, 105.95, 1.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, -6.9828, atol=1e-3) |
QCOT-MEAN_-0353 | 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.2) * q, dxi/dt = (xi^2 - 0.016*xi) / 1.2, 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.2, 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], xi... |
QCOT-QUANT-0354 | quantum_finance_and_ising_formulation | expert | Consider a portfolio selection problem across $N = 6$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{6}$, covariance matrix $\Sigma \in \mathbb{R}^{6 \times 6}$, and budget constraint $\sum_{i=1}^{6} x_i = B$ with penalty weight $\lambda_B = 5.1$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 1.2750, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 5.1
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0355 | 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.58$, $\sigma_1 = 0.208$, 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.12979*S^3*V + 0.0865*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 = 121.99, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = 0.58 * dW1 + np.sqrt(1 - 0.58**2) * dZ
dS = 0.088 * S0 * dt + 0.208 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.239 * np.sqrt... |
QCOT-PDE_A-0356 | pde_and_martingale_pricing | phd_level | Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.074$ and volatility $\sigma = 0.331$.
Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me... | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | dV/dt + 0.074*S*dV/dS + 0.5*0.10956*S^2*d2V/dS2 - 0.074*V = 0, V(S, 0.72) = max(S - 110.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, 110.0, 0.074, 0.331, 0.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-0357 | optimal_execution_and_microstructure | phd_level | 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 = 2.90e-06$, temporary impact is $\eta = 1.90e-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(4.88e-05 * 0.09 / 1.9e-06) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 1.8, 1.9e-06, 4.88e-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-0358 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 96.92$, paying a known discrete dividend $D = 2.88$ 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.52$ 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 = -6.2626, 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.92, 105.52, 2.88, 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.2626, atol=1e-3) |
QCOT-MEAN_-0359 | mean_field_games_and_liquidity | phd_level | Consider a continuum of $N = 50$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution speed... | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$.
The H... | v*(t, q) = (xi(t) / 0.63) * q, dxi/dt = (xi^2 - 0.031*xi) / 0.63, 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.63, 0.031, 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-0360 | 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 = 2.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 + 0.6750, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 4
Sigma = np.eye(N) * 0.04 + 0.01
lam = 2.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-0361 | 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.48$, $\sigma_1 = 0.214$, 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.13739*S^3*V + -0.09091*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 = 173.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.48 * dW1 + np.sqrt(1 - -0.48**2) * dZ
dS = 0.0686 * S0 * dt + 0.214 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.295 * np.s... |
QCOT-PDE_A-0362 | pde_and_martingale_pricing | advanced | Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.068$ and volatility $\sigma = 0.2$.
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.068*S*dV/dS + 0.5*0.04000*S^2*d2V/dS2 - 0.068*V = 0, V(S, 0.66) = max(S - 86.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, 86.7, 0.068, 0.2, 0.66
d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
d2 = d1 - sigma*np.sqrt(T)
call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2)
print('Analytical European Call price:', call_price) |
QCOT-OPTIM-0363 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 1,000,000$ shares over horizon $T = 3.5$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 7.10e-07$, temporary impact is $\eta = 4.49e-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.99e-05 * 0.09 / 4.49e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 1000000, 3.5, 4.49e-05, 5.99e-05, 0.30
kappa = np.sqrt(lam * sigma**2 / eta)
t = np.linspace(0, T, 100)
x_opt = X0 * np.sinh(kappa * (T - t)) / np.sinh(kappa * T)
assert np.isclose(x_opt[0], X0) and np.isclose(x_opt[-1], 0.0)
print('Optimal Almgren-Chriss liquidation trajecto... |
QCOT-ARBIT-0364 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 102.26$, paying a known discrete dividend $D = 2.87$ 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.98$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 8.1619, Lower bound = 8.1619 | [
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.26, 95.98, 2.87, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 8.1619, atol=1e-3) |
QCOT-MEAN_-0365 | mean_field_games_and_liquidity | advanced | Consider a continuum of $N = 100$ competitive institutional investors liquidating positions under common price impact. Representative agent inventory $q_t$ satisfies $dq_t = -v_t dt$. Price impact is aggregate: $P_t = P_0 - c \overline{v}_t - \sigma W_t$, where $\overline{v}_t = \int v_t d\mu(q)$ is mean execution spee... | Step 1: Set up the individual Hamilton-Jacobi-Bellman (HJB) equation. The Hamiltonian is $$H(q, p) = \sup_{v} \left[ -p v - \frac{\alpha}{2} v^2 - c \overline{v}(t) q \right]$$.
Step 2: Differentiate with respect to $v$: $-p - \alpha v = 0 \implies v^* = -\frac{p}{\alpha} = -\frac{1}{\alpha} \partial_q u(t, q)$.
The H... | v*(t, q) = (xi(t) / 1.68) * q, dxi/dt = (xi^2 - 0.035*xi) / 1.68, 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.68, 0.035, 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-0366 | 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.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 = 8
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-0367 | 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.26$, and $\sigma_2 = 0.26... | 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.0676*S^2*V + -0.01094*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 = 62.02, 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.1116 * S0 * dt + 0.26 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.263 * np.sqr... |
QCOT-PDE_A-0368 | 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.022$ and volatility $\sigma = 0.191$.
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.022*S*dV/dS + 0.5*0.03648*S^2*d2V/dS2 - 0.022*V = 0, V(S, 1.59) = max(S - 97.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, 97.5, 0.022, 0.191, 1.59
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-0369 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 1,000,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 = 3.29e-06$, temporary impact is $\eta = 2.45e-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.2e-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 = 1000000, 2.3, 2.45e-05, 6.2e-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-0370 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 99.40$, paying a known discrete dividend $D = 2.74$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 104.89$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = -3.0468, Lower bound = 0.0000 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 99.4, 104.89, 2.74, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, -3.0468, atol=1e-3) |
QCOT-MEAN_-0371 | 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.25) * q, dxi/dt = (xi^2 - 0.036*xi) / 1.25, 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.25, 0.036, 10.0
# Solve Riccati ODE backward in time
dt, steps = 0.001, 1000
xi = np.zeros(steps)
xi[-1] = beta
for t in range(steps - 2, -1, -1):
dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha
xi[t] = xi[t+1] + dxi * dt
print('Equilibrium Riccati terminal/initial xi:', xi[-1], x... |
QCOT-QUANT-0372 | 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 = 2.2$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 0.5500, 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.2
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0373 | 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.67$, $\sigma_1 = 0.258$, 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.06656*S^2*V + -0.0688*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 = 147.99, 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.67 * dW1 + np.sqrt(1 - -0.67**2) * dZ
dS = 0.0666 * S0 * dt + 0.258 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.199 * np.s... |
QCOT-PDE_A-0374 | 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.061$ and volatility $\sigma = 0.168$.
Construct a self-financing delta-hedged portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$ to eliminate stochastic risk. Derive the Black-Scholes-Me... | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | dV/dt + 0.061*S*dV/dS + 0.5*0.02822*S^2*d2V/dS2 - 0.061*V = 0, V(S, 0.89) = max(S - 81.2, 0) | [
1,
1,
1,
1
] | Step 1: Set up the replicating portfolio $\Pi_t = V(S_t, t) - \Delta_t S_t$. Over an infinitesimal interval $dt$, the portfolio change is $d\Pi_t = dV_t - \Delta_t dS_t$ under the self-financing condition.
Step 2: Expand $dV(S_t, t)$ via Itô's formula:
$$dV = \left(\frac{\partial V}{\partial t} + \mu S \frac{\partial ... | 3 | drift_arbitrage_violation | import numpy as np
from scipy.stats import norm
S, K, r, sigma, T = 100.0, 81.2, 0.061, 0.168, 0.89
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-0375 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 2.7$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 4.35e-06$, temporary impact is $\eta = 3.66e-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.45e-05 * 0.09 / 3.66e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 2.7, 3.66e-05, 7.45e-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-0376 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 96.92$, paying a known discrete dividend $D = 2.98$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 97.42$ maturing at $T = 1.0$. Establish the analytical bounds on European call ... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 1.3448, Lower bound = 1.3448 | [
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.92, 97.42, 2.98, 0.05, 0.5, 1.0
pv_D = D * np.exp(-r * tD)
pv_K = K * np.exp(-r * T)
parity = S0 - pv_D - pv_K
print('Parity delta C - P:', parity)
assert np.isclose(parity, 1.3448, atol=1e-3) |
QCOT-MEAN_-0377 | 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) / 1.37) * q, dxi/dt = (xi^2 - 0.045*xi) / 1.37, 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.37, 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-0378 | 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-0379 | 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.36$, $\sigma_1 = 0.33$, and $\sigma_2 = 0.18... | 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.1089*S^2*V + -0.04372*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 = 123.0, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = -0.36 * dW1 + np.sqrt(1 - -0.36**2) * dZ
dS = 0.1099 * S0 * dt + 0.33 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.184 * np.sqr... |
QCOT-PDE_A-0380 | 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.037$ and volatility $\sigma = 0.24$.
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.037*S*dV/dS + 0.5*0.05760*S^2*d2V/dS2 - 0.037*V = 0, V(S, 1.2) = max(S - 95.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, 95.4, 0.037, 0.24, 1.2
d1 = (np.log(S/K) + (r + 0.5*sigma**2)*T) / (sigma*np.sqrt(T))
d2 = d1 - sigma*np.sqrt(T)
call_price = S*norm.cdf(d1) - K*np.exp(-r*T)*norm.cdf(d2)
print('Analytical European Call price:', call_price) |
QCOT-OPTIM-0381 | optimal_execution_and_microstructure | advanced | 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 = 3.69e-06$, temporary impact is $\eta = 7.40e-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(7.19e-05 * 0.09 / 7.4e-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, 4.6, 7.4e-06, 7.19e-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-0382 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 93.59$, paying a known discrete dividend $D = 2.94$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 94.75$ maturing at $T = 1.0$. Establish the analytical bounds on European call ... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 0.5936, Lower bound = 0.5936 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 93.59, 94.75, 2.94, 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.5936, atol=1e-3) |
QCOT-MEAN_-0383 | 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.6) * q, dxi/dt = (xi^2 - 0.027*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.027, 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-0384 | 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.0$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 1.0000, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 4
Sigma = np.eye(N) * 0.04 + 0.01
lam = 4.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-0385 | 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.15$, $\sigma_1 = 0.253$, and $\sigma_2 = 0.17... | Step 1: Define the bivariate transformation function $f(S, V) = S^3 V$. Compute all relevant first- and second-order partial derivatives:
$\frac{\partial f}{\partial S} = 3 S^{2} V$, $\frac{\partial f}{\partial V} = S^3$, $\frac{\partial^2 f}{\partial S^2} = 6 S^{1} V$, $\frac{\partial^2 f}{\partial V^2} = 0$, and $\fr... | df = [3*mu*S^3*V + S^3*kappa*(theta-V) + 0.19203*S^3*V + 0.01958*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 = 180.61, 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.15 * dW1 + np.sqrt(1 - 0.15**2) * dZ
dS = 0.0756 * S0 * dt + 0.253 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.172 * np.sqr... |
QCOT-PDE_A-0386 | pde_and_martingale_pricing | expert | Consider a financial derivative $V(S, t)$ on an underlying asset $dS_t = \mu S_t dt + \sigma S_t dW_t$, with constant risk-free rate $r = 0.059$ and volatility $\sigma = 0.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.059*S*dV/dS + 0.5*0.05198*S^2*d2V/dS2 - 0.059*V = 0, V(S, 1.79) = max(S - 96.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, 96.0, 0.059, 0.228, 1.79
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-0387 | optimal_execution_and_microstructure | expert | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 4.9$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 1.69e-06$, temporary impact is $\eta = 3.89e-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.4e-05 * 0.09 / 3.89e-05) | [
1,
1,
1,
1
] | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | 2 | euler_lagrange_sign_error | import numpy as np
X0, T, eta, lam, sigma = 100000, 4.9, 3.89e-05, 1.4e-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-0388 | arbitrage_bounds_and_hedging | expert | Let an underlying equity trade at spot $S_0 = 99.08$, paying a known discrete dividend $D = 1.15$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 94.72$ 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.8579, Lower bound = 7.8579 | [
1,
1,
1,
1
] | Step 1 (Error): Construct Portfolio A with full undiscounted dividend $D$ rather than discounted present value $D e^{-r t_D}$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $D$, but cash from Portfolio A yields $D$. At maturity $T$, Portfolio A has value $\max(S_T - K, 0)... | 0 | drift_arbitrage_violation | import numpy as np
S0, K, D, r, tD, T = 99.08, 94.72, 1.15, 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.8579, atol=1e-3) |
QCOT-MEAN_-0389 | 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.17) * q, dxi/dt = (xi^2 - 0.023*xi) / 1.17, 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.17, 0.023, 10.0
# Solve Riccati ODE backward in time
dt, steps = 0.001, 1000
xi = np.zeros(steps)
xi[-1] = beta
for t in range(steps - 2, -1, -1):
dxi = (xi[t+1]**2 - c * xi[t+1]) / alpha
xi[t] = xi[t+1] + dxi * dt
print('Equilibrium Riccati terminal/initial xi:', xi[-1], x... |
QCOT-QUANT-0390 | 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.2$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 0.8000, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 6
Sigma = np.eye(N) * 0.04 + 0.01
lam = 3.2
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0391 | 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.23$, $\sigma_1 = 0.34$, and $\sigma_2 = 0.15... | 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.3468*S^3*V + -0.03542*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.42, 0.04, 1e-4, 50000
dW1 = np.random.normal(0, np.sqrt(dt), N)
dZ = np.random.normal(0, np.sqrt(dt), N)
dW2 = -0.23 * dW1 + np.sqrt(1 - -0.23**2) * dZ
dS = 0.087 * S0 * dt + 0.34 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.151 * np.sqr... |
QCOT-PDE_A-0392 | 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.022$ 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-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.022*S*dV/dS + 0.5*0.11156*S^2*d2V/dS2 - 0.022*V = 0, V(S, 1.21) = max(S - 106.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, 106.6, 0.022, 0.334, 1.21
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-0393 | optimal_execution_and_microstructure | phd_level | An institutional trader must liquidate $X_0 = 100,000$ shares over horizon $T = 3.2$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 3.56e-06$, temporary impact is $\eta = 2.29e-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.66e-05 * 0.09 / 2.29e-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.2, 2.29e-05, 8.66e-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-0394 | arbitrage_bounds_and_hedging | phd_level | Let an underlying equity trade at spot $S_0 = 100.80$, paying a known discrete dividend $D = 2.97$ 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.68$ maturing at $T = 1.0$. Establish the analytical bounds on European call... | Step 1: Construct Portfolio A consisting of one European call option $+C_0$ and cash balance $K e^{-r T} + D e^{-r t_D}$. Construct Portfolio B consisting of one European put option $+P_0$ and one share of underlying $+S_0$.
Step 2: Track terminal values at $T = 1.0$. At dividend date $t_D = 0.5$, the stock drops by $... | C0 - P0 = 11.6458, Lower bound = 11.6458 | [
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.8, 90.68, 2.97, 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.6458, atol=1e-3) |
QCOT-MEAN_-0395 | 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.9) * q, dxi/dt = (xi^2 - 0.031*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.031, 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-0396 | quantum_finance_and_ising_formulation | phd_level | Consider a portfolio selection problem across $N = 4$ assets with binary selection variables $x_i \in \{0, 1\}$, expected returns $\mu \in \mathbb{R}^{4}$, covariance matrix $\Sigma \in \mathbb{R}^{4 \times 4}$, and budget constraint $\sum_{i=1}^{4} x_i = B$ with penalty weight $\lambda_B = 7.1$.
Convert the quadratic ... | Step 1: Apply the canonical mapping from binary bit $x_i \in \{0, 1\}$ to spin variable $s_i \in \{+1, -1\}$: $x_i = \frac{1 - s_i}{2}$, which maps $x_i = 0 \mapsto s_i = +1$ and $x_i = 1 \mapsto s_i = -1$. Promote $s_i$ to quantum Pauli-Z observables $\hat{Z}_i$ acting on qubit $i$.
Step 2: Expand the quadratic risk ... | J_ij = (1/8)*Sigma_ij + 1.7750, x_i = (I - Z_i)/2 | [
1,
1,
1,
1
] | Step 1 (Error): Use the incorrect substitution $x_i = \frac{1 + \hat{Z}_i}{2}$ which maps $x_i = 1 \mapsto s_i = +1$, introducing an overall sign flip on all linear Pauli coefficients $h_i$.
Step 2: Expand the quadratic risk and constraint terms. The quadratic interaction is $x_i x_j = \left(\frac{1 - \hat{Z}_i}{2}\ri... | 0 | pauli_matrix_commutation_error | import numpy as np
N = 4
Sigma = np.eye(N) * 0.04 + 0.01
lam = 7.1
Q = 0.5 * Sigma + lam * np.ones((N, N))
J = 0.25 * Q
np.fill_diagonal(J, 0.0)
print('Coupling matrix J shape:', J.shape, 'Sample J_01:', J[0, 1]) |
QCOT-STOCH-0397 | 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.14$, $\sigma_1 = 0.168$, and $\sigma_2 = 0.12... | 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.08467*S^3*V + 0.00854*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 = 83.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.14 * dW1 + np.sqrt(1 - 0.14**2) * dZ
dS = 0.0544 * S0 * dt + 0.168 * S0 * dW1
dV = 1.5 * (0.04 - V0) * dt + 0.121 * np.sqrt... |
QCOT-PDE_A-0398 | 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.029$ and volatility $\sigma = 0.397$.
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.029*S*dV/dS + 0.5*0.15761*S^2*d2V/dS2 - 0.029*V = 0, V(S, 0.51) = max(S - 118.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, 118.6, 0.029, 0.397, 0.51
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-0399 | optimal_execution_and_microstructure | advanced | An institutional trader must liquidate $X_0 = 500,000$ shares over horizon $T = 2.0$ days. Price dynamics follow $S_t = S_0 - \gamma(X_0 - x_t) + \sigma W_t - \eta v_t$, where $v_t = -\dot{x}_t$ is trading speed, permanent price impact is $\gamma = 1.68e-06$, temporary impact is $\eta = 4.87e-05$, and trader risk avers... | Step 1: Express total execution cost and variance. The expected cost is $\mathbb{E}[\text{Cost}] = \frac{1}{2} \gamma X_0^2 + \int_0^T \eta \dot{x}_t^2 dt$. The capture variance is $\mathbb{V}[\text{Cost}] = \sigma^2 \int_0^T x_t^2 dt$.
Step 2: Construct the Lagrangian functional:
$$L(t, x, \dot{x}) = \eta \dot{x}^2 +... | x*(t) = 500000 * sinh(kappa*(T - t)) / sinh(kappa*T), kappa = sqrt(5.84e-05 * 0.09 / 4.87e-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.0, 4.87e-05, 5.84e-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-0400 | arbitrage_bounds_and_hedging | advanced | Let an underlying equity trade at spot $S_0 = 100.43$, paying a known discrete dividend $D = 2.06$ at $t_D = 0.5$. Risk-free rate is $r = 0.05$.
Derive the exact discrete-dividend Put-Call Parity formula for European options with strike $K = 96.85$ 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 = 6.2943, Lower bound = 6.2943 | [
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.43, 96.85, 2.06, 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.2943, atol=1e-3) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.