Variance Swap Pricing under Markov-Modulated Jump-Diffusion Model

*is paper investigates the pricing of discretely sampled variance swaps under a Markov regime-switching jump-diffusion model. *e jump diffusion, as well as other parameters of the underlying stock’s dynamics, is modulated by a Markov chain representing different states of the market. A semi-closed-form pricing formula is derived by applying the generalized Fourier transform method. *e counterpart pricing formula for a variance swap with continuous sampling times is also derived and compared with the discrete price to show the improvement of accuracy in our solution. Moreover, a semi-Monte-Carlo simulation is also presented in comparison with the two semi-closed-form pricing formulas. Finally, the effect of incorporating jump and regime switching on the strike price is investigated via numerical analysis.


Introduction
Risk, often measured by the variance (volatility) of a specific underlying asset's return, has always been a major concern for the investors in financial markets. e variance (volatility) changes sarcastically over the investment period, providing practitioners opportunities to speculate on the spread between the realized variance (volatility) and the implied variance (volatility), as well as the motivation to hedge against the variance risk. As a consequence, variance (volatility) related derivative products have emerged and become increasingly important in the financial market, which has been witnessed by the dramatic rise of the yearly trading volume in VIX futures (VIX futures provide financial practitioners with the ability to trade a liquid variance/volatility product based on the VIX index methodology) over the past few years (see Figure 1) (the popularity of VIX futures can be seen from the annual volume in http://www.cboe.com/data/historical-optionsdata/volume-put-call-ratios).
Among all the variance (volatility) related derivative products, variance (volatility) swaps have drawn much attention from the practitioners and researchers. A variance (volatility) swap is not a swap in a traditional sense, but a forward contract whose payoff at expiry is determined by the difference between the realized variance (volatility) and a preset fixed strike price. e realized variance (volatility) is usually calculated according to a prespecified formula. For details regarding calculation of the realized variance (volatility), one can refer to the references: Lewis and Weithers [1], Bossu [2], and Bossu et al. [3]. A long position in a variance (volatility) swap generates profit if the realized variance exceeds the preset strike price. One significant feature of the variance swap useful in the valuation process is that it requires zero initial cost since it is essentially a forward contract.
Numerous research has been carried out on variance (volatility) swap pricing over the last decades. e price of a volatility swap is closely related to the price of the corresponding variance swap with the same contract details by the square-root relationship between volatility and variance. erefore, we only focus on the valuation of variance swaps in this paper. e valuation approaches can be categorized into two types: the model-independent approach and the stochastic approach. e main idea of the model-free pricing technique is to replicate the variance swap with a portfolio composed of a call option, a put option, and a forward and follow the routine of calculating the VIX index (see Martin [4]). It is less complicated and easier to apply since it does not involve any assumption of the specific form of the dynamics of the asset's price process. However, this technique has a drawback that it assumes continuous sampling time and continuous exercise of the options, which is unrealistic. On the other hand, the stochastic approach is based on the assumption that the underlying asset's price process is driven by a specific stochastic process (see Broadie and Jain [5], Elliott et al. [6], Elliott and Lian [7], Little and Pant [8], and Song-Ping and Guang-Hua [9]). Even though the early studies of the stochastic approach also consider the continuously sampled variance swap as an approximation, an increasing number of models are put forward to price the variance swap on yearly, quarterly, monthly, and daily base to investigate the discretely sampled variance swap (see Broadie and Jain [5], Little and Pant [8], and Song-Ping and Guang-Hua [9]). Both the discrete model and continuous model are investigated in the paper Broadie and Jain [5] where the authors prove that the discretely sampled variance swap price converges to the continuously sampled variance swap price as the observation frequency approaches infinity. Little and Pant [8] assumed that the local volatility varies with both time and the stock price according to a known function and studied the discretely sampled variance swap via a finite difference method. ey reduced the dimension of the pricing problem by introducing a two-stage approach, which greatly improved the efficiency and accuracy of their pricing formula.
Since the variance swap is designed to hedge against the risk from the volatility, it would be meaningless and unrealistic to assume the constant volatility in the stochastic process of the underlying asset. Consequently, stochastic volatility models have been incorporated into the valuation of the variance swaps (see Heston [10] and Schöbel and Zhu [11]). Song-Ping and Guang-Hua [9] priced a variance swap with discrete sampling times based on the Heston stochastic volatility model (see Heston [10]), assuming that the underlying stock price is driven by a Cox-Ingersoll-Ross (CIR) type stochastic process. An explicit solution with high efficiency and accuracy is derived in their paper by adopting the dimension reduction technique from Little and Pant [8] and using the generalized Fourier transform. Broadie and Jain [5] considered both stochastic volatility and jump diffusion in the dynamics of the underlying asset price process, and the pricing formula was established by utilizing the characteristic function method. Cheng and Zhao [12] proposed a tractable approach to price volatility derivative under a general stochastic volatility model. In their work, the underlying volatility is assumed to comply with a beta prime distribution, which is flexible and consistent with the feature of the market data, and the jump diffusion process is also captured by extending the model through stochastic time changes. As the stochastic volatility is always investigated together with a stochastic interest rate, a model incorporating these two factors is investigated in the paper Cao et al. [13] where it is proved that the effect of the interest rate is not as vital as that of the volatility on the variance swap price.
Along another line, the regime-switching model, where the parameters for the dynamics of the underlying asset's price are modulated by an observable Markov chain that represents the general varying market states, is widely accepted as economically reasonable and has been applied to a large number of financial models such as those related to financial time series and derivative pricing (see Buffington and Elliott [14], Liu et al. [15], Yao et al. [16], Boyle and Draviam [17], Yuen and Yang [18], and Costabile et al. [19]). Elliott et al. [6] first considered the regime-switching model in a variance swap pricing problem where the quadratic return related to the variance is analysed by combining the probabilistic approach with the partial differential approach. However, their pricing formula is based on continuous sampling times. erefore, Elliott and Guang-Hua [7] improved the accuracy of their former pricing formula and derived a semiclosed solution of the variance and volatility swap in a discretely sampled case via the characteristic function method. However, in the literature mentioned above, the price processes of the underlying asset are assumed to be continuous under each fixed market state which in the real world are often discontinuous and have jumps even under the given market state. As a matter of fact, the Markov regime-switching model also describes jumps, but of a different type from the jumps depicted in jump-diffusion models. e general jumps may be caused by some unexpected financial events, which may have short-term and temporal effects on the prices of the assets and liabilities. On the other hand, the Markovian-type jump may result from the changes in the entire economic environment, which may affect the prices in the long run. erefore, to formulate a suitable pricing model for the variance swaps over a time period of any length and incorporate both types of jumps, it is reasonable to consider the Markov-modulated jump diffusion model. In fact, the Markov regime-switching jump-diffusion model has been applied to solve financial problems such as portfolio selection and option pricing (see Elliott et al. [6], Yu [20], Ramponi [21], and Weron et al. [22]). Moreover, Zhang et al. [23] investigated a stochastic control problem in a regime-switching jump-diffusion market and established a sufficient stochastic maximum principle. However, to the best of our knowledge, no work has been done before to consider the Markov-modulated jump-diffusion model in the variance swap pricing problem, which motivates the work of this paper. e aim of this paper is to price a discretely sampled variance swap under Heston's stochastic volatility model with Markov-modulated jump diffusion. is will extend the work of Elliott and Lian [7] with further consideration of jump diffusion in the regime-switching model. Different from the characteristic function method used by Elliott and Lian [7], we apply the generalized Fourier transform method and the two-stage approach to obtain a semi-closed-form pricing formula. To illustrate the accuracy and efficiency of our discrete solution, we present a semi-Monte-Carlo simulation and derive the pricing formula of a variance swap with continuous sampling times and compare the prices from the three methods under a range of different observation frequencies. Since the main contribution of this paper is integrating both the regime switching and jump diffusion in the variance swap pricing problem, we examine the effect of both the Merton-type and Kou-type jumps under the regimeswitching model in numerical analysis. We also investigate the effect of ignoring regime switching and the effect of the model parameters such as the transition rate on the swap price. e rest of the paper is organized as follows. In Section 2, our Heston's stochastic volatility model with Markovmodulated jump diffusion, including a measure change, is described in detail. In Section 3, we derive our pricing formula via the generalized Fourier transform under a twostage framework. In Section 4, several numerical examples are given to demonstrate the efficiency and accuracy of our pricing formula. Section 5 presents a summary of our paper.

