1 Introduction

Customer experience has emerged as a new battleground in investment management. AI is changing how financial institutions attract and retain customers, and through this, offers the opportunity for firms to innovate and enhance the investor journey. What is certain now is that investment management firms can no longer rely solely on price and outperformance to attract investors. Firms that adapt their apps and integrate AI, data, and analytics into their bank solutions will be better placed to optimize and execute their product and content distribution strategies.

On the other hand, human decisions are largely relied upon on how information is represented by third parties. According to Pompian (2017), the way investors think and feel affects their investment behaviors which is unconsciously influenced by past experiences and personal beliefs to the extent that even intelligent investors may deviate from logic and reason. Bollen et al. (2011) find that Twitter mood predicts subsequent stock market movements. Gilbert and Karahalios (2010) find that the level of anxiety of posts on the blog site Live Journal predicts price declines. Behavioral finance suggests that the investment decision-making process is influenced by various behavioral biases that encourage investors to deviate from rationality and make irrational investment decisions (Kumar and Goyal, 2015).

Investors’ perceptions regarding the risk and return characteristics of a particular stock or the stock market are commonly assumed to be key drivers of their decision making (McInish and Srivastava, 1984; Antonides and der Sar, 1990). This means that investors must decide which risks to take and how much to take.

While previous experiments have already shown that emotions can increase risk aversion (Kuhnen and Knutson, 2005, 2011; Knutson et al. 2008), our goal is to provide some prior knowledge of the likely risk scenarios that can face different type of investors (i.e. floor brokers, in-house traders, institutional traders), and to provide an algorithmic trading system for financial enterprises that intend to take full advantage of AI applying machine learning techniques to more accurately move its smart banking solutions from manual to semi-automated or fully automated processes and help their customers segments which have been traditionally underserved to become more rational and unbiased using the IFM method (inference function for margins) proposed in Xu (1996) and which is widely used on the financial industry.

Precisely we have selected the assumption of skewed student-t distributed residuals on a GARCH(1,1) regression and copulas for the inter-dependencies, implemented by one of the biggest German banks (for disclosure contract, the name of the bank is confidential) because of its reliability. Models, whose only input are the historical prices of the forecasted securities.

We believe that this method is not sufficient in certain market situations. The main purpose is the testing of the IFM method in different scenarios, where each scenario is composed of two simulations in two consecutive time intervals in the past (in normal market conditions and in specific market events that changed the course of securities). To assess the perpetuation of the risk extracted from both simulations.

The risk measure used is the value at risk (Linsmeier and Pearson, 1996; Jorion, 1997), which estimates how much might a set of investments lose (with a given probability), in a set time period such a year. A Monte Carlo Simulation (Glasserman, 2003) with a GARCH process is performed in order to calculate the expected return, volatility and the value at risk (Wiener and Benninga, 1998), on both, portfolio and instrument level (Gueant 2012).

The project gives an insight of the current research on the topic, followed by a detailed explanation of the method, the data-set used for the simulation, the results obtained, the discussion of the results and finally the conclusions for the future research of a new combined model.

2 Theoretical Background

Traditional financial theories consider that investors operate rationally in making financial decisions (Kiymaz et al., 2016) and evaluate possible alternatives on the basis of utility and associated risk. Risk is understood as the degree of uncertainty or potential financial loss inherent in an investment decision. A preliminary concept was introduced in Modern Portfolio Theory by Nobel laureate Harry Markowitz in his paper “Portfolio Selection” published in 1952 by the Journal of Finance.

However, different studies reported that investors usually do not make rational or logical decisions. Under this context, in the 1980s, behavioral finance emerged as a new concept in the fields of economics and finance. It studies the psychological and behavioral aspects, and the irrationality of investors in economic and financial decision-making (Barber and Odean, 2000; Weisbenner and Ivkovich, 2003; Statman et al., 2006). Different authors have conducted studies in this field. For instance, M. Barber and Odean (2001) studied behavioral changes in individual investment decisions. Kumar and Goyal (2015) analyzed how behavioral biases may influence the investor’s rationality in investment decision-making even though risk is a determining factor when it comes to invest (McInish and Srivastava 1984). Bailey et al. (2011) show the effect of behavioral biases on mutual fund options. The results show that investors tend to make poor decisions about their investments. And Kiymaz et al. (2016), studied the behavioral biases of financial professionals in Turkey. These authors concluded that younger professionals, with less training, with less risk aversion, and with unique brokerage accounts are more likely to invest in stocks.

Another line of work focuses on trying to explain the behavior of investors using various dimensions in addition to the biases of investors. For example, Georgarakos and Fürth (2015) use financial competence and show that financial advice is more important for investors with little perceived financial competition. Hoffmann et al. (2013) state that investors who use fundamental analysis are more likely to take risks, have high trading volumes and are overconfident. van Rooij et al. (2011), on the other hand, conclude that basic financial education is positively related to participation in the stock market. Also, Nicolosi et al. (2009) say that investors learn from their investment experiences, despite presenting irrational behavior. Finally, comment that many studies use gender, marital status, impact of coworkers, financial education and cultural differences to explain the behavior of the investor (Bernard et al., 2018; Jacobsen et al., 2014; Halko et al., 2012; Heimer, 2014; Mugerman et al., 2014; Tekçe et al., 2016).

