A trade can have a positive payoff at delivery and still run out of cash before delivery. Suppose a firm buys inventory and sells the matching futures: the price difference yields CNY 600 at delivery, and the assumed complete costs are CNY 300. Why might its futures account later need another CNY 540?一笔到期能赚钱的交易,也可能在到期前缺钱。假设一家企业买入一批现货,同时卖出数量匹配的期货:按到期交割计算,价差收入为600元,假设全部成本为300元。为什么它的期货账户后来还可能需要补入540元?
The answer connects contract rules, daily settlement and arbitrage pricing. Follow the cash before judging the model. This article covers exchange-traded futures in mainland China; all numerical examples are constructed, with rules checked on 6 November 2026. They are neither current quotes nor a historical strategy backtest.答案藏在合约规则、每日结算与套利定价的连接处。理解模型之前,先追踪现金。本文以中国内地交易所期货为范围,规则核对日期为2026年11月6日。所有数值例子均为构造算例,不是实时行情,也不是历史策略回测。
Start with what one contract represents先弄清一手合约代表什么
A futures contract fixes the underlying, quantity, quotation unit, delivery month and settlement terms. A long position gains when its futures price rises; a short position gains when it falls. Opening creates a position; closing offsets an existing position. Selling to open and selling to close are different instructions.期货合约规定标的、数量、报价单位、交割月份和结算条款。建立多头后,期货价格上涨带来盈利;建立空头后,价格下跌带来盈利。开仓建立持仓,平仓了结已有持仓。“卖出开仓”和“卖出平仓”是不同的指令。
- Quantity and tick数量与最小变动价位
- Read the multiplier and quotation unit together. A tick is the smallest permitted price change; tick value equals tick size times the multiplier.合约乘数要和报价单位一起看。最小变动价位是一档报价的大小;每手一档的盈亏,等于最小变动价位乘以合约乘数。
- Contract month合约月份
- Different months are separate instruments. A continuous or “main contract” chart is a data series, not an orderable contract that rolls itself.不同月份是不同合约。“主连”或连续行情是一条数据序列,不能把它当成会自动换月的可交易合约。
- Margin and access保证金与交易权限
- Margin reserves collateral rather than paying the full purchase price. Investor eligibility, position limits and the broker’s margin schedule must be checked for the specific product.保证金用于履约担保,不是付清标的价款。能否交易、持仓限额和期货公司的保证金标准,都要按具体品种确认。
- Session and fees交易时段与手续费
- Same-day closing is generally possible. Night sessions and the definition of a trading day vary; opening, closing and closing today’s positions can carry different fees.通常可以当天开仓、当天平仓。夜盘安排与交易日归属要按品种核对,开仓与平仓的手续费可能不同,平掉当日新仓与平掉此前持仓的手续费也可能不同。
- Expiry and settlement到期与交割
- Contracts end in physical delivery or cash settlement. The trading lot and the delivery unit can differ. Personal accounts may have to close before the last trading day.合约到期采用实物交割或现金交割。交易单位与交割单位可能不同,个人账户也可能需要在最后交易日之前平仓。
The SHFE settlement rules define daily settlement and minimum client margin; the risk-control rules cover limits and liquidation. The delivery rules restrict natural-person delivery positions. Product-specific provisions and current notices take precedence over a generic timetable. A price limit constrains permitted quotations; it does not guarantee an exit fill.上期所结算办法规定每日结算和客户保证金下限,风险控制办法规定限仓与强平等机制,交割办法限制自然人的交割持仓。具体品种条款与最新通知优先于概括性的时间表。涨跌停板限制可申报的价格,并不保证平仓委托能成交。
For a concrete distinction, the SHFE rebar specifications set a trading lot of 10 tonnes but a delivery unit of 300 tonnes. Trading one lot does not make one lot independently deliverable. The exchange’s trading guide explains same-day opening and closing; its older numerical schedules should not replace current product notices.一个具体区别是:上期所螺纹钢业务细则规定交易单位为10吨/手,交割单位却是300吨。可以交易一手,不代表这一手能够单独交割。交易所的合规交易指南解释了当日开平仓机制;其中较早的数值标准不能代替当前品种通知。
For the following arithmetic, assume an illustrative contract quoted in CNY per tonne, with 10 tonnes per lot. Its price is 2,000 and its margin rate is 10%. These assumptions do not specify a tradable product or its delivery unit.下面先假设一份用于讲解的合约:按元/吨报价,每手10吨,价格为2,000,保证金比例为10%。这些假设不对应某个实际品种,也没有规定它的交割单位。
P is the quoted price, M the quantity per lot, N the number of lots, V the notional value, m the margin rate and G the required margin. A 1% adverse price move loses CNY 200: 10% of the initial margin. Account return depends on all capital allocated, not just the minimum collateral.P是报价,M是每手数量,N是手数,V是名义价值,m是保证金比例,G是所需保证金。价格向不利方向变化1%,一手亏损200元,相当于初始保证金的10%。账户收益率的分母应考虑分配给交易的全部资金,不能只看最低保证金。
Daily settlement turns price changes into cash flows每日结算怎样改变账户现金
Now buy one lot of this contract and deposit CNY 3,000 in the futures account. Ignore fees in this example, make no further deposits or withdrawals after opening, and keep the margin rate at 10%. Let the first two settlement prices be 2,040 and 1,980. The daily profit is measured from the previous settlement price; opening-day profit starts from the trade price.现在以买入一手该合约为例,在期货账户存入3,000元。本例忽略手续费,开仓后不再入金或出金,保证金比例始终为10%;随后两天的结算价分别为2,040和1,980。持仓每天的盈亏从上一结算价计算,开仓当日则从成交价计算。
E is account equity after settlement; A is available funds after required margin. In a real ledger, fees, transfers and other positions also enter these balances. The settlement price follows the exchange’s calculation method and need not equal the last traded price.E是结算后的账户权益,A是扣除所需保证金后的可用资金。真实账户还要计入手续费、资金转入转出和其他持仓。结算价由交易所按规则计算,不一定等于当天最后一笔成交价。
| Time时点 | Price价格 | Daily P&L当日盈亏 | Equity账户权益 | Margin保证金 | Available可用资金 |
|---|---|---|---|---|---|
| Opening开仓 | 2,000 | — | 3,000 | 2,000 | 1,000 |
| Day 1第1日 | 2,040 | +400 | 3,400 | 2,040 | 1,360 |
| Day 2第2日 | 1,980 | −600 | 2,800 | 1,980 | 820 |
Prices are CNY/tonne; account amounts are CNY. Day 2 loses CNY 600 from the previous day, while the total loss since entry is only CNY 200. Required margin is reserved inside equity, not charged again as an expense. Do not subtract it twice.价格单位为元/吨,其余金额单位为元。第2日相对前一日亏损600元,但从开仓至今合计只亏损200元。保证金是账户权益中被占用的部分,不是再扣一次的费用,计算时不能重复扣除。
If losses or a higher margin rate drive available funds below the required level, the broker may require replenishment or position reduction, and can liquidate under the applicable rules. A closing order may fail to execute during a one-sided limit market. A loss therefore need not stop at the original margin deposit.如果亏损或保证金比例上调导致资金不足,期货公司可能要求补款或减仓,并按适用规则执行强平。单边涨跌停时,平仓委托也可能无法成交。因此,损失并不以最初缴纳的保证金为上限。
Cash-and-carry: lock a sale price, fund the entire path期现套利:锁住卖价,也要撑住资金过程
Return to the firm in the opening example. It can buy eligible inventory at
Assume the delivered goods meet the contract terms, with no separate quality or location adjustment. Let
C is the complete cost of carrying out the trade. The CNY 300 net result assumes C=300 and matched delivery terms. Next, build that budget and check whether the trade can stay funded until delivery.C是完成这笔交易的全部成本。净赚300元,前提是成本确实为300元,而且交割条件能够匹配。下面先把这份预算算出来,再检查资金能否撑到交割。
Build the CNY 300 cost budget300元成本,具体怎么算?
Return to the matched delivery case and assume a 60-day holding period. To make every financing charge visible, suppose the firm has arranged a CNY 25,000 loan for all 60 days at 3.65% annual simple interest: CNY 20,000 buys inventory and CNY 5,000 funds the futures account and liquidity reserve. Idle cash earns nothing. These are assumed financing terms, not a lending quote. Keep tax treatment consistent and assume no additional net tax expense in this example.回到能够匹配交割的情形,假设持有60天。为了把资金成本算全,设企业已安排一笔25,000元、占用完整60天的借款,按年利率3.65%计单利:20,000元买货,5,000元用于期货账户和备用现金,闲置资金不计利息。这是演算用的融资条件,不是贷款报价;各项价格采用一致的税务处理,并假设本例没有额外的净税费支出。
| Item项目 | Calculation计算 | Cost金额 |
|---|---|---|
| Inventory financing货款融资 | 20,000 × 3.65% × 60 / 365 | 120 |
| Futures and reserve financing期货与备用金融资 | 5,000 × 3.65% × 60 / 365 | 30 |
| Storage · CNY 0.15/t/day仓储 · 每吨每天0.15元 | 0.15 × 10 × 60 | 90 |
| Other applicable charges其余适用费用 | Assumed total: insurance, logistics, trading and delivery保险、物流、交易与交割费用,假设合计 | 60 |
| Complete cost C全部成本C | 120 + 30 + 90 + 60 | 300 |
The budget is CNY 30/t, so the break-even futures sale price is 2,000+30=2,030. Selling at 2,060 leaves CNY 30/t, or CNY 300 for 10 tonnes. This is a break-even threshold for this funded trade, not a universal fair price. Before execution, use an obtainable cash purchase price and futures sale price, include the applicable tax cash flows, and replace every assumed charge with a verified quote or a stress estimate.每吨成本为30元,因此期货卖价达到2,000+30=2,030,才刚好保本。按2,060卖出,剩下每吨30元,10吨共300元。这是本例这笔交易的保本线,不是所有交易者共同的合理价格。执行前,要使用能够买到现货、卖出期货的价格,核对实际税款收付,再把表里的假设费用逐项替换为已确认的报价或压力估计。
For a storable asset, a simplified carrying-cost benchmark is F*=
Reconcile the capital and the final cash把本金、补款和最后收到的钱对上
Now inspect the cash path. Start the futures account with CNY 3,060: CNY 2,060 of margin and CNY 1,000 available. In a constructed price path, futures rise to 2,200. Keep the margin rate at 10% and exclude fees from this account snapshot. The short loses CNY 1,400; equity falls to 1,660 while required margin rises to 2,200. The shortfall is CNY 540.现在检查资金过程。期货账户初始存入3,060元,其中2,060元被保证金占用,可用资金为1,000元。在一条构造路径中,期货升至2,200。保证金比例仍为10%,这张账户快照暂不扣手续费。空头累计亏损1,400元,账户权益降至1,660元,所需保证金却升至2,200元,缺口为540元。
If spot rises by the same CNY 140 per tonne, inventory gains CNY 1,400 on paper. That gain offsets the futures loss economically but cannot automatically pay the margin call. Selling the inventory early changes the original delivery strategy; borrowing more can change C. A workable arbitrage plan therefore needs both a terminal profit calculation and a funded liquidity path.如果现货也上涨140元/吨,库存账面增值1,400元。它在经济上抵消了期货亏损,却不能自动用来补保证金。提前卖掉库存会改变原来的交割方案,临时借款也可能改变成本C。因此,一套可执行的套利方案,必须同时说明最终利润和全过程的资金来源。
Allocate the CNY 25,000 at entry: CNY 20,000 pays for goods, CNY 3,060 enters the futures account, and CNY 1,940 stays outside as a cash reserve. When the CNY 540 shortfall occurs, transfer it from that reserve. The reserve falls to CNY 1,400; no new principal is borrowed. This transfer is not a second loss or a fee—the futures loss has already reduced account equity.开仓时,把25,000元分为三部分:20,000元付货款,3,060元转入期货账户,1,940元留在账户外备用。出现540元缺口时,从备用金转入540元,备用金剩下1,400元,并未新增借款。这次转账不是又亏了一次,也不是手续费;期货亏损已经反映在账户权益中。
Now suppose delivery occurs at 2,100 after 60 days. The goods bring in CNY 21,000; the short futures position has lost CNY 400 in total. Once settlement is complete and collateral is released, the futures account returns 3,060+540−400=CNY 3,200. For this cash reconciliation, assume interest and all other costs are paid at the end.再假设60天后按2,100交割。货物收到21,000元,期货空头从开仓到交割累计亏400元。结算完成、保证金解除占用后,期货账户可收回3,060+540−400=3,200元。为了核对最终现金,本例将利息和其他费用都安排在最后支付。
| Cash item现金项目 | Amount金额 |
|---|---|
| Goods sold收到货款 | 21,000 |
| Futures account released收回期货账户资金 | 3,200 |
| Remaining cash reserve剩余备用金 | 1,400 |
| Pay all costs, including interest支付全部成本,含利息 | −300 |
| Repay loan principal归还借款本金 | −25,000 |
| Profit remaining最终利润 | 300 |
Net profit divided by total capital committed is 300/25,000=1.2% over 60 days. This is not a return on the firm's equity: the example uses borrowed capital and has already deducted its interest. The CNY 5,000 allocation is enough for this particular futures-price path, not every possible path. A larger adverse move, a higher margin rate, earlier fee payments or delayed cash receipts requires a new funding calculation.净利润除以全部投入资金,是300÷25,000=1.2%,对应60天。这不是股东自有资金收益率:本例投入的是借款,且利润已扣除借款利息。5,000元的期货与备用资金只够应付给定的价格路径,不是资金需求的上限。价格进一步不利变动、保证金比例提高、费用提前支付或货款延迟到账,都要重新检查资金是否够用。
What changes if the trade ends before delivery?不走交割,提前平仓会怎样?
The earlier result relies on delivering eligible goods under matched terms. An inventory holder who exits early instead sells the goods in the cash market and buys to close the short futures position. The two exit prices can differ. Define the basis as the cash price minus the futures price, b=S−F. The initial basis is −60 CNY/t; the combined result depends on how that basis changes.前面的结果依赖于货物能够按匹配的条件交割。如果库存持有人提前退出,就要在现货市场卖掉货物,同时买入平仓,了结原来的期货空头。两边的退出价格可能不同。把“现货价减期货价”称为基差,记作b=S−F。开仓时基差为−60元/吨;组合能赚多少,取决于退出时基差变成多少。
Here t is the early exit time and Cₜ is the total cost incurred by then. Keep Q=10 tonnes and suppose futures close at 2,100 in all three cases. The futures leg loses CNY 400 each time; different cash sale prices determine the combined outcome. To isolate this basis effect, hold costs at CNY 300 in this table.t表示提前退出的时点,Cₜ是截至退出时发生的全部成本。数量仍为10吨,下面三种情形都按2,100平掉期货空头,因此期货一腿都亏400元;现货实际卖价不同,组合结果就不同。为单独看清基差的影响,表中暂把成本固定为300元。
| Cash sale price现货卖价 | Exit basis退出基差 | Combined gross P&L两腿合计毛损益 | Net after costs扣费后净额 |
|---|---|---|---|
| 2,100 | 0 | +600 | +300 |
| 2,080 | −20 | +400 | +100 |
| 2,050 | −50 | +100 | −200 |
In the last case, cash prices rose by 50, yet the combination lost money after costs: the basis strengthened by only 10, too little to cover CNY 30/t of costs. This is why a hedge replaces much of the outright price exposure with basis risk. Actual early-exit costs must be recalculated for the shorter holding period and the new sale route. The CFTC glossary defines basis risk as unexpected changes in the cash–futures relationship. Local grade, location and freight differences can leave a nonzero basis even near expiry.最后一种情形中,现货明明上涨了50元,组合扣费后却亏了钱:基差只从−60升到−50,改善的10元不足以覆盖每吨30元成本。这就是套期保值为什么仍有基差风险。实际提前退出时,持有天数和销售方式变了,成本也必须重算。CFTC术语表把基差风险解释为现货与期货价格关系发生非预期变化的风险。品质、地点与运费差异,也可能使当地现货在临近到期时仍有非零基差。
A personal futures account with no physical inventory has no cash-sale leg to offset its futures P&L. It must close within the permitted holding period and cannot use the delivery-profit identity to claim a locked return. Buying to close a short removes that existing position; it is not the same order as buying to open a new long.如果个人只是交易期货,没有持有现货,就不存在现货卖出所得这一腿,不能套用前面的交割利润等式,声称收益已经锁定。持仓应在允许的期限内了结。“买入平仓”是把已有空头平掉,和另建多头的“买入开仓”不同。
The reverse cash-and-carry trade requires borrowing and selling the physical asset, investing usable sale proceeds, and buying futures to obtain the asset for return at maturity. Borrowing fees, collateral restrictions and recall or delivery terms determine whether it is feasible. A convenience benefit from holding inventory is usually non-cash: it can explain pricing, but cannot simply be deducted as money received in the cash budget.反向期现交易需要先借入现货并卖出,运用可自由使用的卖出所得,同时买入期货,到期取得货物后归还。借货费用、抵押限制、提前召回与交割条款,都会影响可行性。持有库存带来的便利收益通常属于非现金利益:它可以解释定价,却不能直接当成现金收入,从资金预算中扣掉。
Calendar spreads: specify which difference you trade跨期套利:先把价差方向写对
Different delivery months respond to different inventory and supply conditions. A near-term shortage may support the nearby contract while expected new supply restrains a later one. A calendar spread trades this relative movement. Unlike the matched delivery identity above, two contracts expiring on different dates have no obligation to finish at the same price. CME’s spread overview distinguishes calendar, intercommodity and processing spreads.不同交割月份面对不同的库存和供给条件。近期缺货可能支撑近月,未来增产预期则可能压制远月。跨期组合交易的是这种相对变化。与前面的交割等式不同,两个到期日不同的合约,没有最终价格必须相等的约束。CME价差交易介绍区分了跨期、跨品种与产业链组合。
Use an independent example quoted in CNY/tonne: nearby 4,000 and deferred 4,100. Define D=deferred−nearby. Buy 10 tonnes of nearby exposure and sell 10 tonnes of deferred exposure, then close both at the same later time. Nearby closes at 4,050 and deferred at 4,110.另取一个独立算例,报价单位仍为元/吨:近月4,000,远月4,100。约定D=远月−近月。买入10吨近月敞口、卖出10吨远月敞口,之后在同一时点平掉两腿,平仓价格分别为近月4,050、远月4,110。
Buying nearby and selling deferred benefits when D narrows; reversing the position benefits when D widens. Both prices can rise while the first combination makes money. If they rise by the same amount, gross spread profit is zero and trading costs still apply.买近卖远在D缩小时获利,反向组合在D扩大时获利。两个价格都上涨,前一种组合仍可能赚钱;如果两者上涨幅度相同,价差毛利为零,交易成本仍要支付。
Change the closing prices改变平仓价,看两腿怎样合成盈亏
Entry: nearby 4,000, deferred 4,100 CNY/t. One lot on each leg, 10 t/lot. Bars share a CNY scale with zero at the center.开仓:近月4,000,远月4,100元/吨。两腿各一手,每手10吨。条形共用金额尺度,中线为零。
- Closing spread · deferred − nearby平仓价差 · 远月−近月
- 60CNY/t元/吨
- Deferred break-even close远月盈亏平衡价
- 4,146CNY/t元/吨
In the default calculation, costs are CNY 4 per tonne of exposure. With nearby closing at 4,050, the long-nearby/short-deferred position breaks even at deferred 4,146: the spread must narrow from 100 to 96 to cover costs. This calculator holds entry prices, lot size and matched quantity fixed. It computes closing P&L; it does not simulate margin calls or forecast either price.默认算例的成本折合每吨敞口4元。近月按4,050平仓时,买近卖远组合的远月盈亏平衡价为4,146:价差必须从100缩到96,才够覆盖成本。计算器固定开仓价、每手数量与匹配数量,只计算平仓盈亏,不模拟追加保证金,也不预测价格。
Why investigate a CNY 100 spread?100元的价差,为什么值得研究?
Keep the same entry prices: nearby 4,000, deferred 4,100 CNY/t. An eligible business may be able to receive deliverable inventory in the nearby month, store it for 30 calendar days and deliver it against the deferred short. This creates an economic comparison: how much more does the later sale pay than carrying the goods costs? The following constructed budget assumes matched grades, warehouses, quantities and invoices, secured storage and financing, and CNY 4,000/t as the funding base.沿用近月4,000、远月4,100元/吨的开仓价。有交割资格的企业,可以研究近月接货、保存30个自然日、再向远月空头交货的方案:晚一个月卖货,多收的钱是否超过保存这批货的成本?下面构造一份预算,假定品质、仓库、数量和发票均能匹配,仓容与融资已经落实,资金占用按每吨4,000元估算。
| Item项目 | Calculation计算 | Cost成本 |
|---|---|---|
| Inventory financing货款融资 | 4,000 × 3.65% × 30 / 365 | 12 |
| Storage仓储 | 0.8 × 30 | 24 |
| Agreed delivery / handling fees已约定的交割及操作费 | Assumed fixed charge假设费用已确定 | 4 |
| Base carry budget基础持有预算 | 12 + 24 + 4 | 40 |
| Stressed budget压力预算 | 40 + 20 assumed extra costs40 + 假设增加的20元成本 | 60 |
A spread of 100 exceeds this illustrative carry budget of 40–60, giving inventory-capable firms a reason to investigate buying nearby and selling deferred. It is not an observed fair-value range or an all-in locked profit: margin financing, execution costs and any omitted tax or logistics effects still need pricing. Actual delivery funding can also differ from the entry quote. If those conditions change, recalculate the budget. A futures-only trader cannot compel convergence; 60 is a candidate exit scenario, not a price forecast guaranteed by the carry calculation.100高于这份40–60元的持有预算,因此可能吸引有库存能力的企业研究买近卖远。这不是实测合理区间,也未锁定净利润:保证金融资、成交成本及未覆盖的税费和物流差异还要另算,实际交割占款也可能偏离开仓报价。条件变化就应重算。只交易期货的人不能强制价差收敛;60只是候选退出情景,不是成本公式保证的预测。
For the futures-only position, retain 10 tonnes on each leg and CNY 40 total round-trip trading costs. This CNY 40 is a separate trading expense, not the CNY 40-per-tonne physical carry budget above. Closing outcomes follow directly from:对只做期货的组合,两腿仍各10吨,往返交易总成本仍为40元。这里的40元是整笔交易费,与上表每吨40元的货物持有预算不同。平仓净额为:
| Closing spread · CNY/t退出价差 · 元/吨 | Scenario情景 | Net P&L · CNY净盈亏 · 元 |
|---|---|---|
| 40 | Further narrowing进一步收窄 | +560 |
| 60 | Candidate exit候选退出 | +360 |
| 100 | Unchanged spread价差未变 | −40 |
| 160 | Adverse widening反向扩大 | −640 |
A complete hypothesis also needs a deadline and invalidation conditions. For example: close at a spread of 60, otherwise exit within 20 trading days and always before the account’s mandatory exit deadline; reassess immediately if inventory availability, storage or delivery matching fails. The 30 calendar days describe physical carrying time, while 20 trading days are a separate assumed position limit. A spread of 160 is a stress scenario, not a guaranteed loss cap. The remaining research task is to establish why available inventories and the delivery schedule could move the spread within that holding window; the arithmetic alone does not justify entry.还要给判断加上期限和失效条件。例如:价差到60退出,否则最多持有20个交易日,且必须早于账户的强制退出日;库存、仓容或交割匹配条件失效,立即重估。30个自然日是货物保存期,20个交易日是另设的持仓期限。价差160只是压力情景,不是最大亏损保证。开仓前仍须解释,现有库存和交割排期为什么可能在持有期内促使价差收窄;盈亏算对并不等于开仓理由成立。
Build other spreads from an economic relationship从经济联系构造其他套利组合
Processing margins and substitutes加工利润与替代关系
A processor can lock the purchase-and-sale price difference by matching raw-material purchases with output sales; realized profit also depends on yields and processing costs. Let
G is profit per tonne of raw beans;
Substitution spreads, such as related oils, use another link: buyers may switch when relative prices change. But quality, regulation and end-use requirements limit substitution. Correlation is a starting observation; the economic mechanism determines when it should persist.替代品价差依靠另一种联系:相对价格变化后,买方可能改用其他原料,例如在部分用途下调整不同油脂的使用比例。但品质、监管和终端用途会限制替代。相关性只是观察起点,经济机制决定这种关系在什么条件下能够持续。
Cross-market prices need a common basis跨市场价格先统一可比条件
A price in USD per tonne cannot be subtracted directly from a price in CNY per tonne. Convert currency and units, then include freight, insurance, duties, VAT treatment, quality and location adjustments, and settlement timing. Foreign-exchange hedging has costs and maturity requirements. A positive displayed difference is only a candidate until the physical or financial transfer can actually be completed.美元/吨的报价不能直接减去人民币/吨的报价。先统一汇率与单位,再计入运费、保险、关税、增值税处理、品质与地点调整,以及结算时间差。汇率对冲本身也有成本和期限要求。只有相关货物或金融头寸能够实际转移并完成结算,屏幕上的正价差才有进一步研究的意义。
Statistical arbitrage tests whether a relationship survives统计套利检验价差关系能否持续
Statistical arbitrage is a modeling method that can be applied to calendar or cross-product spreads. Begin with a price relationship, not a trading threshold. For prices
The estimated mean
A minimal mean-reversion model writes X at the next time as its long-run mean plus a fraction
For
Follow one statistical spread trade from estimation to exit把一次统计价差交易从估计走到平仓
In practice, first align earlier daily prices of two specified contracts in the same currency and unit. Fit A's price on B's price with an intercept, then retain the slope as
To complete the arithmetic, assume
The hedge coefficient applies to quantities, not directly to lots. Below, N denotes lots, M denotes tonnes per lot, and k is the total A-leg tonnage. Each lot of A needs 1.6 lots of B, so selling 5 lots of A and buying 8 lots of B gives 50 tonnes of A against 40 tonnes of B. With this fixed position, each CNY 1/tonne decline in X earns CNY 50 before costs. Smaller positions rounded to whole lots leave an unmatched exposure; changing
Set the rules before seeing the outcome: enter the short-spread position at 2≤z<4, with no new entry at z≥4; seek an exit at z≤0.5; attempt a stop at z≥4; and close after 15 trading days or at an earlier contract or broker holding deadline. These thresholds are only a teaching specification, not recommended settings. Signals can be acted on only after their inputs become available, and a stop level does not guarantee a fill. For the conditional calculations below, both legs are assumed executable at the listed reference prices, with CNY 200 deducted for the complete round trip, including fees, spread and slippage.先写规则,再看结果:2≤z<4时建立做空价差的组合,z≥4不再新开仓;z≤0.5时计划止盈退出;z≥4时尝试止损;持有15个交易日,或更早到达合约、期货公司的持仓期限时退出。这些阈值只用于教学演算,不是推荐参数。信号所需的信息出现后才能下单,触及止损线也不等于一定能够成交。下表假设两腿能够按列出的参考价完成交易,再统一扣除200元完整往返成本,其中包括手续费、买卖价差与滑点。
| Measure项目 | Entry开仓 | Planned exit达到退出线 | Adverse exit达到止损线 |
|---|---|---|---|
| A priceA价格 | 4,100 | 4,150 | 4,140 |
| B priceB价格 | 5,000 | 5,100 | 5,000 |
| Spread X价差X | 100 | 70 | 140 |
| z-score标准化z值 | 2 | 0.5 | 4 |
| A short P&L · CNYA空头损益 · 元 | — | −2,500 | −2,000 |
| B long P&L · CNYB多头损益 · 元 | — | +4,000 | 0 |
| Gross P&L · CNY毛损益 · 元 | — | +1,500 | −2,000 |
| Round-trip cost · CNY完整往返成本 · 元 | — | 200 | 200 |
| Net P&L · CNY净损益 · 元 | — | +1,300 | −2,200 |
In the planned exit, both prices rise. The short A leg loses CNY 2,500, but the long B leg earns CNY 4,000; the relative move earns CNY 1,300 after costs. In the adverse exit, A rises while B stays flat, so X widens and the position loses CNY 2,200 after costs. These are alternative outcomes of the same entry, not consecutive observations from a backtest.达到退出线的情形中,两个价格都上涨了。A空头亏损2,500元,B多头却赚了4,000元,相对价格变化使组合扣费后仍盈利1,300元。达到止损线的情形中,A上涨而B不动,X继续扩大,组合扣费后亏损2,200元。两列代表同一次开仓的两种可能结果,不是某次回测中先后发生的行情。
The half-life is not the holding period. At entry X is 40 above its assumed mean of 60. A half-life of about 6.58 trading days reduces that deviation to 20 in conditional expectation, giving X≈80, not 60—and still above the planned exit at 70. Individual paths may cross the exit sooner, later, or never before the deadline. A change in supply conditions may invalidate the mean or
A real test must then move forward in time: estimate on earlier observations, keep the parameters and rules fixed for the test interval, and evaluate later unseen prices using executable orders, margin cash flows and complete costs. Report net P&L, drawdown and peak funding needs across all trades, including failed exits and expiry-driven closures. The arithmetic above establishes how one position earns or loses money; only that out-of-sample record can test whether the entry rule has repeatable value.真正的检验还要按时间向前推进:用更早的数据估计,在测试区间保持参数与规则不变,再用未参与选择参数的后续行情,结合可执行委托、保证金现金流与完整成本评价。结果必须包含所有交易的净损益、回撤和峰值资金需求,也包括未能及时退出、因持仓期限而被迫平仓的情形。上面的算术解释了这组头寸怎样赚钱或亏钱;入场规则是否具有可重复的价值,还要由这种样本外记录检验。
A model becomes a strategy only after execution and funding把模型变成策略,还缺成交与资金约束
For the two-leg calendar example, net realized trading P&L is the sum of each leg’s multiplier-adjusted price change minus complete trading costs. Compute it from actual contract prices and fills. A back-adjusted continuous series is useful for research, but its artificial roll adjustments must not be booked as tradable profit.对前面的两腿跨期组合,实际交易净盈亏等于两腿按乘数换算后的价格损益之和,再减去完整交易成本。应从真实月份合约价格与成交记录计算。复权连续行情可以辅助研究,但换月时人为加入的调整,不能记为可交易利润。
- Signal timing信号时点
- A signal calculated from a closing price can trade only after that information exists. Use subsequent executable quotes and account for latency.用收盘价算出的信号,只能在该信息形成之后交易。使用后续可成交报价,并考虑决策与下单延迟。
- Two-leg execution两腿成交
- A filled first leg leaves directional exposure until the second fills. Model partial fills, rejected orders and a time limit for completing or unwinding the pair.第一腿成交、第二腿未成交时,会留下单边敞口。需要模拟部分成交、拒单,以及补齐另一腿,或平掉已成交持仓的时限。
- Costs完整成本
- Include both legs’ opening and closing fees, bid–ask spread, impact, and relevant funding. If fills already use bid/ask prices, do not add the same spread again.计入两腿开平手续费、买卖价差、冲击成本与适用资金成本。若成交价已采用买一卖一,不要把同一项买卖价差重复计入成本。
- Capital资金安排
- Track daily equity, required margin, available cash and the deadline for replenishment. Stress higher margin rates and prices moving against both legs’ intended relative position.逐日记录权益、所需保证金、可用现金与补款期限。压测保证金提高,以及价差继续向不利方向变化的情况。
- Expiry and exit到期与退出
- Specify a last holding date, roll costs and model-invalidation conditions. Price limits or missing liquidity can prevent a stop from executing.明确最晚持仓日、换月成本与模型失效条件。涨跌停或流动性不足可能使止损委托无法成交。
- Independent evaluation独立评价
- Use time-ordered development and test periods. Report net return on committed capital, drawdown, peak cash need, turnover and performance by market regime.按时间划分开发与测试区间。报告相对于分配资本的净收益、最大回撤、峰值资金需求、换手,以及不同市场状态下的表现。
For a physical cash-and-carry trade, capital includes inventory funding as well as margin and liquidity reserves. For a futures-only spread, add both legs’ collateral needs under the actual offset rules and a cash buffer. Report the holding period alongside any return; profit divided by the smallest opening margin can make a capital-intensive trade look misleadingly attractive.实物期现套利需要现货资金、保证金和流动性准备;纯期货组合则要按真实抵扣规则核算两腿保证金,并准备现金缓冲。报告收益率时同时交代持有期限。用利润除以开仓时最低保证金,会把占用大量资金的交易包装成很高的回报。
Three checks before trusting an arbitrage claim用三个问题检验是否真正理解
Futures trade above spot. Is that enough?期货比现货贵,就能套利吗?
No. In the opening example the gross difference is CNY 600. If complete costs rise from 300 to 650, the same price pair loses CNY 50. Delivery compatibility and executable prices must be checked before the subtraction is meaningful.不能。开头算例的毛价差为600元,若完整成本从300元升至650元,同样的价格组合会亏损50元。在相减之前,还必须确认交割匹配与报价可成交。
Both months rise by CNY 50 per tonne. What happens?远近月都上涨50元/吨,组合赚多少?
For the earlier long-nearby/short-deferred position of 10 tonnes per leg, one leg earns CNY 500 and the other loses CNY 500. Gross P&L is zero; with CNY 40 of complete round-trip trading costs, net P&L is −40.对前面两腿各10吨的买近卖远组合,一腿赚500元,另一腿亏500元。毛利为零;若两腿完整往返交易成本为40元,净亏损就是40元。
A spread is three standard deviations from its mean. Must it revert?价差偏离均值三个标准差,一定会回归吗?
No. The mean or hedge coefficient may have changed, the sample may understate tail risk, or expiry may arrive first. Recheck the economic mechanism, the information available at the signal time and the funding needed if the deviation widens.不一定。均值或对冲系数可能已经改变,样本可能低估尾部风险,也可能先到持仓期限。需要重新检查经济机制、信号时刻可获得的信息,以及偏离继续扩大时的资金需求。
The opening firm earns the assumed CNY 300 only if the matching sale and complete cost assumptions hold through delivery. The CNY 540 shortfall is a different calculation: cash needed at an intermediate settlement. Evaluate every proposed arbitrage on both dimensions—what ties the prices together, and how the position survives until that relationship can be realized.开头那家企业能否得到假设的300元,取决于匹配销售与完整成本的条件能否一直成立到交割。540元缺口回答的是另一件事:中途某次结算需要补多少现金。评价一套套利模型,需要同时查明两点:什么机制约束价格关系,以及资金如何支持持仓等到这种关系兑现。
Sources and calculation files原始资料与计算底表
The rules below are SHFE examples, not a substitute for each exchange’s product rules or a broker’s current notice. The model examples are educational arithmetic; no market edge, future return or account eligibility has been established.下列规则以上期所为例,不能替代其他交易所的品种规则或期货公司的最新通知。文中模型用于解释计算关系,没有证明市场优势、未来收益或某个账户的交易资格。
- SHFE Settlement Rules · daily settlement, margin and combinations上期所结算管理办法:每日结算、保证金与组合计收
- SHFE Risk Control Rules · margin changes, limits and liquidation上期所风险控制管理办法:保证金调整、限仓与强平
- SHFE Delivery Rules · eligibility and delivery process上期所交割管理办法:交割资格与流程
- CFTC Futures Glossary · basis and basis riskCFTC期货术语表:基差与基差风险
- CME · calculating stock-index futures fair valueCME:股指期货公允价值计算
- Aswath Damodaran · futures arbitrage and implementation limitsAswath Damodaran:期货套利与执行限制
- CME · futures spread overviewCME:期货价差交易分类
- Avellaneda & Lee · Statistical Arbitrage in the U.S. Equities MarketAvellaneda与Lee:美国股票市场的统计套利研究
- Constructed example data · basis, costs, funding and spread P&L构造算例底表:基差、成本、资金流水与价差盈亏
- Download the Python arithmetic checks · standard library only下载Python算术核对脚本:仅需标准库

