关于「时间止损作为最优停时问题」,《隐含波动率、偏度与垂直价差》给出的定量结论是什么?

结论:「7—10 天是最优的」不能在一般意义上证明。本书按作者的确认,把「天」统一为交易日。把平仓写成最优停时问题后,在作者的模型中,最优的固定平仓日取决于信号衰减速度、股权风险溢价、方差风险溢价、偏度与成本,在 12 种情形中从第 1 个交易日到持有到期不等;基准情形的最优日为第 9 到 10 个交易日,但第 7 到 14 个交易日几乎一样好,持有到期也只差 0.011,而依价格状态而定的规则明显更好。即使模型正确,单笔交易的噪声也大到几百笔交易无法分辨不同的平仓规则。「7—10 天」应当被看作需要检验的经验规则。

数据口径:一个熊市看跌垂直价差最多亏多少、最多赚多少,交易者在开仓时就知道;可「持仓 7—10 个交易日没有起色就平仓」这条经验规则,能被证明吗?本书是教学与研究用的数学模型,不是投资建议。 书中以标注框区分已发表的证据、可运行的 Python 计算(16 段程序)、原典与作者的模型和假说;书中所有价格与交易都是虚构或示意的。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 10, 12

base: a -1.0, tau 2.5 td, b 0.06, sP 0.18, implied 0.22/0.245, c = ce0.06
debit at the ask 1.581; expected profit (value - debit) by exit trading day (TD):
TD1 3 5 7 8 9 10 12 15 21
profit -0.032 +0.068 +0.113 +0.131 +0.134 +0.136 +0.136 +0.134 +0.125 +0.125
optimal state-dependent rule: profit +0.240; closed by trading day 7 20%,
by day 10 40%, at expiry 26%; mean exit trading day 13.5
close when the spot is in day 3: none, day 6103.3-106.8, day 9: 102.0-106.1
day 12100.7-105.4, day 18: 99.3-102.0
scenario (one change from base) best TD profit hold optimal within 0.01
base10 +0.136 +0.125 +0.240 days 7-14
slower signal tau 5 td21 +0.479 +0.479 +0.556 days 21-21
faster signal tau 1.5 td6 +0.027 -0.014 +0.113 days 4-9
stronger signal a -1.521 +0.294 +0.294 +0.402 days 10-21
no equity premium b 021 +0.275 +0.275 +0.346 days 21-21
equity premium b 0.127 +0.098 -0.021 +0.157 days 5-9
no variance premium sP .2221 +0.267 +0.267 +0.270 days 21-21
larger variance premium sP .157 +0.102 -0.019 +0.228 days 5-10
no skew v2 .226 +0.084 -0.078 +0.114 days 5-8
wider spreads c = ce.12 21 +0.034 +0.034 +0.120 days 21-21
cash-settled ce 021 +0.155 +0.155 +0.255 days 21-21
no signal a 01 -0.118 -0.195 -0.058 days 1-5

核心公式

\[V_0 = \sup_{\tau \le T} E\big[e^{-r\tau} G_\tau\big].\]
查看完整验算程序
# When should a 100/95 bear put spread with 21 TRADING days to expiry (about 30
# calendar days) be closed? An optimal stopping problem (Snell envelope) on a binomial
# tree, 12 steps per trading day. Time is counted in TRADING days throughout: a year is
# 252 trading days and "day d" means the close of the d-th trading day after entry
# (entry = day 0).
# THE AUTHOR'S MODEL, all numbers ILLUSTRATIVE: the market marks each leg at a fixed
# implied vol (sticky strike); the underlying moves with vol sP and drift
# mu(t) = r + a e + b (1 - e), e = exp(-t / tau): a bearish signal a that fades with time
# constant tau (trading days), then drift b (an equity premium). Closing costs c (two
# half-spreads); ce at expiry (ce = c: an in-the-money spread must be closed before
# expiry; ce = 0: cash-settled). The trader maximises expected discounted value (no risk
# aversion). Weekends and holidays are treated as carrying no variance and no time decay.
import math

TD_YEAR, DAYS, M = 252, 21, 12            # trading days a year, to expiry, steps per day

def ncdf(x):
    return 0.5 * (1.0 + math.erf(x / math.sqrt(2.0)))

def put(S, K, T, r, s):
    if T <= 0:
        return max(K - S, 0.0)
    d1 = (math.log(S / K) + (r + 0.5 * s * s) * T) / (s * math.sqrt(T))
    return K * math.exp(-r * T) * ncdf(-d1 + s * math.sqrt(T)) - S * ncdf(-d1)

BASE = dict(a=-1.0, tau=2.5, b=0.06, sP=0.18, v1=0.22, v2=0.245, c=0.06, ce=0.06, r=0.03)

