研究Research

为什么多空组合需要优化器Why Long/Short Portfolios Need an Optimizer

假设我们手中有一份可靠的美国股票排序,覆盖一千只股票。最简单的组合构建方式,是等权买入排名前一百的股票、等权卖空排名后一百的股票。这种做法透明、易于解释,但也浪费了大量价值。

等权配置忽略了个股之间的波动率差异:一只股票的波动率可能是另一只的三倍,因此其每一美元仓位贡献的风险要大得多。十分位分组忽略了排序靠前的股票可能集中于同一行业,从而把选股策略变成了行业押注。它还忽略了不同股票交易成本高低不一、部分空头需支付高昂的融券费用,以及每期从零重建组合会产生毫无对应收益的换手。上述每一点,都会让组合偏离其赖以成立的预测。

优化器可以同时解决所有这些问题。

优化器解决的问题

组合优化源于 Markowitz 开创的均值-方差框架,其核心是选择权重 w,在预期收益与风险、成本之间取得平衡。多空组合的一种典型表述如下:

maximize αᵀw − λ · wᵀΣw − TC(w − w₀)

并满足如下约束:

  • 净市场敞口(按金额或 beta 计)接近于零
  • 各行业净敞口控制在较窄区间内
  • 规模、动量等风格因子的敞口不超过限额
  • 多头与空头的单只持仓规模设有上限,通常与流动性挂钩
  • 总敞口与组合波动率维持在目标水平
  • 不持有无法融券的股票

其中,α 为由排序推导出的预期残差收益向量,Σ 为股票收益的协方差矩阵,λ 为风险厌恶系数,TC 为从当前持仓 w₀ 调整至新权重的交易成本。每一项都对应投资经理在手工决策时会权衡的实际因素;而优化器能够对所有股票同时、一致地进行权衡。

风险模型举足轻重

协方差矩阵是最难准确估计的输入。一个包含一千只股票的股票池约有五十万个两两协方差,远超仅凭几年收益数据所能可靠估计的数量。原始样本协方差矩阵以噪声为主,而优化器会毫不犹豫地利用这些噪声。

标准的解决方案是采用 Barra 所推广的那类因子风险模型:

Σ = X F Xᵀ + Δ

每只股票的收益由以下几部分刻画:其在少量共同因子(市场、行业,以及规模、价值、动量和波动率等风格因子)上的暴露 X,这些因子收益的协方差 F,以及由个股特质方差构成的对角矩阵 Δ。由此,待估参数从五十万个自由参数降至数千个,且每个参数都基于多得多的数据进行估计。Ledoit–Wolf 等收缩估计方法则提供了另一种互补的稳定估计途径。

好的风险模型不仅能改进优化结果,还能让敞口一目了然:每个持仓的风险都可以分解为来自市场、各行业、各风格因子以及公司自身的部分。投资经理正是借助这种分解,来检验组合风险是否来自预期的来源。

误差最大化及其应对

优化器有一个众所周知的弱点,Richard Michaud 称之为误差最大化。由于优化器追求最高的预期收益风险比,它会倾向于那些 alpha 被高估或风险被低估的仓位。若不加约束,均值-方差优化器会生成集中且不稳定的组合,纸面上看起来非常出色,实际表现却令人失望。

应对方法已相当成熟:

  • 收缩 alpha。 按照 α = IC × σ × z 规则,以符合实际的信息系数(IC)对预测进行缩放,可使预期收益保持适度,并与其可靠程度相称。
  • 采用结构化风险模型。 因子模型与收缩估计能够消除大部分被优化器利用的估计噪声。
  • 施加合理约束。 持仓上限、中性区间与流动性上限,可防止优化器仅凭评分的细微差异就将仓位集中于少数个股。
  • 对交易施加惩罚。 交易成本项将新组合锚定在当前组合附近,使其仅在预期收益超过成本时才发生调整。
  • 检验稳健性。 对输入进行扰动,并确认所得组合随之渐进而非突变,是一种有效的诊断手段。

约束并非没有代价。每一个起作用的约束都会使组合偏离纯粹的预测,而传递系数——即预测与最终持仓之间的相关性——衡量的正是这种偏离程度。严谨的投资流程只施加反映真实风险的约束,并持续监测这些约束损耗了多少预测信息。

交易成本是预测的一部分

