An Application of the IFM Method for the Risk Assessment of Financial Instruments

External influences or behavioral biases can affect the way risk is perceived. This paper studies the prediction of VaR (Value at Risk) as a measure of the risk of loss for investments on financial products. Our aim is to predict the percentage of loss that a financial product would have in the future to assess the risks and determine the potential loss of a security in the stock market, thus reducing reasoning influenced by feelings for bank and financial firms seeking to deploy AI and advanced automation. We used the IFM (inference function for margins) method in different market scenarios, with particular emphasis on the strengths and weaknesses of it. The study is assessed on single product level with the skewed studen-t GARCH(1,1) model and portfolio level with t-copulas for the inter-dependencies. It has been shown that under normal market conditions the risk is predicted properly for both levels. However, when an unexpected market event occurs, the prediction fails. To address this limitation, a combined model with sentiment analysis and regression is proposed for further investigation as a future work.


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 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.

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.

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.

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 2 1; :::; d. Hence Y j is a ð1 Â nÞ vector for each j. Along these lines the matrix Y ¼ ðY 1 ; . . .; Y d Þ is d Â 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: 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 l ¼ 0 which is then given by 123 298 A. Pons et al.
The input parameters for the model are as follows: • t ¼ y t;j , thereby y t;j denotes the (log) return of the j-th financial product at time The skewed Student t-distribution (st) with mean zero and unit variance extends the regular Student t-density with m 2 ð2; 1Þ degrees of freedom by an additional skewness parameter À1\k\1. The density f for z t is defined as (Hansen, 1994): thereby the constants a, b and c are defined by 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 and the optimal parameter vector , i.e H ¼ ðm; k; r t Þ, i.e H ¼ ðm; k; x; a; bÞ. Instead of maximizing the ML function, it can be also optimized the quasi maximum likelihood function (QMLE) see Bollerslev and Wooldridge (1992) Thereby t ¼ 1; . . .; T denotes the timestamp of the transformed observations z t ¼ t r t . We can also write t ¼ 1; . . .; T, i ¼ 1; . . .; n for n observations collected for the specific financial product. After optimizing the ML function obtainsĤ and with the optimal values for r t for t ¼ 1; . . .; T and equation (2.1) we get the optimal values for a; b and x. To obtain the optimal values for m; k and r 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).

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 q. The parameter for the degrees of freedom m is obtained via a ML estimation. The density of a ddimensional Student-t-Copula with parameters q and m degrees of freedom can be written as follows (Demarta and McNeil, 2004): Thereby t À1 m ðu 1 Þ represents the corresponding quantile of a student t distribution with m degrees of freedom. The function f q;m defines the density of a multivariate student-t distribution and along these lines f m the density of a univariate student-t distribution. The nominator in (7) can be written as follows (Demarta and McNeil, 2004): The vector q ¼ ðq 1 ; . . .; 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; . . .; udÞ to their corresponding quantiles with values in 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 Hence the density of a d dimensional Student t Copula with parameters q and m degrees of freedom can be written as follows Thereby jqj denotes the determinant of the input matrix q and CðÁÞ the gamma function. Since we are interested in the optimal parameters for q and m within the next subsections of this manual the necessary steps and mathematical derivations are provided, derived and explained in more detail.

The Rank Transformation
We assume that the residual vector 1 ; . . .; d is given, whereas each vector is assumed to have a different distribution F j for j ¼ 1; . . .; d and i ¼ 1; . . .; 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 1 nþ1 , the second smallest with the value 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 to U j .

Estimating q
The method for estimating q is oriented on McNeil et al. (2005) p.231. Hence calibrating t copulas using Kendalls Tau s (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 ðm; qÞ is given by 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 q.
Hence the estimated symmetric matrixq which is dxd has the following shape: The easiest way to obtain the desired matrixq 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,q will be used as starting point for the optimizer of the log likelihood function after applying a QR decomposition of the matrix.

Maximum Likelihood Estimation
The estimation of the empirical q 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 q and m. The necessary input vector is given by the transformed values, denoted by u. Due to the fact that logð Q i a i Þ ¼ P i logðaiÞ and logð a b Þ ¼ logðaÞ À logðbÞ one can rewrite the ML function for the density in (7) and a given observation as follows logðc t m;q ðu 1 ; . . .; u d Þ ¼ log 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.

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.

Monte Carlo Simulations Including GARCH Models and the t-Copula
According to Bollerslev (1986), given the GARCH(1,1) model (Eq. 1), the optimal predictorr 2 tþs of the conditional variance for forecast horizon s is the conditional expected value:r where x, a, b and r tþ1 are obtained through the GARCH fitting process. Moreover, as a þ b\1 the unconditional variance can be expressed: in that case, (15), can be written as follows: Since a þ b\1; ða þ bÞ sÀ1 converges to zero for s ! 1 and thereforer 2 tþs ! r 2 for ! 1. Hence the predictor tends to the unconditional variance.
The innovation process used to forecast the returns is described by the following formula where z t is the random generated residual and l denotes the drift factor.

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 $ stð0; 1; m t ; k 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): where TðxjmÞ is the cdf of the standard t-distribution with m degrees of freedom and can be expressed with (9)

Simulations Considering Interdependencies in the Portfolio
Due to the fact that the d multivariate student-t distribution can be written as follows with l 2 R d ; S $ x 2 m ; X $ Nð0; RÞ we can easily adapt the simulation algorithm as described in Embrechts et al. (2001): (1) Calculate the Cholesky decomposition A ofq.
(4) Set y ¼ Ax Doing so, it follows that ðu 1 ; . . .; u n Þ $ C t m;q . 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.
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 Á d simulations for the d individual products. The Monte Carlo simulation takes place by repeating this procedure N ¼ 1000 times.

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 E½jf ðXÞj\1 it holds that 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 l denotes the sample average:

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 a 2 ð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 À a.
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.

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.
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).
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.
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.

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. 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. 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.
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 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. 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:

Simulations Considering Interdependencies in the Portfolio
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. 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.
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%).
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.

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.

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.