Researchers and financial institutions have created and applied models to assess the risk of financial products. Being the regression models, like the IFM method, first introduced by Joe and Xu (1996) the most used in the financial sector. These models take no more input than the time series of the securities, that is, sequence of prices in the market of a given security, in chronological order. The IFM method consists of doing separate optimization of the uni-variate likelihoods, followed by an optimization of the multivariate likelihood as a function of the dependence parameter vector. Further information regarding the IFM method can be found in McNeil et al. (2005), Nelder and Mead (1965).

The optimization of the uni-variate likelihoods, is given by maximizing the quasi maximum likelihood function (QMLE) instead of the Maximum likelihood, see Bollerslev and Wooldridge (1992). Where each d estimations follow the skewed-t GARCH(1,1) models (Bollerslev, 1986; Alberga et al., 2008; Jondeau et al., 2007; Lambert and Laurent, 2001; Pantelidis and Pittis, 2005). Whereas the multivariate likelihood, is on this case given by the ML of a d dimensional Student-t Copula (Embrechts et al., 2001; Nelsen, 2006; Scherer and Mai, 2014; Zhang and Ng, 2010), optimized by the BFGS algorithm. Finally the value at risk is forecasted with a Monte Carlo Simulation (Glasserman, 2003) following a GARCH(1,1) regression.

The method exposed on the next section follows the state of the art in one of the biggest German financial institutions. This method has been used in this work for the calculation of the results.

3 Methods

Our approach fits \(n\) GARCH(1-1) models in order to estimate the unconditional variance and the skewed studen-t distributed residuals on single product level. Next to a student-t copula fitting of \(n\) dimensions for the inter-dependencies on portfolio level. Finally, performing Monte Carlo simulations with the previous fitted models to estimate the future prices, used to calculate the VaR.

3.1 GARCH Fitting

Giving \(n\) observations of \(d\) individual financial products we denote the vector containing the \(n\) observations for an individual product \(j\) with \(Y_j\), for \(j \in 1,...,d\). Hence \(Y_j\) is a \((1 \times n)\) vector for each \(j\). Along these lines the matrix \( Y = (Y_1,\ldots , Y_d)\) is \(d \times n\) . The standard GARCH(p, q) model estimates the variance of returns as a simple quadratic form, hence the variance can be expressed at time \(t\) as in Bollerslev (1986) by:

$$\begin{aligned} \sigma ^2_t = \omega + \sum _{i=1}^{q} \alpha _{i} \epsilon _{t-i}^{2} + \sum _{j=1}^{q} \beta _{j} \sigma _{t-j}^{2} \end{aligned}$$

Since we are following the IFM method, one is considering each financial product separately and therefore the fitting boils down to a GARCH(1, 1) model without drift \(\mu = 0\) which is then given by

$$\begin{aligned} \sigma ^2_t = \omega + \alpha \epsilon _{t-1}^{2} + \beta \sigma _{t-1}^{2} \end{aligned}$$
(1)

The input parameters for the model are as follows:

  • \(\epsilon _t = y_{t,j}\), thereby \(y_{t,j}\) denotes the (log) return of the \(j\)-th financial product at time \(t = i\) (the i-th observation).

  • \(\epsilon _t = z_t \sigma _t\), where \(z_t \sim st(0,1,\nu _t,\lambda _t)\).

The skewed Student t-distribution (st) with mean zero and unit variance extends the regular Student t-density with \(\nu \in (2,\infty )\) degrees of freedom by an additional skewness parameter \(-1< \lambda < 1\). The density f for \(z_t\) is defined as (Hansen, 1994):

