1 Introduction

Hedgers of derivatives wish to replicate the opposite payoff of their positions. Hedging strategies can be roughly classified as dynamic or static. Dynamic hedging requires constant re-balancing of portfolios as relevant prices change over time. On the contrary, static hedging does not need to re-balance portfolios. Comparisons on dynamic and static hedging strategies for barrier options, Asian options, lookback options and quanto options are presented in Engelmann et al. (2006) and Tompkins (2002). A combination of dynamic and static hedges for exotic options is presented in İlhan et al. (2009), and numerous methodologies for dynamic hedging are shown in Zakamouline (2009).

A problem that remains a challenge in quantitative finance is the hedging of at-the-money digital options near maturity. The problem stems from the fact that a digital option has a discontinuous payoff at the strike price and has a huge delta and gamma near expiration. This problem is well-known among practitioners, and it is also put forward in Zakamouline (2009), where the author touches upon the delta-hedging of digital options. Hedging errors for digital options are studied in Gallus (1999). The author shows that even if one is correct in assuming a geometric Brownian motion (GBM) model for the distribution of the underlying risky asset, a delta-hedging strategy with a wrong volatility for a digital option position may actually increase the risk compared to the alternative of not hedging at all. Digital option replication is considered in Tichý (2006), where dynamic and static hedging are carried out for four different models: GBM, Hull-White stochastic volatility, the variance gamma and variance gamma in stochastic environment. For the static hedging, the author considers a concrete example by combining regular call options, simulates random paths of the underlying asset price evolution, and calculates some statistics of the terminal replication payoff error.

In this work, we consider a general setting for hedging at-the-money digital options near maturity by means of a bull spread. We solve different optimization problems, with the aim of minimizing the probability of sub-hedging the digital option at maturity, considering transaction costs and illiquidity issues. The main contributions of this paper are the following:

  • We compute the delta Greek of a digital call option under GBM and Heston dynamics for a wide range of values for the underlying asset. In the case of Heston model, the delta is obtained by means of COS method (Fang and Oosterlee 2008), which belongs to the class of option pricing methods based on Fourier inversion.

  • Given a confidence level, we determine the composition of the bull spread such that the probability of super- and sub-hedge a digital option meets that confidence level. We consider GBM and Heston models. In the case of Heston model, the probability density function for the asset price at maturity is approximated by the COS method.

  • We determine the composition of the bull spread that minimizes the probability of sub-hedging a digital option given that the cost of hedging is below a certain threshold. We consider GBM, Heston and CGMY models for driving the dynamics of the underlying asset. The COS method is used for pricing under Heston and CGMY dynamics. The optimization algorithm employed is derivative-free for all three models considered.

  • We solve the aforementioned optimization problem with a gradient based method when the dynamics of the underlying asset follows a GBM model.

  • We introduce the modeling of the illiquidity issue in the optimization problem, and solve it for the Heston model.

  • We calibrate the CGMY model to real market data and solve the optimization problem with transaction costs with the calibrated model.

The paper is organized as follows. We put forward the issues with the delta Greek for at-the-money digital options near maturity in Section 2. In Section 3, we propose a novel methodology for carrying out static hedging strategies. We show the performance of the proposed methods by means of a variety of numerical experiments in Section 4. Section 5 concludes and gives some pointers for future research.

2 Dynamic Hedging of Digital Options

Derivative dealers use dynamic hedging to adjust their positions as the underlying assets move. The hedge is often carried out several times a day. A particular case of dynamic hedging is delta-hedging. This technique consists of offsetting the risk of buying or selling options, by holding underlying in an amount equal to minus the delta of the options. When portfolios include near-the-money digital options, with a short time to maturity, some instabilities may arise that hamper the computation of the delta. We show this fact in Sections 2.1 and 2.2, where the models considered for the underlying asset dynamics are the GBM as well as the Heston model, respectively. We present the stock price model driven by CGMY process in Section 2.3, since it will be used in the numerical experiments.

2.1 Computation of the Delta of a Digital Option Under the GBM Model

A European call (respectively, put) option, gives to the holder the right to buy (respectively, sell) the underlying asset at maturity time T at an agreed price K called strike. The GBM model assumes that the price \(S_t\) of the underlying asset has a constant volatility \(\sigma\), and is governed by the stochastic differential equation,

$$\begin{aligned} dS_t=rS_tdt+\sigma S_t dW_t, \end{aligned}$$

being r the risk-free interest rate, and \(W_t\) a Brownian motion. Under this model, the valuation formulae at time t of European call and put options can be found in the seminal paper (Black and Scholes 1973). These formulae are given, respectively, by,

$$\begin{aligned} c_t=S_t \Phi (d_1)-Ke^{-r \tau }\Phi (d_2), \quad p_t=Ke^{-r \tau }\Phi (-d_2)-S_t \Phi (-d_1), \end{aligned}$$

where,

$$\begin{aligned} d_1=\frac{\ln (S_t/K)+(r+\sigma ^2/2)\tau }{\sigma \sqrt{\tau }}, \quad d_2=\frac{\ln (S_t/K)+(r-\sigma ^2/2)\tau }{\sigma \sqrt{\tau }}, \end{aligned}$$

being \(\tau :=T-t\) the time to maturity, and \(\Phi\) the standard normal cumulative distribution function.

