You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

初始股价为Q时n天后股价的期望与方差计算及求解思路

Solution: Expected Value and Variance of Stock Price After n Days

First, let's formalize the problem setup: we start with an initial stock price $Q$. Each day, the price multiplies by an independent random factor $F_i$, where:

  • $F_i = 1+\epsilon$ with probability $p$
  • $F_i = 1-\epsilon$ with probability $1-p$

After $n$ days, the stock price is $P_n = Q \cdot F_1 \cdot F_2 \cdot ... \cdot F_n$. We'll calculate its expectation and variance below.


1. Expected Value of $P_n$

The key insight here is that the expectation of a product of independent random variables equals the product of their expectations. This simplifies the calculation drastically:
$$E[P_n] = Q \cdot \prod_{i=1}^n E[F_i]$$

First compute the daily factor expectation:
$$E[F_i] = p(1+\epsilon) + (1-p)(1-\epsilon)$$
Simplify this expression to make it easier to work with:
$$E[F_i] = 1 + \epsilon(2p - 1)$$

Since each day's expectation is identical, we raise this value to the $n$-th power:
$$E[P_n] = Q \cdot \left(1 + \epsilon(2p - 1)\right)^n$$

If you prefer using the binomial distribution approach you started with: let $X$ be the number of up days (a binomial random variable with parameters $n,p$). Then $P_n = Q(1+\epsilon)X(1-\epsilon){n-X}$. Taking expectation gives:
$$E[P_n] = Q \sum_{k=0}^n \binom{n}{k} pk(1-p){n-k} (1+\epsilon)k(1-\epsilon){n-k}$$
By the binomial theorem, this sum collapses to $Q \left(p(1+\epsilon) + (1-p)(1-\epsilon)\right)^n$, which matches our earlier result.


2. Variance of $P_n$

Variance is defined as $\text{Var}(P_n) = E[P_n^2] - \left(E[P_n]\right)^2$. We already have $E[P_n]$, so we just need to compute $E[P_n^2]$.

Again using independence (since $(ab)^2 = a2b2$, and expectations of products of independent variables multiply):
$$E[P_n^2] = Q^2 \cdot \prod_{i=1}^n E[F_i^2]$$

Calculate the daily squared factor expectation:
$$E[F_i^2] = p(1+\epsilon)^2 + (1-p)(1-\epsilon)^2$$
Expand and simplify:
$$E[F_i^2] = 1 + 2\epsilon(2p - 1) + \epsilon^2$$

Raise this to the $n$-th power:
$$E[P_n^2] = Q^2 \cdot \left(1 + 2\epsilon(2p - 1) + \epsilon2\right)n$$

Now substitute into the variance formula:
$$\text{Var}(P_n) = Q^2 \left[ \left(1 + 2\epsilon(2p - 1) + \epsilon2\right)n - \left(1 + \epsilon(2p - 1)\right)^{2n} \right]$$

For clarity, you can also write it using the unexpanded form of $E[F_i]$ and $E[F_i^2]$:
$$\text{Var}(P_n) = Q^2 \left[ \left(p(1+\epsilon)^2 + (1-p)(1-\epsilon)2\right)n - \left(p(1+\epsilon) + (1-p)(1-\epsilon)\right)^{2n} \right]$$


Example Verification

Let’s test with $n=2$, $p=0.5$, $\epsilon=0.1$, $Q=100$:

  • $E[P_2] = 100 \cdot (1 + 0.1(1-1))^2 = 100$
  • $E[P_2^2] = 100^2 \cdot (1 + 2*0.1(1-1) + 0.01)^2 = 10201$
  • $\text{Var}(P_2) = 10201 - 100^2 = 201$

Manual calculation confirms this:

  • Two up days: $100*(1.1)^2=121$, probability 0.25 → contribution to $E[P_2^2]$: $0.25*121^2=3660.25$
  • One up/one down: $1001.10.9=99$, probability 0.5 → contribution: $0.5*99^2=4900.5$
  • Two down days: $100*(0.9)^2=81$, probability 0.25 → contribution: $0.25*81^2=1640.25$
  • Total $E[P_2^2] = 3660.25 + 4900.5 + 1640.25 = 10201$, which matches our formula.

内容的提问来源于stack exchange,提问作者gaazkam

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 03:47:30