You are on page 1of 11

Quanto Perpectual Pricing

Stochastic model approach for quanto perpetual pricing

Hyungbin Park hyungbin@snu.ac.kr


Department of Statistics
Seoul National University

SungJae Lim xxxxxxx@snu.ac.kr


Department of Mathematical Science
Seoul National University

Junsu Park batman823@snu.ac.kr


Department of Economics
Seoul National University

MinJun Park xxxx@snu.ac.kr


Department of Statistics
Seoul National University

SeokJin Kim truegoodboy@snu.ac.kr


Department of Statistics
Seoul National University

Abstract

This paper discusses several stochastic approaches to pricing the Eth-Perp , a quanto
perpetual derivative been trading in BITMEX. First we condiser GBM assumptions to the
price of ETH and BTC, and we derive a BSDE model and a Non-linear Black Scholes model.
Second, we expand stochastics volatility models and we derive numerical pricing solutions
and hedging portfolio of BSDE and non-linear Black Scholes model. Through this model
we found relations of coefficients and option price and we get XXX results in backtesting,
and xxx results in real trading.

목차

1 Introduction 1
1.1 Funding Rate Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Empirical Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

2 Geometric Brownian Motion models 3


2.1 Nonlinear Black Scholes model . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.1.1 PDE of Quanto Perpetual . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1.2 Exlpicit Solutions of nonlinear Black Scholes Equations . . . . . . . 5
2.2 Backward Stochastic Differential Equation models . . . . . . . . . . . . . . 6
2.2.1 Solving the BSDE for numerical method . . . . . . . . . . . . . . . 7
1
2.2.2 Solving the BSDE for PDE transforming . . . . . . . . . . . . . . . . 8

3 Stochastic Volatility Models 8

4 Numerical and Algorithmic Approach 9


Longs pay shorts Ft StE 10−6 every 8 hours if Ft > 0.
Shorts pay longs −Ft StE 10−6 every 8 hours if Ft < 0. Therefore, −3·365Ft can be considered
to be a dividend yield per annum.

1.1 Funding Rate Calculation


We will set notations via t − 1 → t means 8 hours.
k → k + 1 means 1 minute.
E
For example, {St−1,k }480
k=1 means (t − 1, t] , 1 minute candle data.

Funding Basist−1,k = Ft−1 Time8 to funding


hours = Ft−1 480−k
480

E
Markt−1,k = St−1,k E
(1+Funding Basist−1,k ) ∴ Markt−1,480 = St−1,k

Impact Bidt−1,k = The average fill price to execute a market sell order of size 0.01 BTC

Impact Askt−1,k = The average fill price to execute a market buy order of size 0.01 BTC

max{0,Impact Bidt−1,k −Markt−1,k }−max{0,Impact Askt−1,k −Markt−1,k }


Pt−1,k = E
St−1,k
+Funding Basist−1,k

1.2 Empirical Analysis


We will assume that Bitmex is frictionless i.e. Impact Bid = Impact Ask = V Q
Then,
Q
Vt−1,k − M arkt−1,k
Pt−1,k = E
+ Funding Basist−1,k
St−1,k
Q E
Vt−1,k − St−1,k (1+Funding Basist−1,k )
= E
+ Funding Basist−1,k
St−1,k
Q
Vt−1,k
= E
−1
St−1,k

Q
Vt−1,k
P̂t−1,k = E
−1
St−1,k

480
ˆ = 1
X
P I8H P̂t−1,k
480
k=1

2
Quanto Perpectual Pricing