A digital call (respectively, put) option pays nothing when \(S_T \le K\) (respectively, \(S_T \ge K\)) or pays a predetermined constant amount C when \(S_T > K\) (respectively, \(S_T < K\)), where \(S_T\) denotes the underlying asset at maturity time. Without loss of generality, we will assume that \(C=1\).

Under the GBM dynamics, the risk-neutral valuation formulae (see Chapter 25 of Hull 2012) of the digital call and put, respectively, at time t, read,

$$\begin{aligned} c_t^d=e^{-r \tau }\Phi (d_2), \quad p_t^d=e^{-r \tau }\Phi (-d_2). \end{aligned}$$

The delta of the digital call option reads,

$$\begin{aligned} \Delta =\frac{e^{-r\tau } \phi (d_2)}{S_t \sigma \sqrt{\tau }}, \end{aligned}$$

where \(\phi\) denotes the density function of the standard normal distribution.

Since the digital option payoff is discontinuous at the strike, digital options are difficult to hedge when they are close to expiration and near the money. Around the strike, small moves in the underlying asset price can have very large effects on the value of the option, that is, the absolute value of delta can be large close to maturity. Moreover, the delta may exhibit abrupt changes as the underlying price changes when the option is close to maturity (see Fig. 1). It is common among practitioners to consider that an option is close to expiry when it remains at most ten days to maturity.

Fig. 1
figure 1

Delta of a digital option under the Black-Scholes dynamics with parameters \(K=100, r=0.05, \sigma =0.05\), and times to maturity \(\tau =1/365, 5/365, 10/365\)

2.2 Computation of the Delta of a Digital Option Under the Heston Model

We consider now the celebrated Heston model (see Heston 1993) for driving the dynamics of the underlying asset. Within this model, the volatility, denoted by \(\sqrt{u_{t}}\), is modeled by an additional stochastic differential equation,

$$\begin{aligned} dx_{t} =(\mu -\frac{1}{2}u_{t})dt+\sqrt{u_{t}}dW^1_{t}, \end{aligned}$$
(1)
$$\begin{aligned} du_{t} =\lambda (\bar{u}-u_{t})dt+\eta \sqrt{u_{t}}dW^2_{t}, \end{aligned}$$
(2)

where \(x_t\) denotes the log-asset price variable and \(u_{t}\) the variance of the asset price process. The parameters of the Heston model are the initial volatility \(u_0\), the mean reversion rate \(\lambda \ge 0\), the long run variance \(\bar{u} \ge 0\), the volatility of variance \(\eta \ge 0\) and the correlation \(\rho\), between the two Brownian motions \(W^1_{t}\) and \(W^2_{t}\). The parameter \(\mu\) represents the rate of return.

We use the COS method (see Fang and Oosterlee 2008) to compute the delta of the digital call under the Heston model. The starting point for pricing European options with numerical integration techniques is the risk neutral valuation formula,

$$\begin{aligned} v(x,\tau )=e^{-r \tau }\mathbb {E}_{Q}[v(y,0)|x]=e^{-r \tau }\int _{\mathbb {R}}v(y,0)f(y|x)dy, \end{aligned}$$
(3)

where v denotes the option value, \(\tau\) is the time to maturity (\(T-t\)) and \(\mathbb {E}_{Q}[\cdot ]\) denotes the expectation operator under the risk neutral measure Q. The variables x and y are state variables at times t and T, respectively, f(y|x) is the probability density of y given x, and r is the risk free rate. The COS method belongs to the class of Fourier inversion methods, and the probability density function (PDF) of the price process at terminal time T is recovered from its characteristic function, that is, the Fourier transform of the PDF.

Generally speaking, a PDF f(x) and its characteristic function \(\phi (w)\) form a Fourier pair,

$$\begin{aligned} \phi (w)=\int _{\mathbb {R}}e^{iwx}f(x)dx, \quad \text {and,} \quad f(x)=\frac{1}{2\pi }\int _{\mathbb {R}}e^{-ixw}\phi (w)dw. \end{aligned}$$
(4)

For a function supported on \([0,\pi ]\), the cosine expansion reads,

$$\begin{aligned} f(\theta )=\sum _{k=0}^{\infty }{}^{\prime }A_{k}\cos (k\theta ), \quad A_{k}=\frac{2}{\pi }\int _{0}^{\pi }f(\theta )\cos (k\theta )d\theta , \end{aligned}$$
(5)

where \(\sum ^{\prime }\) indicates that the first term in the summation is weighted by one-half. For functions supported in any other finite interval, say \([a,b] \subset \mathbb {R}\), the Fourier-cosine series expansion can easily be obtained via a change of variables,

$$\begin{aligned} \theta :=\frac{x-a}{b-a}\pi , \quad x=a+\frac{b-a}{\pi }\theta . \end{aligned}$$
(6)

It then reads,

$$\begin{aligned} f(x)=\sum \limits _{k=0}^{\infty }{ }^{\prime }A_{k}\cos \left( k\pi \frac{x-a}{b-a}\right) , \quad \text {with,} \quad A_{k}=\frac{2}{b-a}\int _{a}^{b}f(x)\cos \left( k\pi \frac{x-a}{b-a}\right) dx. \end{aligned}$$
(7)