Model Description
Before we start formulating our model, we first introduce our basic idea of pricing a variance swap.
A variance swap is defined as a forward contract on the future realized variance of the return from the specified underlying financial asset. Generally, the payoff function of a long position in a variance swap at expiry takes the form where σ 2 R denotes the realized variance, K var is the strike price of the variance swap, and G denotes the notional amount of the swap in dollars per volatility point squared. Usually, the values are all considered on an annualized basis.
Furthermore, the value of a variance swap at time t, which equals the expected present value of the payoff under the risk-neutral measurement of Q, can be expressed as follows: where r t is the related interest rate, σ R denotes the realized volatility, and E Q t denotes the conditional expectation at time t. e nature of a forward contract indicates that the value of a variance swap at entry is equal to zero. us, by setting V(0) � 0, we can easily have the following fair strike price: e pricing of a variance swap problem is then reduced to calculate the expectation in equation (2). e realized variance σ 2 R is obtained by discretely sampling over the contract lifetime period [0, T e ], which is also referred to as the total sampling period. Let T e be the life time of the contract; AF � N/T e is the annualized factor converting this expression to an annualized variance, which is assumed to be within a wide range from 5 to 252 according to the sampling frequency. e specific calculation of the realized variance σ 2 R differs from contract to contract. Usually, the details of the calculation would be specified in the contract initially. In this paper, we use a typical formula which is also used by many other researchers as follows: where S t k denotes the underlying stock price at the k-th observation time and N denotes the total number of the observations. us, our pricing of a variance swap problem is reduced to the calculation of the conditional expectation of the realized variance defined by (3) under the risk-neutral measurement of Q at time 0. Next, we start formulating our model.