def solve(a, tau, b, sP, v1, v2, c, ce, r, days=DAYS, m=M, S0=100.0):
    n, dt = days * m, 1 / (TD_YEAR * m)
    u = math.exp(sP * math.sqrt(dt)); dn = 1 / u; disc = math.exp(-r * dt)
    mark = lambda i, j: (put(S0 * u ** (2 * j - i), 100, (n - i) * dt, r, v1)
                         - put(S0 * u ** (2 * j - i), 95, (n - i) * dt, r, v2))
    def prob(i):                                  # drift averaged over the step
        e = tau * m * (math.exp(-i / m / tau) - math.exp(-(i + 1) / m / tau))
        mu = r + a * e + b * (1 - e)
        return (math.exp(mu * dt) - dn) / (u - dn)
    end = lambda j: mark(n, j) - (ce if mark(n, j) > 0 else 0)
    w = [end(j) for j in range(n + 1)]; stop = {}
    for i in range(n - 1, 0, -1):
        p = prob(i); new = []
        for j in range(i + 1):
            cont = disc * (p * w[j + 1] + (1 - p) * w[j]); now = mark(i, j) - c
            stop[i, j] = now > cont; new.append(max(now, cont))
        w = new
    p = prob(0); v_opt = disc * (p * w[1] + (1 - p) * w[0])
    mass, fixed, exit_day = [1.0], {}, [0.0] * (days + 1)
    for i in range(1, n + 1):                     # forward pass: probabilities
        p = prob(i - 1)
        mass = [(mass[j] * (1 - p) if j < i else 0) + (mass[j - 1] * p if j else 0)
                for j in range(i + 1)]
        if i % m == 0:
            k = i // m
            val = sum(q * (mark(i, j) - c if i < n else end(j))
                      for j, q in enumerate(mass))
            fixed[k] = val * math.exp(-r * k / TD_YEAR)
    live = [1.0]                                  # mass still open under the optimal rule
    for i in range(1, n + 1):
        p = prob(i - 1)
        live = [(live[j] * (1 - p) if j < i else 0) + (live[j - 1] * p if j else 0)
                for j in range(i + 1)]
        if i < n:
            for j in range(i + 1):
                if stop[i, j]:
                    exit_day[math.ceil(i / m)] += live[j]; live[j] = 0.0
    exit_day[days] += sum(live)
    return v_opt, fixed, exit_day, stop

def debit(v1, v2, c, r=0.03, **_):
    T = DAYS / TD_YEAR
    return put(100, 100, T, r, v1) - put(100, 95, T, r, v2) + c

if __name__ == "__main__":
    v, fixed, ex, stop = solve(**BASE); d0 = debit(**BASE)
    print(f"base: a {BASE['a']}, tau {BASE['tau']} td, b {BASE['b']}, sP {BASE['sP']},"
          f" implied {BASE['v1']}/{BASE['v2']}, c = ce = {BASE['c']}")
    days = (1, 3, 5, 7, 8, 9, 10, 12, 15, 21)
    print(f"debit at the ask {d0:.3f}; expected profit (value - debit)"
          f" by exit trading day (TD):")
    print("  TD    " + "".join(f"{d:7d}" for d in days))
    print("  profit" + "".join(f"{fixed[d] - d0:+7.3f}" for d in days))
    cum = [sum(ex[: d + 1]) for d in range(DAYS + 1)]
    mean = sum(d * q for d, q in enumerate(ex))
    print(f"optimal state-dependent rule: profit {v - d0:+.3f};"
          f" closed by trading day 7 {cum[7]:.0%},")
    print(f"  by day 10 {cum[10]:.0%}, at expiry {ex[DAYS]:.0%};"
          f" mean exit trading day {mean:.1f}")
    u = math.exp(BASE["sP"] * math.sqrt(1 / (TD_YEAR * M)))
    reg = []
    for d in (3, 6, 9, 12, 18):
        s = [100 * u ** (2 * j - M * d) for j in range(M * d + 1) if stop[M * d, j]]
        reg.append(f"day {d}: " + (f"{min(s):.1f}-{max(s):.1f}" if s else "none"))
    print("  close when the spot is in  " + ", ".join(reg[:3]))
    print("                             " + ", ".join(reg[3:]))
    print("scenario (one change from base) best TD   profit   hold  optimal  within 0.01")
    for lab, kw in (("base", {}), ("slower signal tau 5 td", dict(tau=5.0)),
                    ("faster signal tau 1.5 td", dict(tau=1.5)),
                    ("stronger signal a -1.5", dict(a=-1.5)),
                    ("no equity premium b 0", dict(b=0.0)),
                    ("equity premium b 0.12", dict(b=0.12)),
                    ("no variance premium sP .22", dict(sP=0.22)),
                    ("larger variance premium sP .15", dict(sP=0.15)),
                    ("no skew v2 .22", dict(v2=0.22)),
                    ("wider spreads c = ce = .12", dict(c=0.12, ce=0.12)),
                    ("cash-settled ce 0", dict(ce=0.0)), ("no signal a 0", dict(a=0.0))):
        P = dict(BASE, **kw); v, fixed, ex, stop = solve(**P); d0 = debit(**P)
        best = max(fixed, key=fixed.get)
        band = [d for d in fixed if fixed[d] >= fixed[best] - 0.01]
        print(f"  {lab:30s} {best:4d}    {fixed[best] - d0:+.3f}  {fixed[DAYS] - d0:+.3f}"
              f"  {v - d0:+.3f}  days {min(band)}-{max(band)}")

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《期权隐含波动率曲面、偏度溢价与垂直价差结构的定量风控》第 5 章「时间止损作为最优停时问题」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23796765

DOI: 10.5281/zenodo.23796765 · 阅读本章所在专著 · 5DL-B-038 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026038,
  author    = {Fan, Yafu},
  title     = {Implied Volatility Surfaces, Skew Premia and Quantitative Risk Control of Vertical Spreads},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.23796765},
  url       = {https://doi.org/10.5281/zenodo.23796765}
}

本书其他章节结论