好的量化金融面試題


8

我知道已故的馬克·喬希(Mark Joshi)有一本書,互聯網上有很多內容。我認為在此處另外發起一個話題可能是有益的,在這裡我們可以共享我們在Quant Finance中遇到過的最有趣的面試問題(即社區Wiki問題:每個答案都應包括一個面試問題(理想情況下是一個答案):類似於"良好的量化金融笑話")。

即使可能與其他資源有一些重複,此線程的附加好處也可能是:

(i)該主題將反映"當前"流行的問題

(ii)作為Quants和Aspiring Quants的資源,它可能會在Quant.stackexchange網站上增加價值

很高興收到建設性的批評,如果別人不認為這是一個好主意。

5

To start the thread, let me share the most recent interview question I have been asked:

Question: Denote standard Brownian motion as $W(t)$. Compute the probability that:

$$ \mathbb{P}(W(1)>0 \cap W(2)>0) $$

Answer: Using the independence of increments property, we have $W(2) = W(2-1) + W(1)$. Denote $W(2-1)$ as $Y$ and $W(1)$ as $X$. Then:

$$ \mathbb{P}(W(1)>0 \cap W(2-1)+W(1)>0)=\mathbb{P}(X>0 \cap Y+X)>0)=\mathbb{P}(X>0 \cap Y>-X) $$

By definition of Brownian motion, the independent increments are jointly Normally distributed. So $X$ and $Y$ are jointly normal with density $f_{X,Y}(u,v)$. We can write:

$$\mathbb{P}(X>0 \cap Y>-X)=\int_{u=0}^{u=\infty}\int_{v=-u}^{v=\infty}f_{X,Y}(u,v)dv du$$

The final step is to draw the domain of the double integral: $X>0$ means we're interested in the right-hand side of the cartesian $X,Y$ plot. Then with $Y>-X$, this further carves out the area below the line $Y=(-X)$ on the right-hand side of the $X,Y$ plot: i.e. we cut the "bottom $1/4$" of the right-hand half. So we are left with $3/4$ of $1/2$ of the $X,Y$ domain, which is $3/8$. Since the jointly normal PDF is a symmetrical cone centred on $x=0, y=0$, the double integral is actually equal to $3/8$ by symmetry.


1

Question: A contract pays $$ P(T,T+\tau) - K$$ at $T$, where $K$ is fixed and $P(\cdot,S)$ is the price of a $S$-maturity zero-coupon bond (ZCB).

What is $K$ for which the contract's time $t$ price is null?

Answer:

Replication pricing:

At time $t$, we go long one $T+\tau$-maturity ZCB and short $ P(t,T)^{-1}P(t,T+\tau)$ $T$-maturity ZCB's.

Time $t$ cost of this position is $0$ as:

$$ (-1)\cdot P(t,T+\tau) + P(t,T)^{-1}P(t,T+\tau)\cdot P(t,T) = 0. $$

At time $T$, as the shorted bond matures, we have a flow of $$ - P(t,T)^{-1}P(t,T+\tau). $$

But we are also expecting $1$ dollar flow at $T+\tau$, whose price at time $T$ is:

$$ P(T,T+\tau). $$

Hence, the $t$ price of payout (at time $T$)

$$ P(T,T+\tau) - P(t,T)^{-1}P(t,T+\tau) $$

is $0$. This is of course exactly our contract with

$$ K = P(t,T)^{-1}P(t,T+\tau). $$

Pricing under $T$-forward measure:

$$V_t = P(t,T)\mathbf{E}^{T}_t[P(T,T+\tau) - K]$$

Setting $V_t$ to $0$ implies:

$$K = \mathbf{E}^{T}_t[P(T,T+\tau)]$$

As $P(t,T+\tau)$ is a traded asset, under $T$-forward measure, process $$ \left(P(t,T)^{-1} P(t,T+\tau)\right)_{t\geq 0}$$ is a martingale, which leads to: $$\mathbf{E}^{T}_t[P(T,T)^{-1} P(T,T+\tau)] = P(t,T)^{-1} P(t,T+\tau).$$ Due to $P(T,T)=1$, we have:

$$K = \mathbf{E}^{T}_t[P(T,T+\tau)] = P(t,T)^{-1}P(t,T+\tau)$$

Pricing under money market account measure:

$$V_t = \beta_t\mathbf{E}_t[\beta_T^{-1} (P(T,T+\tau) - K)]$$

Setting $V_t$ to $0$ implies:

$$K = \mathbf{E}_t[\beta_T^{-1}]^{-1}\mathbf{E}_t[\beta_T^{-1} P(T,T+\tau)]$$

$$ = P(t,T)\mathbf{E}_t\left[\beta_T^{-1} \mathbf{E}_T[\beta_T \beta_{T+\tau}^{-1} ] \right] $$

$$ = P(t,T)^{-1}\mathbf{E}_t\left[ \mathbf{E}_T[ \beta_{T+\tau}^{-1} ] \right] $$

$$ = P(t,T)^{-1}\mathbf{E}_t\left[ \beta_{T+\tau}^{-1} \right] $$

$$ = P(t,T)^{-1}P(t,T+\tau), $$

using tower property of conditional expectations in the penultimate equality.

(Note: not necessarily a recent question, but expected to be asked - I flunked the replication pricing part that the interviewer was obviously enamored with; this is covered by both Brigo/Mercurio's book, in the context of FRA pricing, and by Andersen/Piterbarg's book, forward bond price.)