Heston Model with Markov-Modulated Jump Diffusion.
In this paper, we use a complete probability space (Ω, F, P) with P being the real-world probability measure. e market regime is divided into n different states described by the states of a Markov chain α(t). Following Elliott et al. [6], α(t) is a continuous-time finite-state observable Markov chain whose value can be selected from the state space E � e 1 , e 2 , . . . , e n , where e i � (0, . . . , 1, . . . , 0) ′ ∈ R n is a canonical unit vector. Moreover, the semimartingale representation theorem for the process α(t) can be obtained as follows: where M( t ), t ∈ [ 0, ∞ ) is a R n -valued martingale increment process with respect to the natural filtration generated by α(t), and is the generator matrix of α(t), where q ij denotes the intensity of transition from state i to state j satisfying i q ij � 0. Furthermore, let w s and w y be two Wiener processes. For consideration of the skew effect, we assume that w s and w y are correlated with a constant correlation coefficient ρ.
Discrete Dynamics in Nature and Society 3 e stochastic process α(t) is assumed to be independent with w s and w y .
For simplicity, we consider a financial market with only two assets: a risk-less bond B(t) and a risky stock S(t). e price of the bond is driven by the following deterministic process: where r α(t) � <r, α(t)> is the interest rate process which depends on the market state. 〈·, ·〉 denotes the inner product in R n , and r � (r 1 , . . . , r n ) ′ is a vector representing different interest rates under different market states. To be specific, r i is the interest rate corresponding to the state i for each i � 1, . . . , n. Note that the subsequent parameters of the risky stock price process are defined in a similar way. e price of stock is assumed to be driven by the following Markov-modulated jump diffusion process: where Poisson random measure which is also determined by the Markov chain α(t) and can be rewritten as follows: is a generalized form of dt, and for simplicity, we take η(dt) � dt in this paper. σ(y) denotes the volatility rate of the stock process and is assumed to be a function of y which is driven by the following stochastic process: where a is corresponding to the speed of mean reversion ′ is the mean, and σ v denotes the so-called volatility of volatility.