When [ab] is conveniently chosen, it can be shown that \(A_{k}\approx F_{k}\), where,

$$\begin{aligned} F_{k}=\frac{2}{b-a}\Re \left\{ \phi \left( \frac{k\pi }{b-a}\right) \exp \left( -i\frac{ka\pi }{b-a}\right) \right\} , \end{aligned}$$
(8)

and \(\Re (z)\) denotes the real part of z. Finally, we replace \(A_k\) by \(F_k\) in (7), and truncate the series summation such that,

$$\begin{aligned} f(x) \approx \sum _{k=0}^{N-1}{ }^{\prime }F_{k}\cos \left( k\pi \frac{x-a}{b-a}\right) . \end{aligned}$$
(9)

We now return to the option pricing problem (3). Because the density function f(y|x) is not known, we rely on its known characteristic function. We can first truncate the infinite domain into a finite domain [ab], and then replace f(y|x) by its Fourier-cosine series expansion, to end up with (see all the details in Fang and Oosterlee 2008),

$$\begin{aligned} v(x,\tau )\approx e^{-r\tau }\sum _{k=0}^{N-1}{ }^{\prime }\Re \left\{ \phi \left( \frac{k\pi }{b-a};x\right) e^{-ik\pi \frac{a}{b-a}}\right\} V_{k}, \quad V_k=\frac{2}{b-a}\int _a^b v(y,0)\cos \left( k\pi \frac{y-a}{b-a}\right) dy, \end{aligned}$$
(10)

with characteristic function \(\phi\). The so called payoff coefficients \(V_{k}\) can be obtained analytically for European plain vanilla and digital (also called cash-or-nothing) options. Since we assume that the characteristic function of the log-asset price is known, we represent the payoff as a function of the log-asset price. If we denote the log-asset prices by,

$$\begin{aligned} x:=\ln (S_{t}/K), \quad y:=\ln (S_{T}/K), \end{aligned}$$
(11)

the payoff for European options, in log-asset price, reads,

$$\begin{aligned} v(y,0)=\max \left( \beta K(e^{y}-1),0 \right) , \end{aligned}$$
(12)

with \(\beta =1\) for a call option and \(\beta =-1\) for a put option, and then, the payoff coefficients for European call and put options, respectively, read,

$$\begin{aligned} V_{k}^{\text {call}}=\frac{2}{b-a}K(\chi _{k}(0,b)-\psi _{k}(0,b)), \quad V_{k}^{\text {put}}=\frac{2}{b-a}K(-\chi _{k}(a,0)+\psi _{k}(a,0)), \end{aligned}$$
(13)

where,

$$\begin{aligned} \begin{aligned} \chi _{k}(c,d)&:=\frac{1}{1+\left( \frac{k\pi }{b-a}\right) ^{2}}\Bigg [\cos \left( k\pi \frac{d-a}{b-a}\right) e^{d}-\cos \left( k\pi \frac{c-a}{b-a}\right) e^{c}\\&+\frac{k\pi }{b-a}\sin \left( k\pi \frac{d-a}{b-a}\right) e^{d}-\frac{k\pi }{b-a}\sin \left( k\pi \frac{c-a}{b-a}\right) e^{c}\Bigg ], \end{aligned} \end{aligned}$$
(14)

and,