$$\begin{aligned} f(z_t,0,1,\nu ,\lambda ) = \left\{ \begin{array}{ll} bc\left( 1+\frac{1}{\nu - 2}\left( \frac{bz + a}{1 - \lambda }\right) ^2\right) ^{-(v+1)/2} \quad for \quad z_t < -\frac{a}{b}\\ bc\left( 1+\frac{1}{\nu - 2}\left( \frac{bz + a}{1 + \lambda }\right) ^2\right) ^{-(v+1)/2} \quad for \quad z_t \ge -\frac{a}{b} \end{array} \right. \end{aligned}$$
(2)

thereby the constants a, b and c are defined by

$$\begin{aligned}&a = 4 \lambda c \left( \frac{\nu - 2}{\nu - 1}\right) , \end{aligned}$$
(3)
$$\begin{aligned}&b^2 = 1 + 3 \lambda ^2 - a^2, \end{aligned}$$
(4)
$$\begin{aligned}&c = \frac{\Gamma \left( \frac{v + 1}{2}\right) }{\sqrt{\pi (\nu - 2)}\Gamma (\nu /2)} \end{aligned}$$
(5)

An alternative definition of the density function f can be found in Lambert and Laurent (2001). The next step is to express the ML function in order to obtain the residuals \(\epsilon \) and the optimal parameter vector , i.e \(\Theta = (\nu ,\lambda ,\sigma _t)\), i.e \(\Theta = (\nu ,\lambda ,\omega , \alpha , \beta )\). Instead of maximizing the ML function, it can be also optimized the quasi maximum likelihood function (QMLE) see Bollerslev and Wooldridge (1992)

$$\begin{aligned} L_T(z_1,\ldots ,z_T;\Theta ) = \frac{1}{T} \sum _{t=1}^{T} l_t(\Theta ) = \frac{1}{T} \sum _{t=1}^{T}\mathrm{log}\left( \frac{f(z_t;\nu ,\lambda )}{\sigma _t}\right) . \end{aligned}$$
(6)

Thereby \(t = 1,\ldots ,T\) denotes the timestamp of the transformed observations \(z_t = \frac{\epsilon _t}{\sigma _t}\). We can also write \(t = 1,\ldots ,T\), \(i = 1,\ldots ,n\) for \(n\) observations collected for the specific financial product. After optimizing the ML function obtains \(\hat{\Theta }\) and with the optimal values for \({\sigma _t}\) for \(t = 1,\ldots ,T\) and equation (2.1) we get the optimal values for \({\alpha , \beta }\) and \({\omega }\). To obtain the optimal values for \({\nu , \lambda }\) and \({\sigma }\) we use the direct search method by Nelder and Mead (1965) (downhill simplex). By minimizing the negative QMLE function in (2.6) in combination with the formula (2.4) we obtain the volatility scaling parameters, the distribution parameters and the residuals (marginal distribution parameters for the Copula estimation).

3.2 Copula Fitting

In this section it is described how to fit a multivariate t-copula to a set of \({d}\) financial products i.e returns using Kendalls Tau for estimating \({\rho }\). The parameter for the degrees of freedom \({\nu }\) is obtained via a ML estimation. The density of a d-dimensional Student-t-Copula with parameters \({\rho }\) and \({\nu }\) degrees of freedom can be written as follows (Demarta and McNeil, 2004):

$$\begin{aligned} c^{t}_{\rho ,\nu }(u_1,\ldots ,u_d) = \frac{f_{\rho ,\nu }(t_{\nu }^{-1}(u_1),\ldots ,t_{\nu }^{-1}(u_d))}{\prod _{j=1}^{d}f_{\nu }(t_{\nu }^{-1}(u_i))} \end{aligned}$$
(7)

Thereby \(t_{\nu }^{-1}(u_1)\) represents the corresponding quantile of a student \(t\) distribution with \(\nu \) degrees of freedom. The function \(f_{\rho ,\nu }\) defines the density of a multivariate student-t distribution and along these lines \(f_\nu \) the density of a univariate student-t distribution. The nominator in (7) can be written as follows (Demarta and McNeil, 2004):

$$\begin{aligned} f_{\rho ,\nu }(t_{\nu }^{-1}(u_1),\ldots ,t_{\nu }^{-1}(u_d)) = \frac{\Gamma \frac{\nu + d}{2}}{\Gamma (\frac{\nu }{2}) \nu ^{d/2} \pi ^{d/2} \rho ^{1/2} [1 + \frac{1}{\nu }(q - \mu )' \rho ^{-1}(q - \mu )]^{(\nu +d)/2}} \end{aligned}$$
(8)

The vector \(q = (q_1,\ldots , q_d)\) denotes the quantile of a Student \(t\) distribution for the ith observation of the jth risk factor after a strictly increasing transformation. Hence for one point in time (fix \(i\)), \(q\) maps all risk factors \((u1,\ldots , ud)\) to their corresponding quantiles with values in \(\mathbb {R}\). Hence for each \(i\) (which can be interpreted as the time) we obtain a \(d\) dimensional vector \(q\). For \(d = 1\) we obtain the uni variate Student’s t-distribution, which looks as follows

$$\begin{aligned} f_{\nu }(t_{\nu }^{-1}(u_j)) = \frac{\Gamma \frac{\nu + 1}{2}}{\Gamma (\frac{\nu }{2}) \sqrt{\nu \pi }(1 + \frac{q_{j}^{2}}{\nu })^{(\nu +1)/2}} \end{aligned}$$
(9)

Hence the density of a \(d\) dimensional Student \(t\) Copula with parameters \(\rho \) and \(\nu \) degrees of freedom can be written as follows

$$\begin{aligned} c^{t}_{\rho ,\nu }(u_1,\ldots ,u_d) = \frac{1}{\sqrt{|\rho |}} \frac{\Gamma (\frac{\nu + d}{2})\Gamma (\frac{\nu }{2})^{d-1}}{\Gamma (\frac{\nu + 1}{2})^d} \frac{\prod _{j=1}^{d}(1 + \frac{q_j^2}{\nu })^{\frac{\nu + 1}{2}}}{(1 + \frac{q'\rho ^{-1}q}{\nu })^{\frac{\nu + d}{2}}} \end{aligned}$$
(10)

Thereby \(|\rho |\) denotes the determinant of the input matrix \(\rho \) and \(\Gamma (\cdot)\) the gamma function. Since we are interested in the optimal parameters for \(\rho \) and \(\nu \) within the next subsections of this manual the necessary steps and mathematical derivations are provided, derived and explained in more detail.

3.3 The Rank Transformation

We assume that the residual vector \(\epsilon _1,\ldots ,\epsilon _d\) is given, whereas each vector is assumed to have a different distribution \(F_j\) for \(j = 1,\ldots ,d\) and \(i = 1,\ldots ,n\) observations. The approach follows Scherer and Mai (2014) and works as follows: For each time series \(Y_j\) the idea is to replace the smallest of these number with the value \(\frac{1}{n + 1}\), the second smallest with the value \(\frac{2}{n + 1}\) and so on. In general terms, the data is transformed in such a way that no information regarding the dependence is lost. Further it holds true that now all values are within the unit interval \([0, 1]\). Since copulas are defined for values in \([0, 1]\) this step is crucial in order to transform the returns \(\epsilon \) to \(U_j\).

3.4 Estimating \(\rho \)

The method for estimating \(\rho \) is oriented on McNeil et al. (2005) p.231. Hence calibrating \(t\) copulas using Kendalls Tau \(\tau \) (for a formal definition of Kendalls Tau see Nelsen (2006) p.158). Given a vector \(U\) the relationship between Kendalls Tau and the correlation parameter of the student t copula \(C_t(\nu ,\rho )\) is given by

$$\begin{aligned} \rho _\tau (U_i,U_j) = \frac{2}{\pi } \,\text{arcsin} \, {(\rho _{i,j})} \end{aligned}$$
(11)

Since one can directly calculate Kendalls Tau (the left hand side) we can invert (11) in order to obtain the following estimator for the copula parameter \(\rho \).

$$\begin{aligned} \rho_{\tau} (U_i,U_j) = \frac{2}{\pi }\,\text{arcsin}\, {(\rho _{i,j})} \Rightarrow \sin \left(\rho_{\tau} (U_i,U_j)\frac{\pi }{2}\right) = \rho _{i,j}. \end{aligned}$$
(12)

Hence the estimated symmetric matrix \(\hat{\rho }\) which is \(d x d\) has the following shape:

$$\begin{aligned} \hat{\rho } = \begin{bmatrix} 1 &{} \sin {(\rho _\tau (U_1,U_2)\frac{\pi }{2})} &{} \cdots &{} \sin {(\rho _\tau (U_1,U_d)\frac{\pi }{2})} \\ \sin {(\rho _\tau (U_2,U_1)\frac{\pi }{2})} &{} 1 &{} \cdots &{} \sin {(\rho _\tau (U_2,U_d)\frac{\pi }{2})} \\ \vdots &{} \vdots &{} \ddots &{} \vdots \\ \sin {(\rho _\tau (U_d,U_1)\frac{\pi }{2})} &{} \sin {(\rho _\tau (U_d,U_2)\frac{\pi }{2})} &{} \cdots &{} 1 \end{bmatrix} \end{aligned}$$
(13)

The easiest way to obtain the desired matrix \(\hat{\rho }\) is to calculate Kendalls Tau empirically for each pair \((U_i,U_j)\) followed by transforming each entry of the matrix with the given sinus transformation. Once calculated, \(\hat{\rho }\) will be used as starting point for the optimizer of the log likelihood function after applying a QR decomposition of the matrix.

3.5 Maximum Likelihood Estimation

The estimation of the empirical \(\rho \) in section 4.4 can be seen as a starting point for the further optimization. A more sophisticated approach for finding the relevant parameters is the simultaneously estimation of \(\rho \) and \(\nu \). The necessary input vector is given by the transformed values, denoted by \(u\). Due to the fact that \(\log (\prod _ia_i) = \sum _i \log (ai)\) and \(\log (\frac{a}{b}) = \log (a) - \log (b)\) one can rewrite the ML function for the density in (7) and a given observation as follows

$$\begin{aligned} \begin{aligned} \log (c^{t}_{\nu ,\hat{\rho }}(u_1,\ldots ,u_d)&= \log \left( \frac{f_{\nu ,\rho }(t_{\nu }^{-1}(u_1),\ldots ,t_{\nu }^{-1}(u_d))}{\prod ^{d}_{j=1} f_\nu (t_{\nu }^{-1}(u_j))}\right) \\&= \log \left( f_{\nu ,\rho }(t_{\nu }^{-1}(u_1),\ldots ,t_{\nu }^{-1}(u_d))\right) - \log \left( \prod ^{d}_{j=1} f_\nu (t_{\nu }^{-1}(u_j))\right) \\&= \log \left( f_{\nu ,\rho }(t_{\nu }^{-1}(u_1),\ldots ,t_{\nu }^{-1}(u_d))\right) - \sum ^{d}_{j=1}\log ( f_\nu (t_{\nu }^{-1}(u_j))) \end{aligned} \end{aligned}$$
(14)

3.6 Broyden–Fletcher–Goldfarb–Shanno Algorithm

In order to solve the stated ML equations we are applying the Broyden–Fletcher–Goldfarb–Shanno algorithm which is iterative method for solving unconstrained non linear optimization problems. The algorithm itself belongs to the class of Quasi-Newton method, which is characterized by the fact that the algorithm is approximating the Hessian matrix.

3.7 Monte Carlo Simulation

The standard Monte Carlo approach exploits the Law of Large Numbers Theorem in order to get an estimation for a theoretical expectation, such as the price of a financial product. With the Monte Carlo path simulations we are able to compute a theoretical expectation numerically by constantly repeating a specific simulation and averaging the obtained result. These random numbers will be used to estimate the return of the asset at the end of the analysis horizon. \(N\) paths of independent standardized residuals over \(m\) days horizon are going to be obtained in order to calculate the expected return, volatility and the value at risk (VaR). This method is especially useful if the expectation that we are interested in has no closed analytic solution. Another advantage is that the Monte Carlo estimator is easy to implement and works independently of the underlying distribution and hence for a tremendous class of stochastic processes.

3.7.1 Monte Carlo Simulations Including GARCH Models and the t-Copula

According to Bollerslev (1986), given the GARCH(1,1) model (Eq. 1), the optimal predictor \(\hat{\sigma }^{2}_{t+s}\) of the conditional variance for forecast horizon \(s\) is the conditional expected value:

$$\begin{aligned} \hat{\sigma }^{2}_{t+s} = E_t[\sigma ^{2}_{t+s}] = \omega \sum (\alpha + \beta )^{i-1} + (\alpha + \beta )^{s - 1}\sigma ^{2}_{t+1'} \end{aligned}$$
(15)

where \(\omega \), \(\alpha \), \(\beta \) and \(\sigma _{t+1}\) are obtained through the GARCH fitting process. Moreover, as \( \alpha + \beta < 1\) the unconditional variance can be expressed:

$$\begin{aligned} \sigma ^2 = \mathrm{Var}(\epsilon _t) = \frac{\omega }{1 - \alpha - \beta } \end{aligned}$$
(16)

in that case, (15), can be written as follows:

$$\begin{aligned} \hat{\sigma }^{2}_{t+s} = \sigma ^{2} + (a + b)^{s-1}(\sigma ^{2}_{t+1} - \sigma ^{2}). \end{aligned}$$
(17)

Since \(\alpha + \beta < 1, (a + b)^{s-1}\) converges to zero for \(s \rightarrow \infty \) and therefore \(\hat{\sigma }^{2}_{t+s} \rightarrow \sigma ^2\) for \(\rightarrow \infty \). Hence the predictor tends to the unconditional variance.

The innovation process used to forecast the returns is described by the following formula

$$\begin{aligned} \epsilon _t = z_t\sigma _t + \mu \end{aligned}$$
(18)

where \(z_t\) is the random generated residual and \(\mu \) denotes the drift factor.

3.7.2 Simulations on a Single Product Level

In the case of independent products, \(z_t\) follows a skewed student-t distribution (2) for the innovations. Hence \(z_t \sim st(0,1,\nu _t, \lambda _t)\) is generated through the inverse transform sampling method, i.e. it is obtained by the quantile function which is defined as follows (Jondeau et al. 2007):

$$\begin{aligned} F^{-1}(y)=\left\{ \begin{array}{ll} \frac{1}{b} [(1 - \lambda ) \sqrt{\frac{\nu - 2}{\nu }} T^{-1}(\frac{y}{1 - \lambda }|\nu ) - a] \quad for \quad y < \frac{1 - \lambda }{2} \\ \frac{1}{b} [(1 + \lambda ) \sqrt{\frac{\nu - 2}{\nu }} T^{-1}(\frac{y}{1 - \lambda }|\nu ) - a] \quad for \quad y \ge \frac{1 - \lambda }{2} \end{array} \right. \end{aligned}$$
(19)

where \(T(x|\nu )\) is the cdf of the standard t-distribution with \(\nu \) degrees of freedom and can be expressed with (9)

$$\begin{aligned} T(x|\nu ) = \int ^{x}_{-\infty } f_{\nu }(w) dw = \int ^{x}_{-\infty } \frac{\Gamma (\frac{\nu + 1}{2})}{\Gamma (\frac{\nu }{2})\sqrt{\nu \pi }(1 + \frac{w^2}{\nu })^{(\nu +1)/2}} \end{aligned}$$
(20)

3.7.3 Simulations Considering Interdependencies in the Portfolio

Due to the fact that the \(d\) multivariate student-t distribution can be written as follows

$$\begin{aligned} Z \overset{d}{=} \mu + \frac{\sqrt{\nu }}{\sqrt{S}}X \end{aligned}$$
(21)

with \(\mu \in \mathbb {R}^{d}, S \sim x^{2}_{\nu }, X \sim N(0,\Sigma )\) we can easily adapt the simulation algorithm as described in Embrechts et al. (2001):

  1. (1)

    Calculate the Cholesky decomposition A of \(\hat{\rho }\).

  2. (2)

    Simulate \(d\) independent random variates \(x_1,\ldots ,x_n\) from \(N(0,1)\)

  3. (3)

    Simulate a random variate \(s\) from \(\chi ^{2}_{\nu }\) independent of \(x_1,\ldots ,x_n\).

  4. (4)

    Set \(y = Ax\)

  5. (5)

    Set \(z = \frac{\sqrt{\nu }}{\sqrt{s}} y \)

  6. (6)

    Set \(u_i = t_{\nu }(z_i)\), for \(i = 1,\ldots ,d\)

Doing so, it follows that \((u_1,\ldots ,u_n) \sim C^{t}_{\nu ,\hat{\rho }}\).

Finally, given the simulated returns of each index, the portfolio weights are applied to the respective simulated return paths and the joint portfolio return is calculated by summing up the instrument specific weighted return simulations.

$$\begin{aligned} \mathbb {E}\left[ \sum ^{d}_{i=1}\omega _{i}R_{t}\right] = \sum ^{d}_{i=1} \mathbb {E}[\omega _{i}R_{t}] = \sum ^{d}_{i=1} \omega _{i} \mathbb {E}[R_{t}]. \end{aligned}$$
(22)

Through the linearity of the expectation, the portfolio value at a specific date can be easily traced back to the Monte Carlo simulation of the \(d\) individual assets.

For the Monte Carlo Simulation we simulate each product over a time horizon of 252 days. Hence there are \(252 \cdot d\) simulations for the \(d\) individual products. The Monte Carlo simulation takes place by repeating this procedure \(N = 1000 \) times.

3.7.4 Expected Volatility

Due to the Continuous Mapping Theorem we can additionally obtain the following even stronger and more useful result: For a function \(f\) with \(\mathbb {E}[|f(X)|] < \infty \) it holds that

$$\begin{aligned} \frac{1}{N} \sum ^{N}_{i=1}f(X_i) \overset{a.s}{\rightarrow } \mathbb {E}[f(X)]. \end{aligned}$$
(23)

With the Continuous Mapping Theorem (23) we can calculate the deviation of the expected returns. The volatility is measured by the standard deviation of the \(N\) forecasted returns \(x_i\), where \(\mu \) denotes the sample average:

$$\begin{aligned} \begin{aligned} \mathbb {E}[(R_t - \mathbb {E}[R_t])^2]&:= \hat{\sigma }^2 = \frac{1}{N - 1} \sum ^{N}_{i=1}(x_i - \hat{\mu })^2 \\&\Rightarrow \hat{\sigma } = \sqrt{\frac{1}{N-1} \sum ^{N}_{i=1}(x_i - \hat{\mu })^2} \end{aligned} \end{aligned}$$
(24)

3.7.5 Value at Risk

The Value at Risk calculates the largest loss likely to be suffered on an investment (portfolio or product) with a given probability, over a holding period of time. Given a confidence level \(\alpha \in (0,1)\), the VaR of the distribution formed by the \(n\) forecasted returns, is calculated by taking the smallest return that exceeds the probability \(1 - \alpha \).

After the simulation, \(N\) Portfolio values over the 252 days horizon have been generated by applying (22). The distribution followed by these paths allows to calculate the VaR at a given confidence level.

4 Data

The main purpose of this research is to calculate the risk of four financial products (BMW, Tesla, Samsung and Facebook) considering two different scenarios (with and without potentially favorable/unfavorable events) and level (low/high) of return and volatility. The data used for each scenario consist of three years of daily closing prices (ca. 750 observations, extracted from Thomson Reuters) starting in two different points of time. This three years period will be enough to perform the Fitted Garch model. On the other hand, the interval between the two points will be a fixed estimation window of 365 days, which is equal to the horizon length in the Monte Carlo simulation.

First case Financial product with low average return. BAYERISCHE MOTOREN WERKE AG (DE0005190003). First data set range 25.08.14–24.08.17, second data set range 24.08.15–24.08.18 (see Fig. 1).

Fig. 1
figure 1

Financial product with low average return (BMW)

Second case Financial product with high return and high volatility. Tesla Motors (US88160R1014). First data set range 25.08.14–24.08.17, second data set range 24.08.15–24.08.18 (see Fig. 2).

Fig. 2
figure 2

Financial product with high return and high volatility (Tesla Motors)

Third case Financial product with high return and low volatility. Samsung Electronics (US7960508882). First data set range, 13.02.08–14.02.11 second data set range 13.02.09–13.02.12 (see Fig. 3). The end of the first data set coincides with the release of the Samsung Galaxy S2, a positive event that raised the price of the financial instrument.

Fig. 3
figure 3

Financial product with high return and low volatility (Samsung)

Forth case Financial product with high return and high volatility. Facebook (US30303M1027). First data set range 25.08.14–24.08.17, second data set range 24.08.15–24.08.18 (see Fig. 4). The end of the first data set coincides with legal accusations and controversy regarding the data protection of the platform users, a negative event that dropped the price of the financial instrument.

Fig. 4
figure 4

Financial product with high return and high volatility (Facebook)

5 Results

The log returns (Fig. 5) are the input parameters for the GARCH models. From the results above it can be noticed that Tesla and BMW haven’t got any observable difference between the two intervals (having BMW lower peaks than Tesla, which corresponds to the lower return of the first one).

However, on the other side, it can be observed that Samsung’s volatility decreases on the second interval due to the fact that the 2008 drop is not taken into account.

Finally, Facebook volatility increases on the second interval because of the huge change of prices at the middle of 2018.

Fig. 5
figure 5

Input parameters for GARCH models (BMW, Tesla, Samsung, Facebook)

Table 1 Parameters for single product simulation and considering inter-dependencies

The parameters omega, alpha, beta, skew and shape (Table 1) are used to calculate the unconditional variance, the deviation and the random generated residuals in both simulations: single product and considering inter-dependencies.

It can be appreciated form the previous table that BMW is the only financial product positively skewed, which implies that the majority of the samples fall towards the lower side.

Additionally, Tesla and Facebook obtained a lower shape, which will create distributions with fatter tails, which will create more extreme random values on the forecast.

5.1 Simulation on a Single Product Level

Fig. 6
figure 6

Stages of a Monte Carlo simulation for BMW

Figure 6 shows the different Monte Carlo simulation stages for the first case study, BMW, period 2015–2017 [with 1 path, 10 paths, 50 paths and 100 paths consecutively]. To calculate the VaR, 1000 paths are used.

Fig. 7
figure 7

1000 paths resulting from the Monte Carlo simulation

After the 1000 simulations, we can visually confirm that the results (Fig. 7) follow skewed student-t distributions. BMW slightly positively skewed (really close to a studen-t distribution without skew on the 2016–2018 data set due to the lower skew parameter) and the other three instruments skewed negatively.

Fig. 8
figure 8

Ordered end prices for the 1000 paths (blue points), VaR price (red point) and initial price treshhold (black line)

Figure 8 shows the end prices of each of the 1000 paths. The value at risk price is highlighted on red (0,05 quantile of the distribution) and the threshold representing the initial price. The bigger the difference between the VaR price and the threshold, the bigger the loss could be on a worst market scenario.

It can easily be noticed that this difference is quite low on the Samsung forecasts (third case study), or quite big on the Tesla case (second case study). On the other side, Tesla, Samsung or Facebook would perform really well on good market scenarios

Table 2 VaR before and after the 365 day interval for all four financial products

The VaR(%) on BMW and Tesla before and after the 365 day interval slightly changes (Table 2). This was already noticed on the log-returns of Fig. 5, where the two data sets had very similar graphs on both dates. Also, in a worst market scenario, Tesla could lose 55% of its current value, in comparison to BMW, 33%, which makes it the riskiest product among the four.

On the other hand, Facebook and Samsung register a change on their risk after the interval. The first one gaining a 13% more risk and the second one by lowering to only 5%. Samsung’s case was already spotted on the log returns graph as the low price spike was not present on the second interval.

5.2 Simulations Considering Interdependencies in the Portfolio

Figure 9 shows the bi-variate copulas created from the combination of the three securities. It can be observed that the only two financial products that are slightly correlated are BMW and Tesla (first and second case study). As it can be observed on the graph, the data points are grouped towards the diagonal formed between the point (0,0) and (1,1). Whereas in the other combinations, the points are not dispersed around the space. However, the results are calculated for a portfolio that contains the three securities at the same time, which is translated as a t-student multivariate copula of 3 dimensions, formed by the uniform ranked residuals obtained of the garch fitting models:

Fig. 9
figure 9

Bi-variate copulas between the BMW-Tesla, BMW-Facebook and Tesla-Facebook

Table 3 Fitted multivariate copula models (3 dimensions)

In the Table 3 it can be noticed that the data follows rather a normal distribution than the student-t, as the degrees of freedom are really big. Additionally, rho is closer to 0 which emphasizes that there is nearly no correlation between the three securities.

Fig. 10
figure 10

1000 paths resulting from the Monte Carlo simulation including interdependencies

Fig. 11
figure 11

Ordered end prices for the 1000 paths (blue points), VaR price (red point) and initial price treshhold (black line) including interdependencies

After the 1000 simulations (Fig. 10), as in the case of single products, it can visually be confirmed that the results coming from the multivariate random generator also follow skewed student-t distributions.

As showed on the Fig. 9, the securities BMW and Tesla share a certain correlation. This is also confirmed on the end prices (Fig. 11), as taking into account inter-dependencies BMW would perform much better on a good market scenario (Tesla does so on single product simulations). On the opposite side, Facebook does not perform so well on bad market scenarios due to the influence of the two other financial products.

Table 4 Value at Risk before and after the interval including interdependencies

Comparing the VaR(%) with the results from the simulations on a single product level (Table 4), we can observe that the good results of Facebook before the interval smooths the risk of BMW (from 33% to 29%) and Tesla (from 55% to 53%). However, Facebook gets penalized by the two other securities (from 20% to 26%). After the interval, BMW’s risk gets increased drastically in comparison to single product simulations(33% to 37%) whether on the opposite Facebook is getting a lower score (33% to 30%).

Table 5 Value at risk of the portfolio before and after the interval

Assuming that the weight of the three securities is the same 0.33%, four portfolios with three securities (BMW, Tesla and Facebook) have been created and it’s overall VaR(%) calculated (Table 5).

As it can be appreciated, the overall Risk of the portfolio doesn’t barely change during the same periods whether the risk has been calculated through single products or considering inter-dependencies. Nevertheless, the risk in the interdependent portfolio is slightly bigger due to the fact that two securities (BMW and Tesla) are correlated.

6 Discussion

The results show that the Monte Carlo simulation with a GARCH(1,1) model for the deviation and a skewed student-t distribution for the marginals, as seen on the BMW and Tesla examples, can properly predict the risk of securities in the stock market over a period of time, only by checking the time series of the product. However, there are certain situations and events that cannot be extracted from the time series, which could affect the Risk of a product.

On these specific scenarios, Samsung had announced at the end of the first period the release of the Samsung Galaxy S2, the top selling smart-phone of 2011 with 40 millions of units sold increasing its market share from 17.7% to 22.0%.

Facebook, on the 17th of March of 2018 got involved in a controversy where a whistleblower revealed that British political consulting firm Cambridge Analytica harvested 50 million Facebook profiles and used personal information taken without authorization. Leading, one month later, Mark Zuckenberg (Facebook CEO) to testify in front of the senate about facebook’s data privacy. Events that created two drops in the prices of the company at the stock market.

The two events were widely covered on the net by news agencies, electronic newspapers, technology web pages, social networks... Which could have been used, along with the regression models, as input data to predict the risk of the securities in a more realistic way.

The unpleasant sentiments that Facebook users were feeling against the application was expressed in several social networks. A sentiment that could have been used to predict the increase of 13% of the VaR the next days. In the same way, the pleasant sentiment achieved by the good reviews of the Samsung galaxy S2 could have predicted the decrease of 23% of the electronics company shares.

When inter-dependencies with multivariate t-copulas come into account, it has been proven that non-correlated securities like Facebook, BMW or Tesla don’t increase the overall Risk of the portfolio (slightly increased by the small correlation between the two car manufacturers). Which proves, that this kind of events like the Facebook controversy, are also not noticed until the market movement happens on portfolio level.

In addition, on 3rd January 2018, the regulation MiFID II came into force. Containing a group of laws and directives that provide harmonized regulation for investment services and consumers protection. The daily monitoring and reporting of investor’s risk is one of the outcomes of this implementation. It prohibits financial entities to invest for their clients, with a different level of risk than the expected. A law, that conflicts with the impossibility of properly predicting the risk level in certain scenarios.

7 Conclusions, Limitations and Future Work

The result of this investigation is a development of an intelligent automated form to provide basically some prior knowledge of the likely risk scenarios that can face different finance agents. As exposed above, the IFM method can predict the risk of securities, if no recent drastic changes in the market are given, in order to influence in a positive way customer perceptions, preferences and final choices to become more rational and unbiased.

Some limitations and restrictions have been found when types of events such as drastic changes in the market occur. The model is insufficient concerning its effectiveness when companies subjected to the media pressure come across contentious issues.

A future research is proposed by the authors to make this risk calculation method even more accurate and overcome the constraints mentioned by creating a factor model that would combine a regression model (like the IFM model) and the indexes extracted from a sentiment analysis. With this new approach, not only the past of the financial product would be taken into account, but also the present, which it is assumed to be the most determining for drastic changes in the market. The wide usage of social networks is giving the opportunity everybody to comment, rate, criticize or appreciate any kind of event. Also, the stock exchange related events. In a more technical point of view, social networks can be seen as a gigantic database of society’s opinion. The progress in natural language processing, text analysis, machine learning and computational linguistics has provided the last years a wide range of tools to analyze and extract sentiment from texts. Sentiments that can be modeled as quantitative data. In that case, the large amount of data stored in the social networks, specifically related to companies of the stock exchange which can be used to extract quantitative indexes that would reflect the sentiment of the society in front of it.