Change of Measure.
A market described by the Markov-modulated jump-diffusion is not complete; thus, there exists more than one equivalent martingale measure [24]. In this paper, we apply the regime-switching generalized Esscher transform to determine a specific equivalent martingale measure. is method was firstly proposed by Elliott and applied widely in the pricing of the currency and variance swap [6]. Elliott divided the risk premium into the diffusion term and the jump term, and the diffusion component and the jump component are assumed to represent the systematic risk and the unsystematic risk, respectively. e jump risk is unpriced. us, the parameters of jump component are invariant under the change of measure from P to Q. Bo et al. took the jump components more seriously and derived a closed-form solution for the risk premium [25]. Different from Elliott's approach, Siu and Shen divided the risk premium into three terms, including the diffusion term, the jump term, and the Markov switching term, and the authors divided each risk price by a risk-minimizing approach [26]. For simplification, we adopt a two-step procedure like Elliott et al. [27]; in the first step, we divide the asset price into a continuous diffusive part and jump part and calculate the risk premiums separately. In the second step, we consider the regime effects into each coefficients. As our focus here is the variance swap pricing, we omit the rigorous proof details and give a simplified expression under the measurement of Q. Let where Substituting (8) and (10) into (7) and (9), we obtain the dynamics of the price process of the stock S(t) and y under the risk-neutral assumption as follows: In the subsequent sections, we will only use the riskneutral probability measure Q.
Before we move on to the next section, we define three natural filtration generated by the two wiener processes w * s , w * y and the Markov chain α(t) up to time t as follows:

