Alphavo Back

Validation

Stress test

Why

When the baseline cost is light, the cash may only just stay positive. Slippage and funding are raised by steps. Cash is booked again on the same locked rule, to see what remains after it thins.

Formula

Baseline cash

One book for the discovery sample and one for the sealed sample, each starting from 10000. The baseline is not a stress step.

Long cash = (exit price − entry price) × quantity × contract multiplier − fee cash − funding cash
The price term for a short is the opposite

Slippage fraction s = basis points / 10000
Fee cash = notional × rate / 100
Funding cash = notional × rate_8h × bars held / bars per 8 hours

Baseline: taker 0.05, maker 0.02 (percentage points), slippage of 10 basis points, funding rate_8h = 0.0001. A long pays funding. A short receives it. Slippage is applied to the price: a long buys higher and sells lower.

Three slippage steps

2×: 20 basis points, s = 0.002
3×: 30 basis points, s = 0.003
5×: 50 basis points, s = 0.005

Fees and baseline funding stay put. Only s is replaced by the step above. Cash is recalculated on both books.

Two funding steps

rate_8h = 0.0002
rate_8h = 0.00086

0.0001 is the baseline. It is not stress. These two steps recompute funding cash at the new rate. Slippage stays at 10 basis points.

Pass

Each step, each book:
  Net cash > 0
  No liquidation

The three slippage steps and the two funding steps must pass on both the discovery sample and the sealed sample. If one step loses money, liquidates, or does not compute, this set does not remain. Compounding does not change the criterion of this gate.