ˆ t)
F̂t = f (P I8H

OLS : Ft = 0.98 · F̂t + 0.02% with correlation = 0.81

2. Geometric Brownian Motion models


2.1 Nonlinear Black Scholes model
In this section, we assume that the funding is continuously settled with funding rate
Ft = f (Pt ) and that VtU is sufficiently smooth, so that we can use Itô’s formula on VtU .
Suppose that StB and StE follow geometric Brownian motions and that a bank account Gt
grows exponentially with growth rate r.
(1)

B B B
dSt = µB St dt + σB St dBt

(2) (1) (2)
dSE E E
t = µE St dt + σE St dBt , where dBt dBt = ρdt

dGt = rGt dt

We construct a self-financing portfolio πt that is long one VtU , and short ∆B number of
StBand ∆E number of StE .

πt = VtU − ∆B StB − ∆E StE + xt Gt

3
Since πt is self-financing,

dπt = dVtU − k10−6 Ft StB StE dt − ∆B dStB − ∆E dStE + φt dGt

By Itô’s formula,
∂VtU 2 ∂ 2 VtU ∂2V U 2 ∂ 2 VtU ∂VtU
dVtU = ( ∂t + 21 σB 2 StB ∂StB 2
+ σB σE ρStB StE ∂S B ∂S
t 1 2 E
E + 2 σE St ∂StE 2
)dt + ∂StB
dStB +
t t
∂VtU
∂StE
dStE
∂VtU ∂VtU
By setting ∆B = ∂StB
and ∆E = ∂StE
, we get

∂VtU 2 ∂ 2 VtU ∂2V U 2 ∂ 2 VtU


dπt = ( ∂t + 12 σB 2 StB ∂StB 2
+ σB σE ρStB StE ∂S B ∂S
t 1 2 E
E + 2 σE St ∂StE 2
− k10−6 Ft StB StE +
t t
φt rGt )dt

Since the instantaneous return of πt is riskless, the growth rate should the risk-free rate
r.

dπt = rπt dt
∂VtU 2 ∂ 2 VtU ∂2V U 2 ∂ 2 VtU
After some calculations, ∂t + 21 σB 2 StB ∂StB 2
+ σB σE ρStB StE ∂S B ∂S
t 1 2 E
E + 2 σE St ∂StE 2

t t
∂VtU ∂VtU
k10−6 Ft StB StE + rStB ∂StB
+ rStE ∂StE
− rVtU = 0

2.1.1 PDE of Quanto Perpetual


For convenience, in this section we denote VtU , StB , StE by V, x, y, respectively. The equa-
tion is,

∂V 1 2 2 ∂ 2 V ∂2V 1 2 2 ∂2V ∂V ∂V
+ σB x +σ B σ E ρxy + σE y +rx +ry −k ·10−6 xyFt −rV = 0.
∂t 2 ∂x2 ∂x∂y 2 ∂y 2 ∂x ∂y
(1)
(t, x, y) ∈ (0, ∞)3



 limx→∞ V (t, x, y) = ∞

limy→∞ V (t, x, y) = ∞



6
The boundary values is, V (t, 0, y) = 0 Recall that Pt = 10xyV − 1 and

V (t, x, 0) = 0





No conditions given for t


Pt − 0.05%
 if Pt > 0.06%
Ft = f (Pt ) = 0.01% if − 0.04% ≤ Pt ≤ 0.06%

Pt + 0.05% if Pt < −0.04%

This equation can be transformed to a semlinear heat equation


Define −(3 · 365Ft + r)V = G(V )

4
Quanto Perpectual Pricing

The equation is,

∂V 1 ∂2V 1 ∂2V ∂2V ∂V ∂V


+ |σB |2 x2 2 + |σE |2 y 2 2 + |σB ||σE |ρxy + rx + ry + G(V ) = 0.
∂t 2 ∂x 2 ∂y ∂x∂y ∂x ∂y

2.1.2 Exlpicit Solutions of nonlinear Black Scholes Equations


We solved explicit solution of the pde by using seperation of variables. First, basic sub-
stition makes the pde in the simple form.

∂V 1 ∂2V 1 ∂2V ∂2V ∂V ∂V


+ |σB |2 x2 2 + |σE |2 y 2 2 +|σB ||σE |ρxy +rx +ry +k10−6 xyF (V /xy) = 0
∂t 2 ∂x 2 ∂y ∂x∂y ∂x ∂y
First, substitute x = ex1 , y = ey1 .
Then equation changes to

∂V 1 ∂2V 1 ∂2V ∂2V ∂V ∂V


+ |σB |2 2 + |σE |2 2 +|σB ||σE |ρ +r +r +k10−6 ex1 +y1 F (V /ex1 +y1 ) = 0
∂t 2 ∂x 2 ∂y ∂x∂y ∂x ∂y
substitute p
x2 = x1 /σ1 , y2 = y1 /σ2 − ρx1 /σ1 1 − ρ2
Then the equation becomes

Vt = 1/2∆V + aVx2 + bVy2 − rV − k10−6 eαx2 +βy2 F (V eαx+βy )

We can find solution that is seperated by variables let V = f (t)eαx2 +βy2 Then f satisfies
the following ode
ft = (α2 + β 2 + aα + bβ)f + K(f )


c1 f + c2
 if f > r1
Where K(f ) is the function such that k(f ) = c2 if − r2 < f < r1

c1 f + c2

Since k is lipschitz, the ode has global well posed solution and we can compute solution
directly numerically.

5
Data Description

1047 rows dataframe, by using python3 ccxt fetchticker(”ETH/USD”). 30s time interval.

columns : impact bid price, impact ask price, impact mid price, current price
impact ask−impact bid
spread := impact mid

|impact mid−current price|


err := impact mid

variables mean std max min


spread 5.91e-5 8.99e-5 6.62e-4 2.19e-5
err 1.11e-4 1.76e-4 1.77e-3 0

2.2 Backward Stochastic Differential Equation models


We can use Bsde models to predict quanto derivatives.

First, we assume Eth and Btc follows two dimensional GBM.

dStE = µ1 StE dt + σ1E StE dBt1 + σ2E StE dBt2


dStB = µ1 StB dt + σ1B StB dBt1 + σ2B StB dBt2
Yt = h0t Gt + h0t StE + hB B
t St
Gt : riskf reeasset
dYt = h0t dGt + hE E B B
t dSt + ht dSt + (f unding)dt

dYt = −f dt + ZdB
Hedging portfolio of Vut

Vtu = h0t Gt + hE E B B
t St + ht St
dVtU = h0t rGt dt + hE E B B
t dSt + ht St + (f unding)dt

= h0t rGt dt + hE E E 1 E 2 B B 2
t St (µ1 dt + σ1 dBt + σ2 dBt ) + (f unding)dt + ht St (µ2 dt + +dBt )
= [rVt + (µ1 − r)ht ð + (µ2 − r)t St + (f unding)]dt + (σ1 ht ð + ht St )dBt + (σ2 hE
u E B B E E E B 1 E
t ð+
B B
ht St )dBt2

Define
Zt1 = σ1E hE E B B
t St + ht St
Zt2 = σ2E hEt ð + hB B
t St

By multiplicate an inverse matrix


∴ There existsβ11 , β12 , β21 , β22 such thathE 1 2 B B 1 2
t ð = β11 Zt + β12 Zt ht St = β21 Zt + β22 Zt

6
Quanto Perpectual Pricing

dVut = (rVtu ) + (µ1 − r)(β11 Zt1 + β12 Zt2 ) + (µ2 − r)(β21 Zt1 + β22 Zt2 ) + (f unding))dt +
Zt dBt1
1 + Zt2 dBt2