Pricing Variance Swap
As we have mentioned in Section 2, to price a variance swap, we are concerned with the calculation of the conditional expectation as follows: 4 Discrete Dynamics in Nature and Society Our pricing problem can be further reduced to the calculation of the N conditional expectations of the same form as for some fixed equal time period which is referred to as the sampling period defined as the time span between two observation points.
We consider the calculation under two cases: k � 1 and k > 1. When k � 1, we have only one unknown variable S t 1 in the expectation to be calculated since S t 0 � S 0 is the current stock price which is a known constant. We will discuss this case later. Now we investigate the latter case where k > 1. In this case, both S t k and S t k− 1 are unknown variables at initial time which makes the calculation of the expectation rather complicated and difficult to work out. erefore, to reduce the dimension as well as the difficulty in computation, we utilize the work of Little and Pant (see Little and Pant [8], Song-Ping and Guang-Hua [9], and Cao et al. [13]) and introduce a new variable I t driven by the underlying process: where δ(·) is a step function with the following definition: for any a ∈ R and any integrable function F(t). (18) us, I t is a new process only related to the previous observation S t k− 1 , which can be written as follows: With the new defined variable I t , we then employ the two-stage approach from Little and Pant [8] to calculate the expectation in (15).
To illustrate this approach, we first consider a contingent claim U k � U k (t, S t , I t , y t , α(t)) defined over the period [0, t k ] with a future payoff function at expiry as U k (t k , S t k , I t k , y t k , α(t k )) � ((S t k /I t k ) − 1) 2 . e value of this claim at time t could be written as Similar to that in Elliott and Lian [7], we first consider the conditional expectation given the information about the sample path of the Markov chain α(t) from time 0 to the expiry time T, F α (T), where T � t k in this case. For a given realized path of α(t), the parameters such as r α(t) , λ α(t) , m α(t) , and b α(t) are all deterministic functions. Under this assumption, we denote the value of the contingent claim as W k (t, S t , I t , y t ) � U k (t, S t , I t , y t , en, we can easily obtain the corresponding PIDE for W k in the following theorem by using the Feynman-Kac theorem (some subscripts have been omitted without ambiguity).
, and S is driven by the dynamics of (11). en, W k is governed by the following PIDE: subject to the terminal condition: Proof. Let ϕ � W k (t, S t , I t , y t ); according to It o's formula with jump, we first obtain Discrete Dynamics in Nature and Society where dS c (t) � [r α(t) − λ α(t) m α(t) ]dt + σ α(t) dw * s S c (t) denotes the continuous part of the stock price process, and the discrete part of Ito's formula can be written as Substituting (23) into (22) and extracting the coefficient of the dt term, we can prove eorem 1.
Due to the definition of the function δ(·), the PIDE at any time other than t k− 1 could be reduced to us, the term related to the variable I t is not considered in the PIDE anymore except at the time t k− 1 , which seemingly indicates the success in dimension reduction. However, we still have to consider the time point t k− 1 , where the variable I experience a jump. Furthermore, the variable I is still present in the terminal condition. To handle this and ensure that the claim's value remains continuous (which is required by the noarbitrary pricing theory), we utilize Little and Pant's approach and consider an additional jump condition at time t k− 1 : According to Little and Pant's two-stage approach, we divide the time period into two parts [0, t k− 1 ] and [t k− 1 , t k ], during each of which the variable I could be treated as constant. us, we have completed the dimension reduction for the PIDE during each of the time spans. en, we solve the PIDE in (24) backwards through two stages. We first derive the solution of the PIDE in the first stage in [t k− 1 , t k ], which will provide the terminal condition for the PIDE in the second stage in [0, t k− 1 ] through the jump condition. en, we further solve the PIDE in the second stage and obtain the analytical solution for the PIDE within the whole time period.
After the analytical solution W k (·) is obtained, we can further solve for U k (·) while taking into account the path change of the Markov chain α(t) as en, we can eventually calculate the conditional expectation that we are concerned with in (15) according to the Feynman-Kac theorem as follows: us, we can obtain the fair strike price K var in (14). Now we have illustrated our basic idea for solving this variance swap pricing problem; we then first start by solving the PIDE in (24) by the two-stage approach and the generalized Fourier transform method.

Stage I Algorithm.
Let T − Δt ≤ t ≤ T, and x � lnS; then, the equation in (24) can be easily converted to the following PIDE: 6 Discrete Dynamics in Nature and Society subject to the terminal condition Next we apply the generalized Fourier transform method to solve the above equation. Let V(w) � F(W k ) � R W k (x)e − jwx dx, and let Φ z (w) denote the characteristic function of the jump size distribution. en, (28) can be converted to the following partial differential equation (PDE): with the transformed terminal condition e conversion from (28) to (30) is quite simple according to the table of Fourier transform pairs. e only process we have to specify is the conversion of the term Let v(dz) � p(z)dz in (28) (the subscript is omitted here for convenience), and p(z) is the density function of the jump size distribution. en, we have the Fourier transform of the integral term arising from the jump diffusion as follows: Moreover, we specify the Fourier transform of the terminal condition as follows: where δ a (·), for any complex number a, is the generalized delta function with the same definition and property as in (17) and (18). Now we are concerned with the solution of the PDE (30) with the above terminal condition, which can be assumed to be of the following form by applying Heston's solution scheme: V � e L(w,t)+M(w,t)y V T . (34) Substituting the above expression into (30), we obtain the following ordinary differential equations (ODEs) with the corresponding terminal conditions, respectively: Discrete Dynamics in Nature and Society e ODE (35) can be solved explicitly as As for the ODE (36), let ; then, the equation can be solved numerically as Finally, according to the inverse Fourier transform, we obtain the solution to the PIDE in (28) as (40) en, as we have stated before, we can obtain the terminal condition for stage two, which is based on the solution W k (t, x, I, y) in the first stage, through the jump condition in (25): Note that here we are making use of the fact that lim t↓t k− 1 lnS t � lnI t according to the definition of I t , and the terminal condition above only contains one stochastic variable, y.
With the terminal condition, we can now move on to solving the PIDE (24) in the second stage.

Algorithm of Stage II.
Let 0 ≤ t ≤ T − Δt. In this stage, based on the terminal condition in (41), we calculate where G(t, y) � E Q (e M(− 2j,t)y |Ft(t)).
Since here we only have one unknown stochastic variable y which is contained in the term G(t, y), we have to solve for G(t, y) to finally obtain the closed-form expression of W k .
According to the Feynman-Kac formula, G(t, y) should satisfy the following PDE with the corresponding terminal condition: We assume that G is of the following affine form: Substituting (44) into (43), we obtain the following ODEs: with the terminal conditions R(T − Δt) � 0 and H(T − Δt) � M(− 2j, T − Δt). After some simple derivation, we obtain ). Substituting (43) into (42), we can finally obtain the solution to the PIDE in eorem 1 through the two-stage approach as follows:  Discrete Dynamics in Nature and Society