对于定期再平衡的策略而言,成本往往决定了一个信号是只在纸面上有效,还是在实践中同样有效。交易成本由几部分构成:佣金与各项费用、买卖价差,以及市场冲击,即自身交易所引起的价格变动。相对于个股日成交量,市场冲击随交易规模呈超线性增长,因此通常采用平方根函数或类似的凸函数进行建模。

在空头一侧,融券费用相当于持有仓位的持续性成本,应计入每个空头仓位的预期收益。一只排名接近末尾、但每年融券成本高达数个百分点的股票,作为空头标的可能还不如一只排名略高、按一般担保品(GC)费率即可融入的股票。

将成本纳入优化过程本身,而非事后扣除,能够以有益的方式改变优化器的行为:它更愿意在流动性好的股票上交易,对交易成本高的股票持仓时间更长,并对排序的细微变化不做再平衡。信号衰减较慢的信号自然会受到青睐,因为其持有期足够长,足以覆盖体现这些信号所需的交易成本。

优化器做不到的事

优化器不能创造 alpha。它无法挽救一份毫无预测能力的排序,其输出的可靠程度也取决于输入的质量。它的作用范围更窄,但在我们看来不可或缺:在给定预测以及对风险和成本的如实刻画之后,它能在投资经理设定的限制范围内,找到最有效地表达该预测的组合。

这正是系统化多空投资刻意将这两个问题分开处理的原因。排序是研究的核心所在;优化则是研究与真实市场约束的交汇之处,在这里,每一项权衡都变得明确、可衡量,并可供审查。


本文仅供信息与教育用途,介绍量化投资的一般概念,不构成出售任何证券或投资顾问服务的要约,亦不构成购买任何证券或投资顾问服务的要约邀请。本文不描述 Zephyr Capital 任何策略的过往业绩或预期业绩。所有投资均涉及风险,包括可能损失本金;卖空涉及亏损超过投资金额的风险。

Suppose we have a reliable ranking of a thousand U.S. stocks. The simplest portfolio would buy the top hundred in equal weights and short the bottom hundred in equal weights. It is transparent and easy to explain, and it leaves a great deal on the table.

Equal weights ignore that one stock is three times as volatile as another, so it contributes far more risk per dollar. Decile sorts ignore that the top of the ranking may be crowded with names from one industry, turning a stock-selection strategy into a sector bet. They ignore that some stocks are cheap to trade and others expensive, that some shorts carry high borrow fees, and that rebuilding the portfolio from scratch each period generates turnover with no corresponding benefit. Each of these is a way the portfolio drifts from the forecast that justified it.

An optimizer addresses all of them at once.

The problem it solves

Portfolio optimization, in the mean-variance tradition that began with Markowitz, chooses weights w to balance expected return against risk and cost. A typical formulation for a long/short book:

maximize αᵀw − λ · wᵀΣw − TC(w − w₀)

subject to constraints such as:

  • net market exposure (dollar or beta) near zero
  • net exposure to each sector within a narrow band
  • exposure to style factors such as size and momentum within limits
  • maximum position size, long and short, often scaled to liquidity
  • gross exposure and portfolio volatility at their targets
  • no positions in stocks that cannot be borrowed

Here α is the vector of expected residual returns derived from the ranking, Σ is the covariance matrix of stock returns, λ sets risk aversion, and TC is the cost of trading from today’s holdings w₀ to the new weights. Each term reflects a real consideration a portfolio manager would weigh by hand; the optimizer weighs them consistently across every stock at once.

The risk model carries the weight

The covariance matrix is the hardest input to get right. A universe of a thousand stocks has roughly half a million pairwise covariances, far more than can be estimated reliably from a few years of returns. A raw sample covariance matrix is dominated by noise, and an optimizer will exploit that noise eagerly.

The standard solution is a factor risk model, of the kind popularized by Barra:

Σ = X F Xᵀ + Δ

Each stock’s return is described by its exposures X to a modest number of common factors (the market, industries, and styles such as size, value, momentum and volatility), the covariance F of those factor returns, and a diagonal matrix Δ of stock-specific variances. Instead of half a million free parameters there are a few thousand, each estimated with far more data. Shrinkage methods such as Ledoit–Wolf offer a complementary way to stabilize estimates.

