Arbitrage Trading Decision Model

 

                                                   Directly taken from my Kaggle notebook


The formula can be adapted into an arbitrage-trading decision model like below, but by itself it is not an arbitrage formula.

R(t)=Rmaxm(t)=Rmax7i=17si(t)R(t)=R_{\max}m(t) =\frac{R_{\max}}{7}\sum_{i=1}^{7}s_i(t)

where the 7 signals si(t)s_i(t) are normalized signals and R(t)R(t) is a dynamically calculated risk/reward/allocation value.

For arbitrage, I would use the same concept like this:

A(t)=17i=17si(t)A(t)=\frac{1}{7}\sum_{i=1}^{7}s_i(t)

where the signals could be:

  1. Price spread

  2. Bid/ask spread

  3. Trading fees

  4. Slippage

  5. Market liquidity

  6. Transfer/settlement latency

  7. Historical spread reliability

Then calculate the actual arbitrage profit:

Parb=Q(PsellPbuy)FbuyFsellSbuySsellCtransferP_{\text{arb}}= Q(P_{\text{sell}}-P_{\text{buy}}) -F_{\text{buy}}-F_{\text{sell}} -S_{\text{buy}}-S_{\text{sell}} -C_{\text{transfer}}

and the net arbitrage percentage:

ROIarb=ParbQPbuy×100ROI_{\text{arb}}= \frac{P_{\text{arb}}}{Q P_{\text{buy}}}\times100

For example:

ParameterExchange AExchange B
Buy price$100,000
Sell price$100,800
Quantity0.10 BTC0.10 BTC
Gross spread$80

Gross profit:

0.10(100800100000)=$800.10(100800-100000)=\$80

Suppose total fees + slippage + other costs = $35:

Pnet=8035=$45P_{\text{net}}=80-35=\boxed{\$45}

So:

ROI=4510000×100=0.45%ROI=\frac{45}{10000}\times100=\boxed{0.45\%}

Then your 7-signal formula can decide whether to execute:

A(t)=sspread+sfee+sslippage+sliquidity+slatency+sreliability+svolatility7A(t)= \frac{ s_{spread}+s_{fee}+s_{slippage}+s_{liquidity}+s_{latency}+s_{reliability}+s_{volatility} }{7}

For example, if the normalized signals are:

[0.9,0.8,0.7,0.85,0.6,0.9,0.75][0.9,0.8,0.7,0.85,0.6,0.9,0.75]

then:

A(t)=0.786A(t)=0.786

You could define:

Execute if Pnet>0 AND A(t)>0.75\boxed{\text{Execute if } P_{\text{net}}>0 \text{ AND } A(t)>0.75}

This becomes much more interesting when you're thinking about an actual AI/ML arbitrage system: the 7-signal surface can become a dynamic execution score, while the deterministic pricing equation guarantees that you don't execute trades where fees, slippage and latency eliminate the arbitrage.

You can find the full Kaggle notebook here

Popular posts from this blog

COBOT with GenAI and Federated Learning

Self-contained Raspberry Pi surveillance System Without Continue Internet

AI in Education: Embracing Change for Future-Ready Learning