1 Introduction and literature review

In the realm of finance, both the stock and derivative markets are profoundly influenced by sentiment, reflecting the collective feelings and perceptions of investors which may underlie market movements. While traditional financial models often overlook the dynamic nature of markets, regime-switching models offer a nuanced approach by recognizing distinct market states or regimes characterized by specific behaviors and relationships among assets. Human behavior shapes the market, driven by emotions such as greed, fear, optimism, and pessimism; bullish periods reflect optimism, encouraging stock buying, while bearish phases driven by fear prompt selling. Behavioral finance merges psychology with economics, highlighting sentiment’s role in market dynamics. Investors use sentiment-driven strategies like momentum investing, leveraging trends shaped by sentiment. Recognizing these psychological factors helps informed decision-making in financial markets.

Despite sentiment’s sway in short-term dynamics, long-term investment relies on fundamental analysis. Yet, sentiment can skew perceptions, causing undervaluation or overvaluation relative to a company’s fundamentals.

In the derivative market, intricately linked to broader financial markets, sentiment is a driving force that can significantly shape pricing, trading volumes, and dynamics. Derivatives, with their leverage, mirror sentiment’s shifts; bullish markets lead to increased buying, while bearish markets intensify selling pressure, affecting both derivatives and underlying assets.

With the availability of social networks, specialized forums, and online news, sentiment analysis has become a common and useful technique to gauge investor perceptions and improve the analysis of economic and financial scenarios. Several data providers, such as Bloomberg and Thomson Reuters have also started computing proprietary sentiment indexes on financial assets to be delivered together with traditional figures such as price and trading volume.

From a modeling perspective, it is widely acknowledged in financial literature that classical diffusion processes fail to adequately explain various empirical findings related to asset return time series, such as heavy tails, skewness, and volatility clustering. Potential enhancements to these models include incorporating a jump component, such as the addition of a Poisson process, as demonstrated in the seminal work of Merton (1976), or the inclusion of a self-exciting jump, as seen in the Hawkes process (Hawkes 1971, 2018). Recent examples include the works of Brignone and Sgarra (2020) and Njike Leunga and Hainaut (2024). Brignone et al. proposed a method for pricing Asian options in market models with risky asset dynamics driven by a Hawkes process with an exponential kernel. They showed that Arithmetic Asian option prices can be computed efficiently using a standard Monte Carlo method. Njike et al. expanded Heston’s stochastic volatility model by adding a jump component driven by a Hawkes process with a kernel function defining the memory of the asset price process.

An alternative or complementary approach lies in regime-switching models. Motivated by the existence of regime-switching in real markets, as evidenced by Hamilton (1990), these models capture shifts between distinct market states characterized by varying risk-return profiles, instead of incorporating jumps. Understanding and modeling transitions between regimes enhances market understanding, providing insights into potential triggers and implications, which aid risk management and contingent claims valuation. Specifically, regime-switching stochastic volatility models represent a powerful framework that captures the dynamic nature of financial markets by allowing for changes in both volatility and market regimes over time. Extensive literature exists regarding the application of regime-switching stochastic volatility models driven by a continuous-time Markov chain process to various financial problems. Recent examples include the works of Hainaut and Moraux (2019) and Kirkby and Nguyen (2020). Hainaut et al. proposed a hidden Markov chain with a finite number of states that modulates the parameters of a self-excited jump process. Each regime corresponds to a particular economic cycle, determining the expected return, diffusion coefficient, and long-run frequency of clustered jumps. Beyond studying the theoretical properties of this process, the authors proposed an empirical application by fitting the model to the S &P 500. Kirkby et al. devised a transform method that combines continuous-time Markov chain approximation with Fourier pricing techniques to evaluate Asian options within stochastic jump diffusion models. A comprehensive literature survey in this direction is beyond the scope of this paper. Nevertheless, we suggest the readers to see e.g. Biswas et al. (2018), Lin and He (2020), Xie and Deng (2022), He and Lin (2023) and references therein for recent developments in regime-switching stochastic volatility models.

This paper introduces a novel Markov-modulated stochastic volatility model, where regime states are driven by investor sentiment; in our opinion, sentiment-dependent market regimes echo the complex interplay between investor psychology and market dynamics. Bullish markets foster optimism and buying, potentially leading to asset bubbles, while bearish markets amplify selling pressures and risk aversion. Transitions between financial market regimes are often propelled by shifts in investors sentiment.

A previous study delving into this direction is Cretarola and Figà-Talamanca (2020), wherein the proposed model specification enables a state-dependent correlation parameter between asset returns and market attention.

The primary contribution of this paper lies in the development of a modified version of the classical Heston model under the real-world probability measure. Here, price volatility also varies according to regime changes associated with a sentiment indicator. Specifically, we consider a two-factor Markov-modulated stochastic volatility model, where the diffusion coefficient in the risky asset dynamics is the square root of the sum of two independent factor processes; the first stochastic volatility component is modeled by a square-root process and the second independent stochastic volatility component is driven by an observable continuous-time Markov chain describing investors sentiment, as well as the drift coefficient. In addition, the correlation parameter is not constant but rather depends on the two volatility factors. We stress that we do not aim to uncover latent regimes for the asset price volatility but rather to relate the regime states to changes in investor sentiment.

The findings presented in this paper can be extended to more comprehensive models, also including jumps, such as Bates (1996), Eraker et al. (2003), Eraker (2004), allowing for an explicit form of the generalized characteristic function. Therefore, we have chosen to use the Heston model as our benchmark for its simplicity and widespread use in the field.