A good risk model does more than improve the optimization. It makes exposures visible: every position can be decomposed into how much risk comes from the market, from each sector, from each style factor, and from the company itself. That decomposition is how a manager checks that the portfolio’s risk is coming from where it is supposed to.

Error maximization, and how to avoid it

Optimizers have a well-known weakness, which Richard Michaud called error maximization. Because they seek out the highest ratio of expected return to risk, they gravitate toward positions where the alpha is overestimated or the risk underestimated. Left unchecked, a mean-variance optimizer produces concentrated, unstable portfolios that look excellent on paper and disappoint in practice.

The defenses are well established:

  • Shrink the alphas. Scaling forecasts by a realistic information coefficient, as in the α = IC × σ × z rule, keeps expected returns modest and proportionate to their reliability.
  • Use a structured risk model. Factor models and shrinkage remove much of the estimation noise that optimizers exploit.
  • Impose sensible constraints. Position limits, neutrality bands and liquidity caps prevent the optimizer from concentrating in a few names on the strength of small differences in score.
  • Penalize trading. Transaction cost terms anchor the new portfolio to the current one, so it changes only when the expected benefit exceeds the cost.
  • Test robustness. Perturbing inputs and confirming that the resulting portfolio changes gradually, not abruptly, is a useful diagnostic.

Constraints are not free. Every constraint that binds pulls the portfolio away from the pure forecast, and the transfer coefficient, the correlation between the forecast and the final positions, measures how much. A disciplined process imposes constraints that reflect genuine risks and monitors how much forecast they cost.

Trading costs are part of the forecast

For a strategy that rebalances regularly, costs are often the difference between a signal that works on paper and one that works in practice. They have several components: commissions and fees, the bid–ask spread, and market impact, the price movement caused by one’s own trading. Impact grows faster than linearly with trade size relative to a stock’s daily volume, which is why it is commonly modeled with a square-root or similar convex function.

On the short side, borrow fees behave like a continuous cost of holding the position and belong in the expected return of every short. A stock that ranks near the bottom but costs several percent a year to borrow may be a worse short than one ranked slightly higher that borrows at general collateral rates.

Putting costs inside the optimization, rather than subtracting them afterward, changes behavior in useful ways. The optimizer trades more readily in liquid names, holds positions in expensive-to-trade stocks for longer, and lets small changes in the ranking pass without rebalancing. Signals with slow decay are naturally favored, because they can be held long enough to pay for the trades that express them.

What the optimizer does not do

An optimizer does not create alpha. It cannot rescue a ranking with no predictive power, and its output is only as sound as its inputs. Its role is narrower and, in our view, essential: given a forecast and an honest description of risk and cost, it finds the portfolio that expresses that forecast most efficiently within the limits the manager has set.

That is why systematic long/short investing separates the two problems so deliberately. Ranking is where the research lives. Optimization is where research meets the constraints of real markets, with every trade-off made explicit, measurable, and open to review.


This article is for informational and educational purposes only. It describes general concepts in quantitative investing and is not an offer to sell, or a solicitation of an offer to buy, any security or advisory service. It does not describe the past or expected performance of any Zephyr Capital strategy. All investments involve risk, including the possible loss of principal; short selling involves the risk of losses that exceed the amount invested.

更多研究More research

全部研究All research →

2026年9月22日 · 9 分钟阅读Sep 22, 2026 · 9 min read

股票排序:从因子信号到综合预测Ranking Stocks: From Factor Signals to a Composite Forecast

系统化股票策略的起点是一份排序:将股票池中的每只股票按其相对同类的预期表现排列。能否把这份排序做好,很大程度上取决于研究纪律。A systematic equity strategy begins with a ranking: every stock in the universe, ordered by how it is expected to perform relative to its peers. Building that ranking well is mostly a matter of discipline.

阅读全文Read article →

2026年9月8日 · 8 分钟阅读Sep 8, 2026 · 8 min read

系统化多空股票组合的结构剖析The Anatomy of a Systematic Long/Short Equity Portfolio

多空组合并不是在多头组合上附加若干空头头寸,而是一种不同的工具,其设计目的在于剥离出个股收益中真正能够被预测所解释的那一部分。A long/short portfolio is not a long portfolio with some shorts attached. It is a different instrument, built to isolate the part of a stock's return that a forecast can actually explain.

阅读全文Read article →