$$\begin{aligned} \psi _{k}(c,d):={\left\{ \begin{array}{ll} \left[ \sin \left( k\pi \frac{d-a}{b-a}\right) -\sin \left( k\pi \frac{c-a}{b-a}\right) \right] \frac{b-a}{k\pi },\text { if }k\ne 0, \\ (d-c),\text { if }k=0. \end{array}\right. } \end{aligned}$$
(15)

For digitals call and put options, the payoff coefficients read, respectively,

$$\begin{aligned} V_{k}^{\text {dcall}}=\frac{2}{b-a}K\psi _{k}(0,b) \text { and } V_{k}^{\text {dput}}=\frac{2}{b-a}K\psi _{k}(a,0). \end{aligned}$$
(16)

In the case of the Heston model, the pricing equation in (10) reads,

$$\begin{aligned} v(x,\tau )\approx e^{-r\tau }\sum _{k=0}^{N-1}{ }^{\prime }\Re \left\{ \varphi \left( \frac{k\pi }{b-a}\right) e^{ik\pi \frac{x-a}{b-a}}\right\} V_{k}, \end{aligned}$$
(17)

where,

$$\begin{aligned} \phi (w;x)=\varphi (w) e^{iwx}, \end{aligned}$$
(18)

and \(\varphi (w)\) is specified in Appendix A.

The delta Greek can be obtained by computing the derivative of the option value given in expression (17) with respect to the underlying asset,

$$\begin{aligned} \Delta =\frac{dv}{dS_t}=\frac{dv}{dx}\frac{dx}{dS_t}=\frac{1}{S_t}\frac{dv}{dx}\approx e^{-r\tau }\sum _{k=0}^{N-1}{ }^{\prime }\Re \left\{ \varphi \left( \frac{k\pi }{b-a}\right) e^{ik\pi \frac{x-a}{b-a}}\frac{ik\pi }{b-a}\right\} \frac{V_{k}}{S_t}. \end{aligned}$$
(19)

As it was observed under the GBM dynamics, the delta of a digital option under the Heston model exhibits abrupt changes of value as the underlying price changes when a near the money option is close to maturity (see Fig. 2). A remedy for the moving delta target is to avoid dynamic delta-hedging and to choose static hedging instead.

Fig. 2
figure 2

Delta of a digital option under the Heston dynamics with parameters taken from Fang and Oosterlee (2008), \(K=100, \mu =0, u_0=0.0175, \bar{u}=0.0398,\lambda =1.5768,\eta =0.5751,\rho =-0.5711\), and times to maturity \(\tau =1/360, 5/360, 10/360\). The computations are carried out by means of COS method with \(N=10^3\). The details to determine the interval [ab] are in Appendix B

2.3 Stock Price Model Driven by CGMY Process

In this section, we introduce the CGMY process, which belongs to the class of Lévy processes. As pointed out in Schoutens (2003) Lévy processes give a much better fit to the data than the GBM model. We refer the readers to Applebaum (2004) for a more detailed discussion on Lévy processes, and Schoutens (2003) for modelling the stock price based on Lévy processes.

Definition 1

Let \(X=(X_t)_{t \ge 0}\) be a stochastic process defined on a probability space \(\left( \Omega , \mathcal {F}, P \right)\). We say that it has independent increments if, for each \(n \in \mathbb {N}\) and each \(0 \le t_1< t_2 \le \dots< t_{n+1} < \infty\), the random variables \(X_{t_{j+1}}-X_{t_j}, j=1,\dots ,n\) are independent and that it has stationary increments if each \(X_{t_{j+1}}-X_{t_j} \,{\buildrel d \over =}\, X_{t_{j+1}-t_j}-X_0\).

Definition 2

We say that X is a Lévy process if,

  1. (i)

    \(X_0=0\) (almost surely),

  2. (ii)

    X has independent and stationary increments,

  3. (iii)

    X is stochastically continuous, i.e. for all \(a>0\) and for all \(s \ge 0\), \(\lim _{t \rightarrow s}P(|X_t-X_s|>a)=0\).

We now have the Lévy-Khinchine formula for the characteristic function of a Lévy process \(X=(X_t)_{t \ge 0}\),

$$\begin{aligned} E\left[ e^{iwX_t} \right] =\exp \left( iwat-\frac{w^2b^2t}{2}+t\int _{-\infty }^{\infty }\left( e^{iwx}-1 \right) k(x)dx \right) , \end{aligned}$$

where a is the drift rate, b is the diffusion coefficient, k(x) is called the Lévy density, and completely characterizes the jump component of Lévy processes. The Lévy density of the CGMY process (see Carr et al. 2002 or Geman 2002 for the details) with parameters CGMY is given by,

$$\begin{aligned} k(x)= {\left\{ \begin{array}{ll} C\frac{e^{-G|x|}}{|x|^{1+Y}}, &{} \text {for } x<0, \\ C\frac{e^{-M|x|}}{|x|^{1+Y}}, &{} \text {for } x>0. \end{array}\right. } \end{aligned}$$

The parameter C can be viewed as a measure of the overall level of activity, and it controls the overall kurtosis of the distribution. The parameters G and M control the rate of exponential decay on the right and left of the CGMY density, respectively. When they are equal to each other, the distribution underlying the CGMY process becomes symmetric. In the case of \(G \ne M\), it leads to a skewed distribution. If \(G<M\), the left tail of the distribution is heavier than the right one, whereas \(G>M\), the right tail is heavier than the left one. Finally, the parameter Y is used to characterize the fine structure of the stochastic process. This parameter determines whether the CGMY model has a complete monotone density, and whether the process has finite or infinite activity.

The CGMY model for the stock price process assumes that the martingale component of the movement in the logarithm of prices is given by the CGMY process extended to include an orthogonal diffusion component. The characteristic function for the logarithm of the stock price is given in Appendix A.

3 Static Hedging of Digital Options

Assume that we need to hedge at time t a short digital call with strike K, as defined in Section 2.1. A way of performing the hedging strategy is to build a bull call spread with value \(b_t\) at time t, composed of \(\frac{1}{2h}\) units of a long call with strike \(K-h\) and value \(c_t(K-h)\), and \(\frac{1}{2h}\) units of a short call with strike \(K+h\) and value \(c_t(K+h)\), for a certain \(h>0\),

$$\begin{aligned} b_t=\frac{c_t(K-h)-c_t(K+h)}{2h}, \end{aligned}$$
(20)

with payoff at maturity \(t=T\),

$$\begin{aligned} b_T= {\left\{ \begin{array}{ll} 0, &{}\text { if } S_{T}<K-h, \\ \frac{1}{2h} \left( S_{T}-K+h\right) , &{}\text { if } K-h<S_{T}<K+h, \\ 1, &{} \text { if } S_{T}>K+h. \end{array}\right. } \end{aligned}$$
(21)

The payoff \(b_T\) is illustrated in Fig. 3, where we have considered \(K=100\) and \(h=15\). We can observe that the super-hedging interval is \([K-h,K]=[85,100]\), while the sub-hedging interval is \((K,K+h)=(100,115)\).

Fig. 3
figure 3

Payoff of a digital option with strike \(K=100\) (black) and payoff of a bull call spread with the same strike and \(h=15\) (red)

We must compute h to determine the number of calls and the value of the strikes involved in the bull call spread. In Section 3.1 we calculate the value of h such that,

$$\begin{aligned} P\left( K-h<S_{T}<K+h\right) =1-\alpha , \end{aligned}$$
(22)

for a given confidence level \(\alpha \in (0,1)\) close to 1. We assume that the underlying follows either GBM or Heston dynamics.

3.1 Determining h Given a Fixed Level of Probability

We know that, under a GMB, the log-asset price \(S_T\) at terminal time T is normally distributed with mean \(\ln (S_t)+\left( \mu -\frac{\sigma ^{2}}{2}\right) \tau\), and variance \(\sigma ^2\tau\). Standardizing expression (22), we end up with,

$$\begin{aligned} P\left( \frac{\ln (K-h)-\ln (S_t)-\left( r-\frac{\sigma ^{2}}{2}\right) \tau }{\sigma \sqrt{\tau }}<Z<\frac{\ln (K+h)-\ln (S_t)-\left( r-\frac{\sigma ^{2}}{2}\right) \tau }{\sigma \sqrt{\tau }}\right) =1-\alpha , \end{aligned}$$
(23)

where Z follows a standard normal distribution. Then, the value of h can be numerically obtained by solving the equation,

$$\begin{aligned} \Phi \left( \frac{\ln (K+h)-\ln (S_t)-\left( r-\frac{\sigma ^{2}}{2}\right) \tau }{\sigma \sqrt{\tau }}\right) -\Phi \left( \frac{\ln (K-h)-\ln (S_t)-\left( r-\frac{\sigma ^{2}}{2}\right) \tau }{\sigma \sqrt{\tau }}\right) =1-\alpha . \end{aligned}$$
(24)

Under the Heston dynamics, we do not have a closed-form expression for the probability density function of \(\ln (S_{T}/K)\), although we have instead its numerical approximation given by the corresponding Fourier-cosine series expansion. Then, expression (22) turns out,

$$\begin{aligned} 1-\alpha =P\left( \ln \left( \frac{K-h}{K}\right)<\ln (S_{T}/K)<\ln \left( \frac{K+h}{K}\right) \right) =\int _{c(h)}^{d(h)}\sum _{k=0}^{N-1}{ }^{\prime }F_{k}\cos \left( k\pi \frac{y-a}{b-a}\right) dy, \end{aligned}$$
(25)

where, \(c(h)=\ln \left( \frac{K-h}{K}\right)\), and, \(d(h)=\ln \left( \frac{K+h}{K}\right)\). Finally, if we integrate the right hand side of expression (25), the value of h can be obtained by solving the equation,

$$\begin{aligned} \frac{1}{2}F_0(d(h)-c(h))+\sum _{k=1}^{N-1}F_{k}\frac{b-a}{k\pi }\left( \sin \left( k\pi \frac{d(h)-a}{b-a}\right) -\sin \left( k\pi \frac{c(h)-a}{b-a}\right) \right) =1-\alpha . \end{aligned}$$
(26)

3.2 Cost of Hedging and Potential Losses

We need to assess the convenience of shorting an option based on the cost of hedging, as well as on the probability of having a loss with the selected hedge. Each time we cover a digital call with a bull call spread we incur in transactional costs. We assume that the transactional costs represent a percentage \(\kappa\) of the value of the option. Then, the total cost of hedging at time t is given by,

$$\begin{aligned} H_t(h)=\frac{\kappa }{2h}(c_t(K-h)+c_t(K+h)). \end{aligned}$$
(27)

The potential loss of hedging the digital call with the bull call spread could be replicated at time t, by shorting \(\frac{1}{2h}\) puts with strike K and value \(p_t(K)\), buying \(\frac{1}{2h}\) puts with strike \(K+h\) and value \(p_t(K+h)\), and shorting \(\frac{1}{2}\) digital puts with strike K and value \(p_t^d(K)\),

$$\begin{aligned} L_t(h)=\frac{1}{2h}(p_t(K+h)-p_t(K))-\frac{1}{2}p_t^d(K). \end{aligned}$$
(28)

Figure 4 illustrates an increasing potential loss and a decreasing cost of hedging for increasing values of h, under the Heston dynamics.

Fig. 4
figure 4

Cost of hedging \(H_t(h)\) with \(\kappa =0.001\) (red) and potential loss \(L_t(h)\) (black) with respect to h, when the underlying asset is driven by Heston dynamics with parameters \(S_0=100, K=100, \mu =0, u_0=0.0175, \bar{u}=0.0398,\lambda =1.5768,\eta =0.5751,\rho =-0.5711\) and times to maturity \(\tau =1/360\)

The potential loss at maturity time \(t=T\) is described in Table 1. As we can observe, there is a loss only when \(K<S_T<K+h\) (see Fig. 3). That is why, from now on, we focus our attention on the probability that \(S_T\) lies within the sub-hedging interval \([K,K+h]\).

Table 1 Potential loss at maturity time \(t=T\)

If we take into account the cost of hedging \(H_t(h)\) as well as the cost of the potential loss \(L_t(h)\), then the value of h in the hedging strategy can be obtained as the solution of a minimization problem with constraints. Defining,

$$\begin{aligned} P(h):=P\left( \ln (K)<\ln (S_{T})<\ln (K+h)\right) , \end{aligned}$$

the non-linear optimization problem can be formulated as follows,

$$\begin{aligned} \text {min } P(h) \end{aligned}$$
(29)
$$\begin{aligned} \text {s.t.: } G_t(h) \le g, \end{aligned}$$
(30)

where \(G_t(h):=H_t(h)+L_t(h)\) represents the global cost at time t of the hedging strategy, and g is a fixed threshold.

3.3 Adding the Illiquidity Cost

In this section, we present an alternative model by adding a penalty corresponding to an illiquidity cost. Illiquidity costs are common in over the counter options trading. In our case, the calls and puts with strike \(K+h\) or \(K-h\) might not be available on the open market, and illiquidity costs could arise. In Çetin et al. (2006) a theoretical framework for liquidity costs is developed. In Harr (2011) an empirical analysis based on Çetin et al. (2006) is presented for options on stocks, and the author estimates liquidity costs to be in the rage of \(10^{-3}\) to \(10^{-2}\) times the value of the option. We choose \(10^{-2}\) as a reference value for our problem. The illiquidity cost is the highest when the desired strike is in the midpoint of the two closest strikes available in the market (without loss of generality, here we assume that \(0<h<1\) and the strikes are available in a unit basis). The illiquidity penalty function is given by,

$$\begin{aligned} I(h)={\left\{ \begin{array}{ll} 0.02h, &{}\text { if } 0<h \le 0.5, \\ -0.02h+0.02, &{}\text { if } 0.5<h< 1, \end{array}\right. } \end{aligned}$$
(31)

and it is illustrated in Fig. 5. The maximum penalization is \(10^{-2}\) and corresponds to \(h=0.5\).

Fig. 5
figure 5

Illiquidity penalty function I(h)

If we define,

$$\begin{aligned} \tilde{H}_t(h)=\frac{\kappa }{2h}(1+I(h))(c_t(K-h)+c_t(K+h)), \end{aligned}$$
(32)

and,

$$\begin{aligned} \tilde{L}_t(h)=\frac{1}{2h}\left( (1+I(h))p_t(K+h)-p_t(K)\right) -\frac{1}{2}p_t^d(K), \end{aligned}$$
(33)

then, the non-linear optimization problem including illiquidity costs, can be formulated as follows,

$$\begin{aligned} \text {min } P(h) \end{aligned}$$
(34)
$$\begin{aligned} \text {s.t.: } \tilde{G}_t(h) \le \tilde{g}, \end{aligned}$$
(35)

where \(\tilde{G}_t(h):=\tilde{H}_t(h)+\tilde{L}_t(h)\) represents the global cost at time t of the hedging strategy, and \(\tilde{g}\) is a fixed threshold.

4 Numerical Experiments

We start this section by determining the value of h in expression (20) that satisfies (22) for different levels of \(\alpha\) and several times to maturity \(\tau\). ResultsFootnote 1 are presented in Table 2 for GBM dynamics (by numerically solving Eq. (24)) and Table 3 for Heston dynamics (by numerically solving Eq. 26). The root-finding method used is the secant method. In both situations, the value of h is greater for longer times to maturity, meaning that the hedging strategy of a short at-the-money digital call requires less call options in these situations, and the replication of the payoff needs to be less precise. As expected, the value of h increases for increasing values of \(1-\alpha\) as well.

Table 2 Differences (in absolute value) when hedging a digital call with a bull call spread priced under GBM dynamics with parameters \(S_0=100, K=100, r=0.05, \sigma =0.05\) and times to maturity \(\tau =1/360, 5/360, 10/360\)
Table 3 Differences (in absolute value) when hedging a digital call with a bull call spread priced under Heston dynamics with parameters \(S_0=100, K=100, \mu =0, u_0=0.0175, \bar{u}=0.0398,\lambda =1.5768,\eta =0.5751,\rho =-0.5711\) and times to maturity \(\tau =1/360, 5/360, 10/360\). The computations associated to the bull spread are carried out with the function callHestoncf of the R package NMOF, while the value of the digital options is obtained with the COS method with \(N=10^3\)

Now we consider the optimization problem of Section 3.2. We plot in Fig. 6 the probability P(h) and the function \(G_t(h)\) under the GBM dynamics when the time to maturity is \(\tau =1/360\).

Fig. 6
figure 6

P(h) and \(G_t(h)\) under GBM dynamics with parameters \(S_0=100, K=100, r=0.05, \sigma =0.05\) and time to maturity \(\tau =1/360\)

We observe that P(h) is an increasing function in h, while \(G_t(h)\) has a minimum close to zero. This optimization problem has a non-linear objective function as well as a non-linear restriction. To solve this constrained problem, we have employed a derivative-free optimization algorithm, which does not rely on gradients, called COBYLA (constrained optimization by linear approximations), described in Powell (1994), and available within the R package nloptr. This algorithm constructs successive linear approximations of the objective function and constraints via a simplex of \(n+1\) points (n dimensions) and optimizes these approximations in a trust region at each step.

We tackle this problem by considering the GBM model, the Heston model put forward in Section 2.2, and the CGMY model of Section 2.3. The pricing of options under CGMY dynamics is carried out by means of the COS method, following expression (17) and expression (18), with the corresponding \(\varphi (w)\) specified in Appendix A. The results for different values of g are displayed in Table 4. It is worth remarking that the optimal values computed for h lead to a very small percentage of potential losses compared to the option premium (e.g. 0.14% for GBM dynamics when \(g=0.1\) and \(\tau =1/360\)).

Table 4 Optimal values of h, where \(S_0=100, K=100\) and \(\kappa =0.001\). The parameters of the underlying asset are \(r=0.05, \sigma =0.05\) (GBM), \(\mu =0, u_0=0.0175, \bar{u}=0.0398,\lambda =1.5768,\eta =0.5751,\rho =-0.5711\) (Heston), and \(r=0.05, \sigma =0.05, C=1, G=5, M=5, Y=0.7\) (CGMY). COS method is used for Heston and CGMY models with \(N=10^3\). The details to determine the interval [ab] are in Appendix B

The minimization problem in (29) can also be solved by means of an algorithm based on gradients, which is much faster than the derivative-free algorithm used. We present the solution of the problem in the case of GBM model, where formulae are available in closed form. For that purpose, we calculate the derivative of the objective function P(h),

$$\begin{aligned} {\begin{matrix} P'(h)=\frac{1}{\sigma \sqrt{\tau }}\cdot \frac{1}{K+h}\phi \left( \frac{\ln (K+h)-\ln (S_t)-(r-\frac{\sigma ^{2}}{2})\tau }{\sigma \sqrt{\tau }}\right) , \end{matrix}} \end{aligned}$$
(36)

and the derivative of \(G_t(h)\),

$$\begin{aligned} G'_t(h)=H'_t(h)+L'_t(h), \end{aligned}$$
(37)

where,

$$\begin{aligned} H'_t(h)=\frac{\kappa }{2h}\left[ c'_t(K+h)-c'_t(K-h)-\frac{1}{h}\left( c_t(K-h)+c_t(K+h) \right) \right] , \end{aligned}$$
(38)

and,

$$\begin{aligned} L'_t(h)=-\frac{1}{2h^2}p'_t(K+h), \end{aligned}$$
(39)

The expressions corresponding to \(c'_t(K+h), c'_t(K-h)\) and \(p'_t(K+h)\), are given by,

$$\begin{aligned} c'_t(K+h)=\frac{K+h}{\sigma \sqrt{\tau }}\phi (d^+_1)-e^{-r\tau }\left[ \Phi (d^+_2)+\frac{(K+h)^2}{\sigma \sqrt{\tau }S_t}\phi (d^+_2) \right] , \end{aligned}$$
(40)
$$\begin{aligned} c'_t(K-h)=\frac{K-h}{\sigma \sqrt{\tau }}\phi (d^-_1)-e^{-r\tau }\left[ -\Phi (d^-_2)+\frac{(K-h)^2}{\sigma \sqrt{\tau }S_t}\phi (d^-_2) \right] , \end{aligned}$$
(41)
$$\begin{aligned} p'_t(K+h)=\frac{K+h}{\sigma \sqrt{\tau }}\phi (-d^+_1)+e^{-r\tau }\left[ \Phi (-d^+_2)-\frac{(K+h)^2}{\sigma \sqrt{\tau }S_t}\phi (-d^+_2) \right] , \end{aligned}$$
(42)
$$\begin{aligned} d^+_1=\frac{\ln \left( \frac{S_t}{K+h} \right) +(r+\frac{1}{2}\sigma ^2)\tau }{\sigma \sqrt{\tau }}, \quad d^+_2=d^+_1-\sigma \sqrt{\tau }, \end{aligned}$$
(43)
$$\begin{aligned} d^-_1=\frac{\ln \left( \frac{S_t}{K-h} \right) +(r+\frac{1}{2}\sigma ^2)\tau }{\sigma \sqrt{\tau }}, \quad d^-_2=d^-_1-\sigma \sqrt{\tau }. \end{aligned}$$
(44)

The results obtained with the gradient-based method of Svanberg (2002) (called globally convergent method of moving asymptotes, available within the R package nloptr) are displayed in Table 5. The outcomes agree with those values in Table 4, obtained with a derivative-free algorithm. It is worth remarking that the gradient based method is much faster than the derivative-free one. The method employs outer and inner iterations. An outer iteration starts from the current iterate \(h^{k}\) and ends up with a new iterate \(h^{k+1}\). In each inner iteration, within a given outer iteration, a convex subproblem is generated and solved. In this subproblem, the original objective and constraint functions are replaced by certain convex separable functions which approximate the original functions around \(h^{k}\). The optimal solution of the subproblem is either accepted or rejected. If accepted, it becomes \(h^{k+1}\) and the outer iteration is completed. If rejected, a new inner iteration is made, with a modified subproblem based on somewhat modified approximating functions. These inner iterations are repeated until the approximating objective function and constraint functions become greater than or equal to the original functions at the optimal solution of the subproblem. This does not imply that the feasible set of the subproblem is completely contained in the original feasible set, but it does imply that the optimal solution of the subproblem is a feasible solution of the original problem, with lower objective value than the previous iterate. Each new outer iteration requires function values and first order derivatives of the original objective and constraint functions, calculated at the current iterate \(h^{k}\). Each new inner iteration requires function values, but not derivatives, calculated at the optimal solution of the most recent subproblem.

Table 5 Optimal values of h for the GBM model, where \(S_0=100, K=100, \kappa =0.001, r=0.05, \sigma =0.05\)

We move on to the minimization problem presented in Section 3.3, where an illiquidity penalty is considered. Results for the Heston model are shown in Table 6. We observe that if we keep the same values of g used in Table 4, then we get higher values for h, meaning that less calls can be used in the hedging strategy and higher potential losses are expected.

Table 6 Optimal values of h for the Heston model, where \(S_0=100, K=100, \kappa =0.001, \mu =0, u_0=0.0175, \bar{u}=0.0398,\lambda =1.5768,\eta =0.5751,\rho =-0.5711\). COS method is used for computations with \(N=10^3\). The details to determine the interval [ab] are in Appendix B

4.1 Calibration of the CGMY Model

We have tackled the minimization problem associated to the hedging strategy with three well-known models (GMB, Heston and CGMY) where the parameters are taken from the literature. It is worth remarking that CGMY model is fairly sensitive with respect to the parameter Y. For this reason, we calibrate this model to real market data. Let us assume that we use a set of n different options to calibrate the model, so that \(i \in [1,n] \subset \mathbb {Z}\). Then, the calibration of the model is defined as the minimization problem,

$$\begin{aligned} \min _{\boldsymbol{\theta } \in \mathbb {R}^4} f(\boldsymbol{\theta }), \qquad \qquad \qquad f(\boldsymbol{\theta }) := \dfrac{1}{2}||\varvec{r}(\theta )||^2 = \dfrac{1}{2} \varvec{r}^T(\boldsymbol{\theta })\varvec{r}(\boldsymbol{\theta }), \end{aligned}$$
(45)

where \(\varvec{r}(\boldsymbol{\theta })\) is the n-dimensional vector of the residuals obtained when pricing the options considered for calibration using the model parameters. That is,

$$\begin{aligned} \varvec{r}(\boldsymbol{\theta }) := \left[ r_1(\boldsymbol{\theta }), \ldots , r_n(\boldsymbol{\theta }) \right] ^T, \qquad r_i(\boldsymbol{\theta }) := V(\boldsymbol{\theta }; K_i) - V^*(K_i), \qquad i = 1, \ldots , n, \end{aligned}$$
(46)

where \(V(\boldsymbol{\theta }; K_i)\) and \(V^*(K_i)\), represent the model price and the market price, respectively, of the option with strike \(K_i\), and \(\boldsymbol{\theta }=(C,G,M,Y)\) is the set of parameters to be calibrated.

As for the data, we consider the set of options described in Table 7,

Table 7 Options quotes on bitcoin for calibration on September 4, 2021 with \(S_0=49955.69\) and one day to maturity. Market prices and volatilities are calculated as the average of the bid and ask prices and volatilities (if available), respectively. Function bobyqa (available within the R package nloptr) is used to solve the minimization problem in (45)

The calibration process gives the optimal set of values \((C^*=0.057, G^*=5.022, M^*=4.999,Y^*=1.339)\). Finally, we calculate the optimal value of h with the calibrated CGMY model to hedge a digital call on bitcoin with a bull call spread (without illiquidity costs), parameters \(S_0=49955.69, K=49000, r=0.02, \sigma =(0.66+0.759)/2\) and \(\tau =1/360\). Thus, we solve the minimization problem (29) with \(g=0.01\). The optimal value is \(h=0.01139\).

5 Conclusions

In this work, we have investigated the hedging of at-the-money digital options near maturity, which remains a challenge in quantitative finance. We carry out a hedging strategy by means of a bull spread, and solve different optimization problems, with the aim of minimizing the probability of sub-hedging the digital option at maturity, taking into account transaction costs and illiquidity issues. We perform a wide variety of numerical experiments under different asset dynamics, GBM, Heston and CGMY models. The CGMY model is calibrated to market data and used to get the optimal composition of the bull spread satisfying the cost of hedging restriction. Derivative-free algorithms are employed within the minimization problems. For the GBM dynamics, a gradient based algorithm is implemented, showing a best performance than derivative-free algorithms. In terms of ease of implementation, the GBM model is preferred, since formulae are available in closed form. For the other two models, the choice should be based on their ability to fit the real data, which in turn depends on the underlying asset. All in all, we provide a set of solutions for hedging digital options that can be potentially used in practice.

The hedging of digital options presented in this work belongs to the class of static hedging strategies, in contrast to delta-hedging which belongs to dynamic hedging strategies. Our recommendation is to start with delta-hedging when the digital option is not near the money, and check the quotes for the static hedging in the meanwhile, since it is more advantageous to buy underlying asset than options in terms of transaction costs. Then, we can switch from dynamic to static hedging when either the static hedging is cheaper or when the digital option is near the money, whatever comes first.

Future research encompass methodological innovations as well as computational improvements related to the present work. In regard to the first aspect, the problem of hedging near maturity digital options with instruments with a longer maturity may arise when the options market is not liquid. That issue is studied in Mayer et al. (2015) for European style payoffs under GBM, Heston and CGMY models. Another methodological challenge consists of finding the optimal time to switch from a dynamic to a static hedging. Related to the second aspect, gradient based methods for Heston and CGMY models might be employed to speed up computations in the optimization problems.