Variance Swap Pricing under Regime-Switching Markov
Chain. Now we have obtained W k as the value of U k based on a given realized path of the Markov chain α(t), and we calculate U k by taking into account the change of the sample path of the Markov chain. Combining (26) and (49), we obtain where Φ k1 (w, t) and Φ k2 (t) can be calculated by utilizing the following formula in the Proposition 3.2 of Elliott and Lian [7]: where E � (1, 1, . . . , 1) T ∈ R n and Q ′ denotes the transpose of the transition matrix Q.
According to (27), we have Since we have only considered the case where k > 1 as we have stated before, we have to further work on the case where k � 1 to obtain the summation in (14) fully.
For k � 1, we have t k � t 1 � T and t k− by making use of the result of the first stage in (41) as follows: Let N � AF * T e and Δt � T e /N � 1/AF. Combining (14), (52), and (53), we can eventually obtain our fair strike price as follows: where Comments: we conclude our calculation algorithm of the discretely sampled variance swap price in Appendix B. Also, the integrations of (47) and (51) are evaluated numerically by Simpson rule using Python, with the accuracy of o(h 4 ) (h denotes the sliced step size).

Numerical Examples
In this section, we present several numerical examples for illustrating our semiclosed pricing formula for a variance swap in a Heston model with Markov-modulated jump diffusion. e effect of incorporating regime switching and jump diffusion would be investigated. We will also derive the counterpart pricing formula for a continuously sampled model and compare the two different prices under varying observation frequency, which will be helpful for readers to understand the improvement in accuracy of our discrete sampling solution.
For simplicity, we assume that there are two market regimes: regime 1 and regime 2, which can be interpreted as the "bullish" and the "bearish" market, respectively. In this case, we have n � 2 and the state space of the Markov chain is reduced to E � e 1 , e 2 ; we assume the generator matrix Q as Discrete Dynamics in Nature and Society A basic set of parameters applied in this section is shown in Table 1. We would change some of the parameters while keeping others fixed to investigate the effect of the change of the particular parameter. As we can see from Table 1, the interest rate r and the mean reversion value b in "bullish" regime I (r � 0.06, b � 0.09) are higher than those in "bearish" regime II (r � 0.03, b � 0.04), and the jump in the "bullish" market is more oscillatory with higher jump intensity, which is economically reasonable. Note that the same parameters except the jump intensity are also adopted in Elliott and Lian [7] in a Heston stochastic volatility model with only regime switching. In addition, we consider both the Merton-type jump and the Kou-type jump, whose characteristic functions and density functions are listed in Table 2.
e parameters corresponding to the jump process are also adopted in Feng and Linetsky [28]. e lifetime of the variance swap contract is assumed to be T e � 1.