It is worth mentioning that most regime-switching stochastic volatility models are typically set under a risk-neutral probability measure. Moreover, the dependence on the Markov chain is usually incorporated into the model in the drift coefficients of the asset price process and/or its volatility dynamics, see Elliott et al. (2007), Elliott and Lian (2013), Elliott et al. (2016), Goutte et al. (2017) among others.

An explicit dependence on the Markov chain in the diffusion coefficient of the asset price dynamics is suggested in Papanicolaou and Sircar (2014), where the model analyzed includes regime switches and jumps. We differ from Papanicolaou and Sircar (2014) since our model adopts an additive form for the diffusion coefficient in the dynamics of the risky asset, unlike their multiplicative approach. Furthermore, differently from their setting, our model specification is given under the real-world probability measure; therefore, we need to address the issue of the existence of an equivalent martingale measure in order to perform the pricing procedure, see Sect. 3.

The rest of the paper is organized as follows; Sect. 2 defines the sentiment-biased price dynamics for a financial asset, Sect. 3 collects the necessary outcomes to obtain a quasi-closed pricing formula for European-style derivatives on a sentiment-biased underlying and Sect. 4 provides a numerical application of the results. Finally, Sect. 5 collects some concluding remarks. In the Appendix, we prove the main technical result on the generalized characteristic function, which is required in the pricing procedure.

2 Modeling framework

We consider a filtered probability space \((\Omega , {\mathcal {F}}, {\textbf{P}}; \mathbb F)\), where \(\mathbb F:=\{{\mathcal {F}}_t,\ t \ge 0\}\) satisfies the usual hypotheses of completeness and right continuity, and model the dynamics of the asset price process \(S=\{S_t,\ t \ge 0\}\) as follows:

$$\begin{aligned} \left\{ \begin{array}{ll} \textrm{d}S_t &{} = \mu _t S_t\textrm{d}t + \sqrt{u_t+a_t} S_t \textrm{d}W_t, \quad S_0=s\in \mathbb R_+,\\ \textrm{d}u_t &{} =\kappa (\theta - u_t)\textrm{d}t + \xi \sqrt{u_t} \textrm{d}B_t,\quad u_0=u \in \mathbb R_+, \end{array} \right. \end{aligned}$$
(2.1)

where \(W=\{W_t,\ t \ge 0\}\) and \(B=\{B_t,\ t \ge 0\}\) are correlated \(\mathbb F\)-Brownian motions, i.e. \(\langle \textrm{d}W, \textrm{d}B\rangle _t = \rho _t \textrm{d}t\). Following Pacati et al. (2014), the correlation factor is conveniently set to \(\rho _t=\rho (t,X_t,u_t):=\displaystyle \rho \sqrt{\frac{u_t}{u_t+a_t}}\) for each \(t \ge 0\), with \(\rho \in (-1,1)\). The model parameters \(\kappa ,\theta ,\xi \) are positive constants satisfying the Feller condition: \(2\kappa \theta \ge \xi ^2\). The drift coefficient \(\{\mu _t,\ t \ge 0\}\) and the volatility factor \(\{a_t,\ t \ge 0\}\) are Markov-modulated through a continuous-time Markov chain \(X=\{X_t,\ t \ge 0\}\) with finite state space \(\mathcal {X}=\{e_1,e_2,\ldots ,e_N\}\) of unit vectors in \(\mathbb R^N\), representing a suitable measure of market sentiment on the considered asset. We assume that X is homogeneous in time, it is independent of W and B and denote by \(Q=(q_{ij})_{i,j=1,\ldots ,N}\) the associated Q-matrix, where \(q_{ij}\) is an infinitesimal intensity of X. Then, it is possible to show that X admits the following semimartingale decomposition

$$\begin{aligned} X_t = X_0 + \int _0^t QX_u \textrm{d}u + M_t, \end{aligned}$$

where \(M=\{M_t,\ t \ge 0\}\) is a martingale with respect to the natural filtration \(\mathbb F^X=\{{\mathcal {F}}_t^X,\ t \ge 0\}\) of X, defined by \({\mathcal {F}}_t^X=\sigma (X_s, \ s \le t)\) for each \(t \ge 0\), see Elliott et al. (1995). Thus, we can write

$$\begin{aligned} \mu _t&:=\mu (X_t)=\langle \varvec{\mu }, X_t \rangle \\ a_t&:=a(X_t)=\langle \varvec{a}, X_t \rangle , \end{aligned}$$

for every \(t \ge 0\), where \(\varvec{\mu }:=(\mu _1,\mu _2,\ldots ,\mu _N) \in \mathbb R^N\) and \(\varvec{a}:=(a_1,a_2,\ldots ,a_N) \in \mathbb R_+^N\) capture the impact of X on the drift and volatility of the price process S, respectively.

We remark that when \(a_t=0\) the price volatility only depends on the square-root process u as in the original Heston model, hence we interpret this additional factor as a bias in the asset variance related to sentiment regime changes; according to this interpretation, Eq. (2.1) is referred to as a sentiment-biased stochastic volatility model. It is worth noticing that there exists a vast literature on Markov-modulated stochastic volatility models which usually assumes some of the drift coefficients in the asset or volatility dynamics to be state dependent. Many proposals, such as Elliott et al. (2016) rely on the pioneering paper Elliott et al. (2007) where the mean-reversion parameter of the instantaneous variance is assumed to switch between regimes. Since we believe that sentiment bias is short-lived, we prefer to assume a constant mean-reversion level for the variance factor and rather add a sentiment driven distortion in the diffusion coefficient of the asset price in Eq. (2.1). In the numerical exercise we provide a comparison with Elliott et al. (2016) that confirms our conjecture.

2.1 Model characteristics: a simulation exercise

In order to highlight the contribution of the sentiment-driven bias to the dynamics of the asset price, we simulate the model in (2.1) for the case of two- and three-regimes. Since we are mainly interested in the contribution of sentiment regimes to asset volatility and option prices, we set the drift parameter \(\mu \) at a constant value. The simulation exercise is based on the parameters reported in Table 1 for the original and sentiment-based (SB) Heston models.

Table 1 Assigned parameters values for the Heston model and for the sentiment-biased Heston model with two (SB Heston 2R) and three (SB Heston 3R) regimes
Fig. 1
figure 1

Paths example for the three different model: Heston (blue line), sentiment regime switching with two-regimes (black-line) and sentiment regime switching with three-regimes (red-line) (color figure online)

Finally, the transition matrices P and the marginal probabilities \(\pi \), corresponding to two and three sentiment regimes, are set to: \(P_{2reg} =\) \(\left( {\begin{matrix}0.7&{}0.3\\ 0.4&{}0.6\end{matrix}}\right) \), with \(\pi _{2reg}=[0.57; 0.43]\), and \(P_{3reg} =\) \(\left( {\begin{matrix}0.6&{}0.3&{}0.1\\ 0.2&{}0.5&{}0.3\\ 0.1&{}0.3&{}0.6\end{matrix}}\right) \), with \(\pi _{3reg}=[0.27;0.38;0.35]\).

In Fig. 1, we present two simulated paths illustrating asset price dynamics over a span of 2 years (730 days), assigning parameters as detailed above. These plots demonstrate how the inclusion of regimes leads to increased variability and possible shifts during specific subperiods.

For a deeper insight on model statistics, we sum up in Table 2 the basic summary statistics of daily logarithmic returns computed with respect to different time horizons T (1, 3, 6 and 12 months), on \(M=1000\) paths of the selected models. As expected, the overall contribution of sentiment bias increases with the time horizon, affecting the variability and the quantiles of the returns dynamics.

Table 2 Summary statistics of the daily logarithmic returns over different time horizons

To better assess the overall contribution of the regimes to the integrated volatility, we define the annualized integrated contribution over time of sentiment bias as

$$\begin{aligned} SB(0,T):=\sqrt{\frac{1}{T}\int _0^T a(X_s)\textrm{d}s}. \end{aligned}$$

Fig. 2 represents the mean annualized contribution SB(0, T) against different time horizons T and its empirical confidence bands at the \(90\%\) level, obtained by the simulation of \(M=1000\) different paths for the underlying Markov chain \(X_s,\ s\le T\).

Fig. 2
figure 2

Mean value of SB(0, T) (blue dotted line) and \(90\%\)-confindence bands (red solid line): the two-regimes case (left plot) and the three-regimes case (right plot) (color figure online)

3 Sentiment biased option pricing

In this section, we gather essential outcomes required to derive a quasi-closed pricing formula for European-style derivatives linked to a sentiment-influenced underlying. Specifically, our focus will delve into the measure transformations within the Markov-modulated Heston stochastic volatility model presented in (2.1), as well as the option pricing methodologies utilizing the conditional generalized characteristic function.

3.1 Risk-adjusted pricing measure

Let \(T>0\). To fix ideas, T is the expiration date of a derivative. Splitting the Brownian motion W into B and its orthogonal part \(B^\perp =\{B^\perp _t,\ t \ge 0\}\), we define the process \(L=\{L_t,\ t \in [0,T]\}\) by

$$\begin{aligned}{} & {} L_t=\exp {\left\{ -\int _0^t \gamma _u \textrm{d}B_u - \int _0^t \gamma _u^\perp \textrm{d}B_u^\perp -\frac{1}{2}\int _0^t \gamma _u^2 \textrm{d}u -\frac{1}{2}\int _0^t (\gamma _u^\perp )^2 \textrm{d}u\right\} },\nonumber \\{} & {} t \in [0,T], \end{aligned}$$
(3.1)

with \(\gamma =\{\gamma _t,\ t \in [0,T]\}\) and \(\gamma ^\perp =\{\gamma _t^\perp ,\ t \in [0,T]\}\) satisfying proper integrability conditions. Then, the process L provides the density of a risk-neutral measure if and only if it is a true martingale and the (local) martingale property of the discounted risky asset price process holds:

$$\begin{aligned} \mu (X_t)-r= \sqrt{u_t + a(X_t)}\left( \rho _t \gamma _t+{\bar{\rho }}_t \gamma _t^\perp \right) , \quad t \in [0,T],\quad {\textbf{P}}-\text{ a.s. }, \end{aligned}$$
(3.2)

where r denotes the (constant) risk-free interest rate and we have set \({\bar{\rho }}_t:=\sqrt{1-\rho _t^2}\). Inspired by Heston (1993), we assume

$$\begin{aligned} \gamma _t=b\sqrt{u_t},\quad t \in [0,T], \end{aligned}$$

for some constant b, so that u remains in the family of square-root processes under the candidate risk-neutral measure. By substituting \(\gamma _t\) for \(b \sqrt{u_t}\) in (3.2), we solve for \(\gamma _t^\perp \) and since \(\rho _t \in (-1,1)\), for each \(t \in [0,T]\), we get

$$\begin{aligned} \gamma _t^\perp =\frac{1}{{\bar{\rho }}_t}\left\{ \frac{\mu (X_t) - r}{\sqrt{u_t + a(X_t)}} - \rho _t b \sqrt{u_t}\right\} , \quad t \in [0,T]. \end{aligned}$$

Define the constant \(c:={\left\{ \begin{array}{ll} 1, \hspace{1.6 cm} \text{ if } \rho =0\\ \displaystyle \min {\left\{ 1,\frac{{\bar{\rho }}}{\rho }\right\} }, \text{ if } \rho \ne 0, \end{array}\right. } \) where \(\bar{\rho }:=\sqrt{1-\rho ^2}\). The following result ensures that the financial market described in Sect. 2 is arbitrage-free.

Proposition 3.1

Let L be the process given in (3.1). Then, for \(|b| \le \displaystyle \frac{\kappa }{\xi }c\) we get \(\mathbb {E}\left[ L_T\right] =1\) and hence the measure \({\textbf{Q}}\) defined by

$$\begin{aligned} { \left. \frac{\textrm{d}{\textbf{Q}}}{\textrm{d}{\textbf{P}}} \right| _T = L_T } \end{aligned}$$

is an equivalent martingale measure for S.

Proof

To ensure that the change in measure is well defined, it is sufficient to verify that the processes \(\gamma \) and \(\gamma ^\perp \) satisfy the Novikov condition, i.e.

$$\begin{aligned} \mathbb {E}\left[ \exp {\left\{ \frac{1}{2}\int _0^T \left( \gamma _s^2+(\gamma _s^\perp )^2\right) \textrm{d}s\right\} }\right] < \infty . \end{aligned}$$
(3.3)

First, since \(|b| \le \frac{\kappa }{\xi }\), by Kraft (2005, Proposition 5.1), we get

$$\begin{aligned} \mathbb {E}\left[ \exp {\left\{ \frac{1}{2}\int _0^T b^2 u_s\textrm{d}s\right\} }\right] < \infty , \end{aligned}$$

which implies that the Novikov condition \( \mathbb {E}\left[ \exp {\left\{ \frac{1}{2}\int _0^T \gamma _s^2\textrm{d}s\right\} }\right] < \infty \) is satisfied. Now, for every \(t \in [0,T]\), we have

$$\begin{aligned} (\gamma _t^\perp )^2&= \frac{1}{({\bar{\rho }}_t)^2}\left\{ \frac{\mu (X_t) - r}{\sqrt{u_t + a(X_t)}} - \rho _t b\sqrt{u_t}\right\} ^2\le \frac{2}{({\bar{\rho }}_t)^2}\left\{ \frac{(\mu (X_t) - r)^2}{u_t + a(X_t)} + \rho _t^2 b^2u_t\right\} \\&\le \frac{2}{1 - \rho ^2}\left\{ \frac{(\max _{j=1,\ldots ,N}\langle \varvec{\mu }, e_j \rangle - r)^2}{\min _{j=1,\ldots ,N}\langle \varvec{a}, e_j \rangle } + \rho ^2 b^2u_t\right\} , \end{aligned}$$

where the last inequality holds in view of the Feller condition and because of \(\rho _t^2 \le \rho ^2\), for every \(t \in [0,T]\). Since \((\gamma _t^\perp )^2\) is controlled by a quantity that is a linear function of \(u_t\), we can write

$$\begin{aligned} (\gamma _t^\perp )^2 \le A + C^2u_t, \quad t \in [0,T], \end{aligned}$$

for some suitable constants A and C. Here, \(C^2=\displaystyle \frac{2 \rho ^2 b^2}{1-\rho ^2}\) and it is easy to check that \(C^2 \le \frac{\kappa ^2}{\xi ^2}\). Then, by applying again Kraft (2005, Proposition 5.1), we get

$$\begin{aligned} \mathbb {E}\left[ \exp {\left\{ \frac{1}{2}\int _0^T C^2 u_s\textrm{d}s\right\} }\right] < \infty , \end{aligned}$$

which implies that \(\mathbb {E}\left[ \exp {\left\{ \frac{1}{2}\int _0^T (\gamma _s^\perp )^2\textrm{d}s\right\} }\right] < \infty \) is satisfied and therefore, the Novikov condition (3.3) holds. \(\square \)

By Girsanov’s Theorem, we obtain the \({\textbf{Q}}\)-Brownian motions \({\widetilde{B}}=\left\{ {\widetilde{B}}_t,\ t \in [0,T]\right\} \) and \(\widetilde{B}^\perp =\left\{ \widetilde{B}^\perp _t,\ t \in [0,T]\right\} \) defined as

$$\begin{aligned} {\widetilde{B}}_t&= B_t + \int _0^t\gamma _s \textrm{d}s, \quad \widetilde{B}_t^\perp = B_t^\perp + \int _0^t\gamma _s^\perp \textrm{d}s, \quad t \in [0,T]. \end{aligned}$$

Thanks to Proposition 3.1 we get that there are no arbitrage opportunities in the underlying financial market. Our model specification under the measure \({\textbf{Q}}\) reads as

$$\begin{aligned} \left\{ \begin{array}{ll} \textrm{d}S_t &{} = r S_t\textrm{d}t + \sqrt{u_t+a_t} S_t \textrm{d}{\widetilde{W}}_t, \quad S_0=s\in \mathbb R_+,\\ \textrm{d}u_t &{} =\alpha ( \beta - u_t)\textrm{d}t + \xi \sqrt{u_t} \textrm{d}{\widetilde{B}}_t,\quad u_0=u \in \mathbb R^+, \end{array} \right. \end{aligned}$$

where \(\alpha :=\kappa + b \xi \), \(\beta :=\frac{\kappa \theta }{\kappa + b \xi }\), and \(\textrm{d}{\widetilde{W}}_t = \textrm{d}W_t + (\rho _t \gamma _t + {\bar{\rho }}_t \gamma _t^\perp )\textrm{d}t\). Note that the Feller condition for the volatility process is also satisfied under \({\textbf{Q}}\), since we have \(2(\kappa + b \xi ) \frac{\kappa \theta }{\kappa + b \xi }= 2 \kappa \theta \ge \xi ^2\), which is the same as under \({\textbf{P}}\). Note that, since the Markov chain X is independent of W and B, its dynamics is not affected by the change of probability measure from \({\textbf{P}}\) to the selected pricing measure \({\textbf{Q}}\).

The above framework can be extended in order to discuss the market risk premium associated with changes in sentiment regimes. To this aim let us introduce a measure transformation for the Markov chain X and denote \(H_i(t)={\textbf{1}}_{\{X_t=e_i\}}\) and \(H_{ij}(t)=\sum _{0 < s \le t}H_i(s-)H_j(s)\), for \(i \ne j\) with \(i,j=1,\ldots , N\); then, the process

$$\begin{aligned} M_{ij}(t)=H_{ij}(t) - q_{ij}\int _0^t H_i(s)\textrm{d}s, \quad t \in [0,T], \end{aligned}$$

is a \({\textbf{P}}\)-martingale. Moreover, consider a matrix \({\tilde{\kappa }}=({\tilde{\kappa }}_{ij})_{i,j=1,\ldots ,N}\) with elements in \(\mathbb R\) satisfying \({\tilde{\kappa }}_{ij} > -1\) and \(\kappa _{ii}=0\), for all \(i,j=1,\ldots , N\). Define the probability measure \({\textbf{Q}}^X\) with respect to the measure \({\textbf{Q}}\) on \({\mathcal {F}}_t^X\) with Radon-Nikodym density \(\eta =\{\eta _t,\ t \in [0,T]\}\) given by

$$\begin{aligned} \eta _t=1+\int _0^t \sum _{i,j=1}^N \eta _{s-}{\tilde{\kappa }}_{ij}\textrm{d}M_{ij}(s),\quad t \in [0,T]. \end{aligned}$$

Then, Bielecki and Rutkowski (2004, Proposition 11.2.3) implies that X is also a Markov chain under \({\textbf{Q}}^X\) with generator \(Q^*=(q^*_{ij})_{i,j=1,\ldots ,N}\), where

$$\begin{aligned} q^*_{ij}=q_{ij}(1+{\tilde{\kappa }}_{ij}),\quad q_{ii}^*=-\sum _{j \ne i}q^*_{ij}. \end{aligned}$$

Since the process \(L \eta \), with L given in (3.1), turns out to be a \({\textbf{P}}\)-martingale, it provides an admissible change of measure. Here, \({\tilde{\kappa }}\) corresponds to the sentiment regime-switching risk parameter. Moreover, the discounted risky asset price process \({\widetilde{S}}=\{e^{-rt}S_t,\ t \in [0,T]\}\) remains a martingale even under \({\textbf{Q}}^X\) since its dynamics is not influenced by this measure transformation. A similar result has been also obtained in Bo et al. (2017), where a general jump-diffusion market with regime-switching is considered and a risk-neutral probability measure is derived by a combination of the Esscher transform and change of measure on time-inhomogeneous Markov chains. This observation stems from the fact that the regime-switching risk parameter \({\tilde{\kappa }}\) does not affect the martingale condition, as neither L nor \({\widetilde{S}}\) provide any information about the Markov chain.

3.2 Option pricing via the conditional generalized characteristic function

Let \(\Phi _{t,T}^{\textbf{Q}}(z):=\mathbb E^{{\textbf{Q}}}\left[ \exp {\lbrace i z\,(Y_T-Y_t)\rbrace }|{\mathcal {F}}_t\right] \), for \(z \in {\mathcal {D}}_{t,T}\), be the conditional generalized characteristic function of \(Y_T-Y_t\) under the probability measure \({\textbf{Q}}\), where \( {\mathcal {D}}_{t,T} \subseteq \mathbb C\) denotes the domain in which it is well defined.Footnote 1 Here, \(\mathbb E^{{\textbf{Q}}}\left[ \cdot |{\mathcal {F}}_t\right] \) represents the conditional expectation with respect to \({\textbf{Q}}\). The following result shows that it is possible to efficiently compute \(\Phi _{t,T}^{\textbf{Q}}\) in our model specification.

Theorem 3.2

Let \(z \in {\mathcal {D}}_{t,T} \subset \mathbb C\). Then, the conditional generalized characteristic function \(\Phi _{t,T}^{\textbf{Q}}(z)=\mathbb E^{{\textbf{Q}}}\left[ \exp {\lbrace i z\,(Y_T-Y_t)\rbrace }|{\mathcal {F}}_t\right] \) is given by:

$$\begin{aligned} \Phi _{t,T}^{\textbf{Q}}(z)=\phi _{t,T}(z)\times \phi _{t,T}^\textbf{J}(\textbf{s}(z)), \end{aligned}$$
(3.4)

where

$$\begin{aligned} \phi _{t,T}(z)=\phi _{t,T}(z;x,v,t,T):=\exp {\lbrace izx + D(z;\tau )v+C(z;\tau )\rbrace }, \end{aligned}$$
(3.5)

with

$$\begin{aligned} C(z;\tau )&:=i z r \tau +\frac{\alpha \beta }{\xi ^2}\left( (\alpha -i\rho \xi z-d)\tau -2\log \frac{1-g e^{-d\tau }}{1-g}\right) , \\ D(z;\tau )&:=\frac{1}{\xi ^2}(\alpha -i\rho \xi z -d)\frac{1- e^{-d\tau }}{1-ge^{-d\tau }}, \\ d&:=\sqrt{(\alpha -i\rho \xi z)^2+\xi ^2(iz + z^2)},\\ g&:=\frac{\alpha -i\rho \xi z-d}{\alpha -i\rho \xi z+d},\\ \tau&:=T-t \end{aligned}$$

and

$$\begin{aligned} \phi _{t,T}^\textbf{J}(\textbf{s}(z))= \langle \exp {\lbrace [ Q+ \textrm{diag}\left( \textbf{s}(z)\right) ] (T-t)\rbrace }X_t,\textbf{1}\rangle , \end{aligned}$$

where \(\textbf{1}:=(1,1,\ldots ,1)'\in {\mathbb {R}}^N\) and \(\textrm{diag}(\textbf{s}(z))=\textbf{s}(z) \, I_{N\times N}\), with \(I_{N\times N}\) denoting the \(N \times N\) identity matrix, \(\textbf{s}(z):=(s_1(z),s_2(z),\ldots , s_{N-1}(z),0)\) for \(s_k(z):=-\frac{i z+z^2}{2}(a_k-a_N)\), with \(1 \le k \le N-1\).

The proof is postponed to Appendix A.

We stress that \(\phi _{t,T}\) corresponds to the generalized conditional characteristic function of the log price at time T for the classical Heston model with parameters \(\alpha ,\beta ,\xi \); see Duffie et al. (2000), Lewis (2000), Lewis (2001) among others.

Remark 1

Analogous results can be obtained when similar sentiment biases are introduced in the drift and diffusion coefficients of several generalizations of the Heston model, as long as the generalized characteristic function of the unbiased model is well defined. Some examples are Bates (1996), Eraker et al. (2003), Eraker (2004) among others. Moreover, since the purpose of this paper is the evaluation of European-style derivatives we focused on the derivation of the \({\textbf{Q}}\)-characteristic function in (3.4). Nevertheless, it is possible to obtain an similar decomposition result under the real-world probability measure \({\textbf{P}}\).

Since the generalized characteristic function is known analytically, a straightforward application of the results referenced in Carr and Madan (1999), gives the following.

Proposition 3.3

The pricing function at time t of a Call Option with strike price K and maturity \(T>t\) is given by

$$\begin{aligned} C(S,u,K,T-t)=S \Pi _1 -K e^{ -r(T-t)} \Pi _2, \end{aligned}$$
(3.6)

where

$$\begin{aligned} \Pi _j=\frac{1}{2}+\frac{1}{\pi }\int _0^{+\infty } \textrm{Re}\left[ \frac{e^{-iz \log K} f_j\left( T-t,\log S,u,z\right) }{iz}\right] \textrm{d}z, \quad j=1,2 \end{aligned}$$

with

$$\begin{aligned} f_1\left( T-t,\log S,u,z\right) =\frac{\Phi _{t,T}^{\mathbb {Q}}(z-i)}{\Phi _{t,T}^{\mathbb {Q}}(-i)} \end{aligned}$$

and

$$\begin{aligned} f_2\left( T-t,\log S,u,z\right) =\Phi _{t,T}^{\mathbb {Q}}(z), \end{aligned}$$

with the function \(\Phi _{t,T}^{\mathbb {Q}}\) defined in (3.4). Here, \(\textrm{Re}[\ {}]\) denotes the real part of a complex variable.

Note that the pricing formula given in (3.6) aligns with the classical pricing formula established in the Heston model.

In Fig. 3 we compare the implied volatility smile obtained by computing option prices with the Heston pricing formula and considering the sentiment-biased correction in the two- and three-regime case. In both cases the volatility dynamics parameters are assigned as in Table 1, whereas two parameter settings are considered for the regime bias: we set \(a_1=0.01\), \(a_2=0.05\) in two-regimes case 1, \(a_1=0.01\), \(a_2=0.5\) in two-regimes case 2, \(a_1=0.03\), \(a_2=0.01\), \(a_3=0.05\) in three-regimes case 1 and \(a_1=0.1\), \(a_2=0.01\), \(a_3=0.5\) in three-regimes case 2.

Fig. 3
figure 3

Implied volatility for the Heston model and the two- and three-regimes distortions

4 A numerical application on market option data

This section is dedicated to illustrating the calibration of the model specification using market data. Specifically, our focus will be on three distinct S &P 500 components. A fundamental aspect lies in identifying the sentiment regimes.

4.1 Data description

The historical sentiment based on media news for Apple (AAPL), Amazon (AMZN), and Bank of America (BAC) stocks was retrieved from Bloomberg for the period January 1, 2015, December 19, 2023. In Fig. 4 the time series for the dynamics of the sentiment score are plotted for the assets considered.

Fig. 4
figure 4

News-based sentiment from January, 2015 to December 2023: Apple (top), Amazon (middle), Bank of America (bottom)

On December 19, 2023 we obtained the implied volatility smile for Apple, Amazon and Bank of America stocks from Eikon Refinitiv (now LSEG) by selecting all the options within a \(30\%\) range in moneyness and all of the available expiration dates above one week, namely \(T=16,23,30,37,58,86,121,149,184,212,240,275,366,394,548,639,730\) calendar days. We end up with a total of \(M=367,429,218\) options for Apple, Amazon and Bank of America, respectively. In Table 3 we report, as an example, the option data for Apple stock relative to \(T=30,58,86,184,366\) calendar days.

Table 3 Implied Volatility values (%) retrieved on December 19, 2023 for a sample of strike prices K and maturities T (in days) of Apple CALL options; the underlying price is \(S_0\)=195.89

4.2 Sentiment regimes

Sentiment scores are computed by Bloomberg using proprietary algorithms and range in the continuous interval [-1,1]. For a detailed description of their computation, see Figà-Talamanca and Patacca (2022). In order to identify sentiment regimes, we discretize the value range. For the two-regimes case, positive and neutral values of the Bloomberg sentiment score are associated to the first state (“positive sentiment”) of the Markov process and negative values are associated to the second state (“negative sentiment”). It is worth noticing that 10 (0.43%), 22 (0.94%) and 164 (7.01%) null values out of 2340 are observed for Apple, Amazon, and Bank of America, respectively, which need to be included either in the “positive” or in the “negative” sentiment state; we opt for the first alternative.

In the three-regimes case, we assume that the sentiment is “positive” when the score is above 0.10, is in the “neutral” state when the score belongs to the interval \(]-0.10,0.10[\), and is “negative” when below \(-0.10\). With this interpretation, we plot in Fig. 5 the time series of the sentiment polarity for the three considered assets. Note that the selection of the threshold to assign a neutral polarity to the sentiment score (\(\pm 0.10\)) is arbitrary. As a robustness test, all the analyses are replicated using several threshold values. Notably, the results shows no significant changes in terms of the model pricing performance, as reported in Appendix B.

Fig. 5
figure 5

Sentiment polarity from January, 2015 to December 2023 for the two-regimes (left) and three-regimes (right): Apple (top), Amazon (middle), Bank of America (bottom). Sentiment color code: Non-negative = Blue, Negative = Red, Positive = Green, Neutral = white (color figure online)

Since the regimes are derived by the Bloomberg sentiment index, the marginal probabilities are obtained by calculating the relative frequencies of being in a specific state. Similarly, each element of the transition matrix is determined by counting, for any pair \((r,s)\in \mathcal {X} \times \mathcal {X}\), the number of times for which the sentiment score moves from state r at time \(t-1\) to state s at time t for any \(t=1,2,\ldots ,T\), and then dividing by the total occurrences of being in state r. In Table 4 we display the state probabilities and the transition matrices estimated for the Apple, Amazon, and Bank of America stocks in the two- and three-regimes cases, using the time series of AAPL, AMZN, and BAC sentiment indices from January 2015 to December 2019.

Table 4 Sentiment polarity transition matrices P and marginal probabilities \(\pi \) for the two- and three-regimes model applied to Apple, Amazon, and Bank of America stocks

4.3 Calibration

Given the quasi-closed pricing formula (3.6) in Proposition 3.3 it is possible to obtain the model parameters by minimizing a suitable loss function on a sample of M observed option prices. Since most stock options are American-style, we define the loss function based on implied volatilities rather than option prices. Precisely, given a sample \(\textbf{IV}^*=\lbrace IV_1^*,IV_2^*,\ldots ,IV_M^*,\rbrace \) of implied volatilities derived from observed option prices, parameter values are obtained by minimizing the loss function in (4.1) below.

$$\begin{aligned} MSE(\alpha ,\beta ,\xi ,u_0,\textbf{a})= \frac{1}{M} \sum _{i=1}^M \left( IV(\alpha ,\beta ,\xi , u_0,\textbf{a};S_0,T_i,K_i)-IV_i^*\right) ^2. \end{aligned}$$
(4.1)

Calibration is performed by applying the Matlab function lsqnonlin to the entire data set of implied volatilities for the three considered stocks where the model implied volatility is computed assuming \(S_0=195.89,154.07,33.43\) USD, for Apple, Amazon and Bank of America stocks, respectively, and \(r=5\%\). These values correspond to the asset prices and the three-month T-bill interest rate observed on December 19, 2023.

The calibrated values of the model parameters as well as the corresponding level for the Root Mean Squared Error (RMSE) are reported in Table 5.Footnote 2

Table 5 IV Calibration results for AAPL, AMZN and BAC

The results show consistent parameter estimates for the volatility process across the three models; the lowest RMSE is achieved by the three-regime dynamics for Amazon stocks, whereas both the two-regime and three-regime alternatives yield the same value for Apple and Bank of America. It is worth noticing that the value of the parameter \(a_1\) is essentially 0 across all cases, suggesting that the optimal choice for the three-states model corresponds to the unbiased Heston dynamics when sentiment is positive.

We remark that the parameters reported in Table 5 are calibrated by assuming that the transition rate matrix is the one obtained under the real-world probability measure \({\textbf{P}}\), i.e. by selecting the pricing measure \({\textbf{Q}}\) introduced in Sect. 3.1. These results can be generalized to calibrate the transition rate matrix \(Q^*\) under the probability measure \({\textbf{Q}}^X\), allowing for the computation of the risk premium associated with regime changes, defined as \({\tilde{\kappa }}_{ij}=\frac{q_{ij}^*}{q_{ij}}-1\). In Table 6 we report both the transition rate matrices obtained through historical estimation (under \({\textbf{P}}\)) and calibration (under \({\textbf{Q}}^X\)), and the corresponding regime premium changes \({\tilde{\kappa }}\) for the three analyzed assets in the case of two regimesFootnote 3. Note that a negative (positive) risk premium is associated to a reduction (increase) of the regime change forward-looking probability \(q_{ij}^*\) with respect to the historical value \(q_{ij}\) for \(i,j=1,2\) with \(j\ne i\). The calibration of the other parameters do not differ substantially from the values reported in Table 5.

Table 6 Historical transition rate matrix Q, calibrated forward-looking transition rate matrix \(Q^*\) and matrix \({\tilde{\kappa }}\) for the two-regimes model applied to Apple, Amazon, and Bank of America stocks

To underscore the efficacy and utility of the sentiment-biased stochastic volatility model, we additionally calibrate the parameters and compute the calibration RMSE of the Elliott Markov-modulated variance model Elliott et al. (2016). The quoted model extends the benchmark Heston model by assuming that the mean-reversion level, representing the long-term variance to which the variance process reverts, is regime-dependent. The model we propose in this paper suggests that the “volatility bias” depending on sentiment is short-lived and affect the instantaneous rather than the long-term variance level. The calibration results and the corresponding RMSE for the Elliot model compared to our suggestion, reported in Table 7, seem to support our conjecture. Indeed, by comparing the RMSE values presented in Tables 5 and 7, it is evident that the model in (2.1) outperforms the Elliott model in all cases.Footnote 4

Table 7 IV Calibration results for AAPL, AMZN and BAC of Elliott regime switching model

To provide a deeper insight into the pricing properties on the model that we propose, Table 8 shows the values of the pricing RMSE for sub-samples of option data, categorized by maturity (5 levels) and moneyness (3 levels). Precisely we classify options as at-the-money (ATM) if their moneyness is within a 2.5% range with respect to the stock price, and as in-the-money (ITM) and out-of-the-money (OTM) if their moneyness is above 1.025 or below 0.975, respectively. The RMSE values are reported in the table for the Heston benchmark model and the two- and three-regime sentiment biased cases. In general, the sentiment-based specification consistently outperforms the benchmark across all groups for the analyzed stock options. with the only exceptions of Apple options for 6 months \(< T \le 12\) months and Amazon options for 1 month \(< T \le 6\) months.

Table 8 IV RMSE results for AAPL, AMZN and BAC

Finally, in Figs. 67 and 8 we plot the observed implied volatility smile (dots) and the corresponding model curves for the Heston (blue) and the best sentiment-biased specification (red) for a sample of maturities. It is confirmed that the biased model offers a superior fit for all considered stock options.

5 Conclusions

In summary, this paper presents a Markov-modulated stochastic volatility model, driven by investor sentiment to characterize market regimes. Our specification is a modified version of the Heston model under the real-world probability measure, where price volatility dynamically responds to shifts in sentiment-influenced regimes. Precisely, the diffusion coefficient is given by the sum of a square-root-driven stochastic volatility component and a function of an observable continuous-time Markov chain representing the investor sentiment.

The main theoretical contribution of this study is the introduction of a modified version of the classical Heston model, incorporating sentiment-dependent regime changes under the real-world probability measure. This modification aims to address the dynamics of market sentiment more accurately. In discussing the existence of the risk-neutral probability measure, we ensure the absence of arbitrage opportunities within our framework. We further enhance the model’s utility by deriving a quasi-closed formula for pricing European-style derivatives, leveraging the insights gained from our modified Heston model. To validate the effectiveness of our approach, we calibrate the model using data from the US market, providing empirical evidence of its applicability in real-world scenarios, and conduct a comparative analysis with the Heston benchmark model to evaluate the performance of our proposed approach in capturing market dynamics and pricing derivatives effectively. A further comparison is provided with the regime-switching model in Elliott et al. (2016) which is also outperformed by our proposal.

Fig. 6
figure 6

AAPL model and market option smiles observed on December 19, 2023 for maturity dates T=January 12, 2024 (top-left), March 15, 2024 (top-right), June 21, 2024 (bottom-left) and December 20, 2024 (bottom-right)

Fig. 7
figure 7

AMZN model and market option smiles observed on December 19, 2023 for maturity dates T=January 19, 2024 (top-left), January 26, 2024 (top-right), July 19, 2024 (bottom-left) and January 17, 2025 (bottom-right)

Fig. 8
figure 8

BAC model and market option smiles observed on December 19, 2023 for maturity dates T=February 16, 2024 (top-left), March 15, 2024 (top-right), May 17, 2024 (bottom-left) and July 19, 2024 (bottom-right)

By addressing these aspects, the study adds to the understanding of sentiment’s impact on market behavior, offering insight into potential triggers, implications, and avenues for effective risk management. Indeed, regulators and risk managers recognize sentiment’s significance in derivatives, monitoring for speculative risks, and systemic vulnerabilities. Integrating sentiment analysis into risk frameworks helps anticipate market scenarios and mitigate adverse impacts. The model proposed in this paper may be further extended by allowing for jumps in the asset price dynamics where either the jump intensity or the jump size can be potentially biased by investor sentiment. Finally, an interesting avenue for further investigation is the application of this approach to market indexes and to the consistent pricing of derivative products tied to the underlying stock or its volatility, measured by indices such as VIX or SPIKES (see Carr and Figà-Talamanca 2020).