We use funding rate formula written in the BITMEX. However We assume continous
funding so we use PI8H(the 8h average of PI) instead of PI.

Set

if we define  g(x1 , x2 , y)by


6 6
10 y − 1.05x1 x2 10 y > 1.06x1 x2

g(x1 , x2 , y) = 0.01x1 x2

1.06x1 x2 ≤ 10y ≤ 0.96x1 x2 106 y − 0.95x1 x2 if 0.96x1 x2 ≤ 106 y

Then (funding) = cg(StE , StB , Vtu )
∴ dVtu = [rVtu + (µ1 − r)(β11 Zt1 + β12 Zt2 ) + (µ2 − r)(β21 Zt1 + β22 Zt2 ) + cg(ð, StB , Vtu )]dt +
Zt1 dBt1 + zt2 Bt2

define f(x1 , x2 , y, z1 , z2 ) = ry + (µ1 − r)(β11 Z1 + β12 Z2 ) + (µ2 − r)(β21 Z1 + β22 Z2 ) +


cg(x1 , x2 , y)

2.2.1 Solving the BSDE for numerical method


R t +1 R t +1
Yti = Yti +1 + tii f (t, Xt , Yt , Zt )dt − tii Zt dBt multiply both sides byBTt i , ti + 1 and
take conditional expectiation

0 = E[Yti +1 BtTi ,ti+1 ]−Zt


ih

S E (i + 1) = µ1 S E (i)h + σ1E hS E (i) + σ2E sqrt(h)StE N2 (i)

S E (i + 1) = µ1 S E (i)h + σ1B hS b (i) + σ2B sqrt(h)StB N2 (i)
h = T /nN1 , N2 N (0, 1)

thanks to this result and using mean instead of expectation, we derive

Y (i) = Y (i + 1) + f h

Z1 (i) = Y (i + 1)N1 (i)


Z2 (i) = Y (i + 1)N2 (i)
YT = STE STB 10−6

7
The following plots are the results of the scheme.

Figure 1: Results of BSDE scheme

2.2.2 Solving the BSDE for PDE transforming


3. Stochastic Volatility Models
We condiser the Heston model for the stochastic volatility model.

8
Quanto Perpectual Pricing

4. Numerical and Algorithmic Approach


4.1 Mean Reverting Strategy
5. References
https://www.bitmex.com/app/perpetualContractsGuide#Funding

9
10
Quanto Perpectual Pricing

11

You might also like