Model Validation.
To show the improvement of accuracy of our solution, we first compare our pricing formula with the semi-Monte-Carlo simulation and the continuously sampled counterpart.
Different from the traditional Monte-Carlo simulation, the semi-Monte-Carlo simulation is only required to simulate the sample path of the Markov chain. e simulation process is discussed in detail in Elliott and Lian [7] and Liu et al. [15]. We will implement the semi-Monte-Carlo simulation through the following procedures: (1) Simulate 10000 sample paths for the Markov chain α(t) through the generator matrix Q following the method of Liu et al. [15]. e continuous pricing formula can be obtained as follows: e derivation details can be found in Appendix B. Figure 2 compares the fair strike prices obtained from our discretely sampled pricing formula (54), the continuously sampled counterpart (58), and the semi-Monte-Carlo simulation. As we can see from the figure, the results from our discrete pricing formula match the results from the semi-Monte-Carlo simulation, which provides verification for our solution. In fact, our pricing formula is more efficiently ideal with an elegant closed form. On the other hand, one can also see from the figure that the fair strike price of the discrete model can be extremely high and deviate drastically from the continuous counterpart when the observation frequency is low. erefore, it would be very inappropriate to use the continuous price as an approximation of the discrete one in this situation. However, as the sampling period narrows, the discrete K var declines rapidly and asymptotically approaches the continuous K var .

Regime-Switching
Effect. Next, we examine the effect of incorporating regime-switching in our variance swap pricing model. We assume that the model without regime switching coincides with the "bullish" case of the model with regime switching, but with zero probability of switching to the other regime. Moreover, to get rid of the impact of the jump-diffusion part, we add the same jumps to both of the models with and without regime switching. We have documented different prices of both models under a range of observation frequencies in Table 3 where we could find that K var with regime switching is smaller than that without regime switching. is is reasonable due to the possibility of switching to the "bearish" regime where K var calculated from our pricing formula is smaller because of the smaller values of the related parameters. As a matter of fact, things would be the opposite if we assume that the model without regime switching coincides with the "bearish" case. To be more specific, comparisons between the pricing model with and without regime switching when entering markets with different initial regimes are shown in Figures 3 and 4.
In Figure 3, we add the Merton-type jump to both of the models with the parameters specified in Table 1, while in Figure 4, we consider the Kou-type jump with parameters specified in Table 1. We can conclude from Figures 3(a) and 4(a) that with the consideration of regime-switching possibility, K var under "bullish" market will be dragged down by the "bearish" market. Inversely, from Figures 3(b) and 4(b), we can see that K var under the "bearish" economy will be pulled up by the effect of the "bullish" market. Moreover, the difference between the two models seems wider in Figures 3(b) and 4(b) than that in Figures 3(a) and 4(a). is can be explained by the different transition rates defined in the generator matrix Q. e transition rate from regime 1 (bullish) to regime 2 (bearish) is four times the rate from regime 2 (bearish) to regime 1 (bullish). Consequently, the difference between K var of the model with and without regime switching in Figures 3(b) and 4(b) is approximately four times bigger than that in Figures 3(a) and 4(a).
To verify the influence of the transition rates on the fair strike price, we apply another set of generator matrix: where the transition rate from regime 1 to regime 2 is now bigger than that from regime 2 to regime 1. e numerical result is shown in Figure 5 where we can see that the difference of the price between the model with and without regime switching is wider when entering the "bullish" market (regime 1) than the "bearish" market (regime 2),     Model   (1) Initialization (2) for AF in [1,252] do (3) Δt � T e /AF (4) for k in [1,AF] do (the loop here is for calculating f k ) (5) T � kΔt (6) if k � � 1 then (7) Calculate f 1 (y 0 ) by (55) (8) else (9) Calculate f k (y 0 ) by (56) (10) end (11) f+ � f k (12) K var � 10000 * e rΔt f/T e (13) end (14) end ALGORITHM 1: Algorithm of computing the fair strike price using our pricing formula.  which implies that the transition rates do have a great influence on K var in our model.

