Optimal Blind Buy Time in a Three-State Process

Stochastic Processes · Hard · Free problem

A stock price evolves through three qualitative states during a trading day: "calm" (state 1), "active" (state 2), and "exhausted" (state 3). The stock starts in state 1 at time $t = 0$. The time spent in state 1 before transitioning to state 2 is $T_1 \sim \text{Uniform}[0, 1]$; independently, the time spent in state 2 before transitioning to state 3 is $T_2 \sim \text{Uniform}[0, 1]$. Once in state 3, the stock remains there until the market close at $t = 2$.

You may submit a single market buy order at a deterministic time $\tau \in [0, 2]$. Crucially, you do not observe the current state before trading -- you must commit to $\tau$ in advance.

(a) Express the probability that you buy while the stock is in state 2 (the "active" state) as a function of $\tau$.

(b) Find the value of $\tau$ that maximizes this probability and compute the maximized probability.

Hints

  1. The stock is in state 2 at time $\tau$ exactly when $T_1 \leq \tau \leq T_1 + T_2$. Think about what region of the $(T_1, T_2)$ unit square satisfies this.
  2. Integrate $P(T_2 \geq \tau - T_1)$ over the feasible range of $T_1$. You will need to handle $\tau \leq 1$ and $\tau > 1$ as separate cases because the integration limits change.
  3. For $\tau \in [0,1]$ the probability is $\tau - \tau^2/2$; for $\tau \in (1,2]$ it is $(2-\tau)^2/2$. Check continuity at $\tau = 1$, then differentiate each piece to find the maximum.

Worked Solution

How to Think About It: You want to time a blind buy to land in the "active" window $[T_1, T_1 + T_2]$. You do not get to peek at the state -- you just pick a clock time $\tau$ and hope. The active window starts somewhere uniformly in $[0,1]$ and lasts for an independent $\text{Uniform}[0,1]$ duration, so the window $[T_1, T_1+T_2]$ sits inside $[0,2]$ with a random center around $t \approx 1$. Intuitively, you should aim for the middle of the action -- near $\tau = 1$ -- because that is where the active interval is most likely to overlap.

Quick Estimate: The sum $S = T_1 + T_2$ has an Irwin-Hall(2) distribution (a triangle on $[0,2]$ peaking at 1). You need $T_1 \leq \tau \leq S$. By symmetry, $\tau = 1$ is the natural center of mass. At $\tau = 1$: $T_1$ must be at most 1 (always true) and $T_2 \geq 1 - T_1$. Averaging over $T_1 \sim U[0,1]$: $\int_0^1 (1 - (1 - t)) \, dt = \int_0^1 t \, dt = 1/2$. So the maximum probability is $1/2$ -- you catch the active state half the time.

Approach: Compute $P(T_1 \leq \tau \leq T_1 + T_2)$ by integrating over the joint density of $(T_1, T_2)$, which is uniform on $[0,1]^2$, then optimize over $\tau$.

Formal Solution:

The stock is in state 2 at time $\tau$ if and only if $T_1 \leq \tau \leq T_1 + T_2$. Since $T_1$ and $T_2$ are independent $\text{Uniform}[0,1]$:

$$f(\tau) = P(T_1 \leq \tau,\; T_2 \geq \tau - T_1)$$

Case 1: $0 \leq \tau \leq 1$.

We need $T_1 \in [0, \tau]$ and $T_2 \geq \tau - T_1$ (where $\tau - T_1 \in [0, \tau] \subseteq [0,1]$):

$$f(\tau) = \int_0^{\tau} P(T_2 \geq \tau - t_1)\, dt_1 = \int_0^{\tau} (1 - \tau + t_1)\, dt_1$$

$$= \left[(1 - \tau)\, t_1 + \frac{t_1^2}{2}\right]_0^{\tau} = (1 - \tau)\tau + \frac{\tau^2}{2} = \tau - \frac{\tau^2}{2}$$

Case 2: $1 < \tau \leq 2$.

Now $T_1 \leq 1 < \tau$ is automatic, but we also need $T_2 \geq \tau - T_1$, which requires $\tau - T_1 \leq 1$, i.e., $T_1 \geq \tau - 1$:

$$f(\tau) = \int_{\tau - 1}^{1} (1 - \tau + t_1)\, dt_1$$

$$= \left[(1 - \tau)\, t_1 + \frac{t_1^2}{2}\right]_{\tau - 1}^{1}$$

Evaluating:

$$= \left[(1 - \tau) + \frac{1}{2}\right] - \left[(1 - \tau)(\tau - 1) + \frac{(\tau - 1)^2}{2}\right]$$

$$= (1 - \tau) + \frac{1}{2} + (\tau - 1)^2 - \frac{(\tau - 1)^2}{2} = (1 - \tau) + \frac{1}{2} + \frac{(\tau - 1)^2}{2}$$

$$= \frac{(2 - \tau)^2}{2}$$

To verify: at $\tau = 1$ the two cases agree: $1 - 1/2 = 1/2$ and $(2 - 1)^2/2 = 1/2$. Good.

So the complete answer for part (a) is:

$$f(\tau) = \begin{cases} \tau - \dfrac{\tau^2}{2}, & 0 \leq \tau \leq 1 \\[6pt] \dfrac{(2 - \tau)^2}{2}, & 1 < \tau \leq 2 \end{cases}$$

Optimization for part (b):

For $0 \leq \tau \leq 1$: $f'(\tau) = 1 - \tau > 0$ for $\tau < 1$, so $f$ is strictly increasing on $[0,1)$.

For $1 < \tau \leq 2$: $f'(\tau) = -(2 - \tau) < 0$, so $f$ is strictly decreasing on $(1,2]$.

The unique maximum is at $\tau^{*} = 1$.

Answer:

(a) $f(\tau) = \tau - \tau^2/2$ for $\tau \in [0,1]$ and $f(\tau) = (2-\tau)^2/2$ for $\tau \in (1,2]$.

(b) The optimal submission time is $\tau^{*} = 1$ with a maximum probability of $f(1) = 1/2$.

Intuition

This is a geometric probability problem in disguise. The pair $(T_1, T_2)$ is uniform on the unit square, and your buy lands in the active window when the point $(T_1, T_2)$ falls in the region $\{T_1 \leq \tau,\; T_1 + T_2 \geq \tau\}$. As you slide $\tau$ from 0 to 2, the feasible region grows and then shrinks, peaking when it captures exactly half the square -- at $\tau = 1$. The probability function is a concave arch on $[0,1]$ glued to a convex descent on $[1,2]$, peaking at $1/2$.

The broader lesson is about blind timing under uncertainty. When you cannot observe the state of a process and must commit to a fixed action time, the optimal strategy targets the region of maximum overlap between your action and the random event window. Here the active interval $[T_1, T_1+T_2]$ has its midpoint at $T_1 + T_2/2$, whose expectation is $1$ -- so $\tau = 1$ is the natural center of mass. The $1/2$ ceiling is a reminder that blind timing has hard limits: no matter how cleverly you choose $\tau$, you cannot beat a coin flip without observing the state.

Open the full interactive solver →