Jump-Diffusion
Effect. Finally, we investigate the impact of the jump diffusion. Here, we also consider Merton-type jump and Kou-type jump in Figures 6 and 7, respectively. Note that we only focus on the case of a "bullish" market since the regime switching is not the major concern now. In Figure 6, we assume that the jump size is driven by a normal distribution. e influence of the jump intensity is investigated in Figure 6(a) by changing the value of λ while keeping other parameters fixed. Note that by setting λ � 0, we consider the pricing model without a jump. As the figure depicts, K var is positively correlated to the jump intensity and the jump diffusion does have a great influence on the price. Figure 6(b) shows the different prices with a varying mean of the jump size, from which we can also conclude that K var increases with the mean. ese results are in line with Broadie and Jain [5] where a similar conclusion about the effect of jumps is drawn. Figure 7 depicts the jump effects under Kou's model with the jump size being driven by a double exponential distribution. Same result is obtained from Figure 7(a) about the positive correlation between the jump intensity and the K var . Also, Figure 7(b) shows the positive effect of the weight we assign on each exponential distribution.
ree main conclusions drawn from the numerical analysis are summarized as follows: (i) e discretely sampled variance swap price converges to that of the continuously sampled counterpart as the observation frequency approaches infinity. (ii) Interactions of different market states resulting from the regime-switching probability are evident. For instance, the fair strike price under the "bullish" market will be smaller compared to the non-regimeswitching market with same model parameters due to the possible transition to the "bearish" market. (iii) Jumps have a significant effect on the variance swap price. More specifically, the fair strike price will increase as the jump intensity increases.

Conclusion
In this paper, we have investigated the pricing of a discretely sampled variance swap under the framework of Heston's stochastic volatility model with Markov regime-switching jump diffusion. e model parameters, including those related to the jump diffusion, are modulated by a Markov chain which is used to represent different market states. e pricing problem is reduced to the calculation of a series of conditional expectations based on the fact that a variance swap is essentially a forward contract that requires zero initial cost. By utilizing the two-stage approach and the generalized Fourier transform method, we have obtained a semiclosed pricing formula for the fair strike price K var . To show the improvement of the accuracy of our solution, we have also derived the price of a continuously sampled variance swap and compared the results from the two pricing formulas with a semi-Monte-Carlo simulation. We found that the discrete price asymptotically approaches the continuous price as the observation frequency increases, though the differences between the two prices could be drastic when the frequency is low. We have presented numerical analysis where a market with two regimes is assumed. We concluded that the possibility of regime switching could have a significant effect on the price, which is primarily related to the value of the transition rates. Moreover, we have examined the effect of incorporating the jump diffusion into the pricing model by considering both the Merton-type and the Kou-type jump. By changing the value of related jump parameters, we find that either jump has a significant effect on the price, which is positively correlated to the jump intensity. where κ � 〈λ j (μ 2 j + σ 2 j )〉 N i�1 . Consequently, we obtain the fair strike price for a continuously sampled variance swap as where κ � 〈λ j (μ 2 j + σ 2 j )〉 N i�1 .

B. Algorithm of Our Pricing Formula
In this appendix, we conclude our algorithm for computing the discrete variance swap price. For the initialization part, we simply write a class to include all the formulas obtained in our derivation. e benefit of using class is that parameters in different status can inherit our class method easily without redefinition (Algorithm 1).

Data Availability
e data and codes used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.