Discovering Bayesian Market Views for Intelligent Asset Allocation
Frank Z. Xing Erik Cambria Lorenzo Malandri Carlo Vercellis


Discovering Bayesian Market Views 

F. Xing et al. 
School of Computer Science and Engineering, Nanyang Technological University

Data Mining and Optimization Research Group, Politecnico di Milano

{zxing001,cambria}@ntu.edu.sg {lorenzo.malandri,carlo.vercellis}@polimi.it
Discovering Bayesian Market Views 
for Intelligent Asset AllocationA camera-ready version to appear at ECML-PKDD 2018.
    Frank Z. Xing1 Erik Cambria1 Lorenzo Malandri2 Carlo Vercellis2
    December 30, 2023
======================================================================================================================




Along with the advance of opinion mining techniques, public mood has been found to be a key element for stock market prediction. However, how market participants' behavior is affected by public mood has been rarely discussed. Consequently, there has been little progress in leveraging public mood for the asset allocation problem, which is preferred in a trusted and interpretable way. In order to address the issue of incorporating public mood analyzed from social media, we propose to formalize public mood into market views, because market views can be integrated into the modern portfolio theory. In our framework, the optimal market views will maximize returns in each period with a Bayesian asset allocation model. We train two neural models to generate the market views, and benchmark the model performance on other popular asset allocation strategies. Our experimental results suggest that the formalization of market views significantly increases the profitability (5% to 10% annually) of the simulated portfolio at a given risk level. 





§ INTRODUCTION
 
Sales and macroeconomic factors are some of the driving forces behind stock movements but there are many others. For example, the subjective views of market participants also have important effects. Along with the growing popularity of social media in the past decades, people tend to rapidly express and exchange their thoughts and opinions <cit.>. As a result, the importance of their views has dramatically risen <cit.>. Currently, stock movements are considered to be essentially affected by new information and the beliefs of investors <cit.>.

Meanwhile, sentiment analysis has emerged as a new tool for analyzing the opinions shared on social media <cit.>. It is a branch of affective computing research that aims to classify natural language utterances as either positive or negative, but sometimes also neutral <cit.>. In the financial domain, sentiment analysis is frequently used to obtain a data stream of public mood toward a company, stock, or the economy. 
Public mood is the aggregation of individual sentiments which can be obtained and estimated from various sources, such as stock message boards <cit.>, blogs, newspapers, and really simple syndication (RSS) feeds <cit.>. 

Recently, Twitter has become a dominant microblogging platform on which many works rely for their investigations, such as <cit.>. Many previous studies support the claim that public mood helps to predict the stock market. For instance, the fuzzy neural network model considering public mood achieves high directional accuracy in predicting the market index. The mood time series is also proved a Granger cause of the market index <cit.>. Si et al. build a topic-based sentiment time series and predict the market index better with a vector autoregression model to interactively link the two series <cit.>. The Hurst exponents also suggest a long-term dependency for time series of mood extracted form financial news, similar to many market indices <cit.>.

Despite the important role in stock market prediction, we assume that public mood does not directly effect the market: it does indirectly through market participants' views. The actions taken by market participants as agents, are dependent on their own views, and their knowledge about other agents' views. The changes of asset prices are the consequences of such actions. These assumptions are very different from econometric research using productivity, equilibrium, and business cycle models <cit.>, but closer to agent-based models <cit.>. However, the mechanism of how market views are formed from public mood is heavily overlooked even in the latter case. An intuitive hypothesis could be: the happier the public mood, the higher the stock price. In the real-world market, however, this relationship is far more complicated. Therefore, existing superficial financial applications of AI do not appear convincing to professionals.

In this paper, we attempt to fill this gap by proposing a method for incorporating public mood to form market views computationally. To validate the quality of our views, we simulate the trading performance with a constructed portfolio. The key contributions of this paper can be summarized as follows:



  * We introduce a stricter and easier-to-compute definition of the market views based on a Bayesian asset allocation model. We prove that our definition is compatible, and has the equivalent expressiveness as the original form. 


  * We propose a novel online optimization method to estimate the expected returns by solving temporal maximization problem of portfolio returns.


  * Our experiments show that the portfolio performance with market views blending public mood data stream is better than directly training a neural trading model without views. This superiority is robust for different models selected with the right parameters to generate market views.

The remainder of the paper is organized as follows: Sect. <ref> explains the concept of Bayesian asset allocation; following, we describe the methodologies developed for modeling market views in Sect. <ref>; we evaluate such methodologies by running trading simulations with various experimental settings in Sect. <ref> and show the interpretability of our model with an example in Sect. <ref>; finally, Sect. <ref> concludes the paper and describes future work.



§ BAYESIAN ASSET ALLOCATION
 
The portfolio construction framework <cit.> has been a prevalent model for investment for more than half a century. Given the an amount of initial capital, the investor will need to allocate it to different assets. Based on the idea of trading-off between asset returns and the risk taken by the investor, the mean-variance method proposes the condition of an efficient portfolio as follows <cit.>:

    maximize      return item
    ∑^N_i=1μ_i w_i
    - risk item
    δ/2∑^N_i=1∑^N_j=1 w_i σ_ij w_j
       subject to      ∑^N_i=1 w_i =1, i=1,2,...,N.    w_i≥ 0.

where δ is an indicator of risk aversion, w_i denotes the weight of the corresponding asset in the portfolio, μ_i denotes the expected return of asset i, σ_ij is the covariance between returns of asset i and j. The optimized weights of an efficient portfolio is therefore given by the first order condition of Eq. <ref>: 

    w^∗ = (δΣ)^-1μ

where Σ is the covariance matrix of asset returns and μ is a vector of expected returns μ_i. At the risk level of holding w^∗, the efficient portfolio achieves the maximum combinational expected return.

However, when applying this mean-variance approach in real-world cases, many problems are faced. For example, the two moments of asset returns are difficult to estimate accurately <cit.>, as they are non-stationary time series. The situation is worsened by the fact that, the Markowitz model is very sensitive to the estimated returns and volatility as inputs. The optimized weights can be very different because of a small error in μ or Σ.
To address the limitation of the Markowitz model, a Bayesian approach that integrates the additional information of investor's judgment and the market fundamentals was proposed by Black and Litterman <cit.>. In the Black-Litterman model, the expected returns μ_BL of a portfolio is inferred by two antecedents: the equilibrium risk premiums Π of the market as calculated by the capital asset pricing model (CAPM), and a set of views on the expected returns of the investor. 

The Black-Litterman model assumes that the equilibrium returns are normally distributed as r_eq∼𝒩(Π, τΣ), where Σ is the covariance matrix of asset returns, τ is an indicator of the confidence level of the CAPM estimation of Π. The market views on the expected returns held by an investor agent are also normally distributed as r_views∼𝒩(Q, Ω). 

Subsequently, the posterior distribution of the portfolio returns providing the views is also Gaussian. If we denote this distribution by r_BL∼𝒩(μ̅, Σ̅), then μ̅ and Σ̅ will be a function of the aforementioned variables (see Fig. <ref>). 

    [μ̅, Σ̅] = f (τ, Σ, Ω, Π, Q)


The posterior distribution of the expected returns as in the Black-Litterman model, which has a mean between two prior distributions and a variance less than both of them.

    < g r a p h i c s >




The function can be induced from applying Bayes' theorem on the probability density function of the posterior expected returns:

    pdf(μ̅) = pdf(μ̅|Π) pdf(Π)/pdf(Π|μ̅)


Then, the optimized Bayesian portfolio weights have a similar form to Eq. <ref>, only substituting Σ and μ by Σ̅ and μ̅:

    w^∗_BL = (δΣ̅)^-1μ̅.


The most common criticism of the Black-Litterman model is the subjectivity of investor's views. In other words, the model resorts to the good quality of the market views, while it leaves the question of how to actually form these views unanswered. In Sect. <ref>, we will investigate the possibility of automatically formalizing the market views from public mood distilled from the Web and the maximization of portfolio returns for each time period.  



§ METHODOLOGIES
 


 §.§ Modeling Market Views

The Black-Litterman model defines a view as a statement that the expected return of a portfolio has a normal distribution with mean equal to q and a standard deviation given by ω. This hypothetical portfolio is called a view portfolio <cit.>. In practice, there are two intuitive types of views on the market, termed relative views and absolute views, that we are especially interested in. Next, we introduce the formalization of these two types of views.

Because the standard deviation ω can be interpreted as the confidence of expected return of the view portfolio, a relative view takes the form of “I have ω_1 confidence that asset x will outperform asset y by a% (in terms of expected return)”; an absolute view takes the form of “I have ω_2 confidence that asset z will outperform the (whole) market by b%”. Consequently, for a portfolio consisting of n assets, a set of k views can be represented by three matrices P_k,n, Q_k,1, and Ω_k,k. 

P_k,n indicates the assets mentioned in views. The sum of each row of P_k,n should either be 0 (for relative views) or 1 (for absolute views); Q_k,1 is a vector comprises expected returns for each view. Mathematically, the confidence matrix Ω_k,k is a measure of covariance between the views. 
The Black-Litterman model assumes that the views are independent of each other, so the confidence matrix can be written as Ω=diag(ω_1, ω_2, ..., ω_n). In fact, this assumption will not affect the expressiveness of the views as long as the k views are compatible (not self-contradictory). Because when Ω_k,k is not diagonal, we can always do spectral decomposition: Ω=VΩ^ΛV^-1. Then we write the new mentioning and new expected return matrices as P^Λ=V^-1P, Q^Λ=V^-1Q, where Ω^Λ is diagonal.
Under these constructions, we introduce two important properties of the view matrices in Theorem <ref> and Theorem <ref>.


Any set of independent views are compatible. 


Compatible views refer to views that can hold at the same time. For example, {asset x will outperform asset y by 3%, asset y will outperform asset z by 5%, asset x will outperform asset z by 8%} is compatible. However, if we change the third piece of view to “asset z will outperform asset x by 8%", the view set becomes self-contradictory. Because the third piece of view is actually a deduction from the former two, the view set is called “not independent".

Assume there is a pair of incompatible views {p, q} and {p, q^'}, q≠ q^'. Both views are either explicitly stated or can be derived from a set of k views. 
Hence, there exist two different linear combinations, such that: 
 

    ∑_i=1^k a_i p_i = p     ∑_i=1^k a_i q_i = q


    ∑_i=1^k b_i p_i = p     ∑_i=1^k b_i q_i = q^'


where (a_i-b_i) are not all zeros.

Thus, we have ∑_i=1^k (a_i-b_i) p_i =0, which means that matrix P is rank deficient and the k views are not independent.
According to the law of contrapositive, the statement “all independent view sets are compatible” is true. 


Any set of independent relative and absolute views can be expressed with a non-singular absolute view matrix. 


Assume a matrix P with r relative views and (k-r) absolute views.


P_k,n = 
 [ p_1,1 p_1,2     ⋯ p_1,n;     ⋮     ⋮     ⋱     ⋮; p_r,1 p_r,2     ⋯ p_r,n;     ⋮     ⋮     ⋱     ⋮; p_k,1 p_k,2     ⋯ p_k,n ]



The corresponding return vector is Q=(q_1, q_2, …, q_k), the capital weight vector for assets is w=(w_1, w_2, …, w_k). Hence, we can write (r+1) equations with regard to r new variables {q_1^', q_2^', ..., q_r^'}, where j=1, 2, ..., r:
 

    1+ q_j^'=∑_i≠ j^r(1+q_i^') w_i/∑_s≠ j w_s (1+q_j)


    ∑_i=1^rq_i^'w_i+∑_i=r+1^kq_i w_i=Qw^⊺


If we consider {asset_r+1,…, asset_k} to be one asset, return of this asset is decided by P_r,n. Hence, r out of the (r+1) equations above are independent.

According to Cramer's rule, there exists a unique solution Q^'=(q_1^', q_2^', …, q_r^',
 q_r+1, …, q_k) to the aforementioned (r+1) equations, such that view matrices {P^', Q^'} is equivalent to view matrices {P, Q} for all the assets considered, where


P^'_k,n = 
 [       1       0       ⋯       0;       ⋮       ⋮       ⋱       ⋮;       0 p_r,r=1       ⋯       0;       ⋮       ⋮       ⋱       ⋮;   p_k,1   p_k,2       ⋯   p_k,n ].


Now, P^'_k, n only consists of absolute views. By deleting those dependent views, we can have a non-singular matrix that only consists of absolute views and is compatible. 
Given Theorem <ref> and Theorem <ref>, without loss of generality, we can use the following equivalent yet stricter definition of market views to reduce computational complexity. 


Market views on n assets can be represented by three matrices P_n,n, Q_n,1, and Ω_n,n, where P_n,n is an identity matrix; Q_n,1∈ℝ^n; Ω_n,n is a nonnegative diagonal matrix. 




 §.§ The Confidence Matrix

In the most original form of the Black-Litterman model, the confidence matrix Ω is set manually according to investors' experience. Whereas in the numerical example given by <cit.>, the confidence matrix is derived from the equilibrium covariance matrix:

    Ω̂_0 = diag(P(τΣ)P^')

This is because P(τΣ)P^' can be understood as a covariance matrix of the expected returns in the views as well. Using our definition, it is easier to understand this estimation, because P is an identity matrix, P(τΣ)P^' is already diagonal. The underlying assumption is that the variance of an absolute view on asset i is proportional to the volatility of asset i. In this case, the estimation of Ω utilizes past information of asset price volatilities. 



 §.§ Optimal Market Views

We obtain the optimal market views {P, Q, Ω} in a hybrid way, first we adopt the confidence matrix Ω̂_0, then Q can be derived from the inverse optimization problem using the Black-Litterman model.

We start from the optimal portfolio weights that maximize the portfolio returns for each period t. Obviously, without short selling and transaction fees, one should re-invest his whole capital daily to the fastest-growing asset in the next time period. 

The optimal holding weights for each time period t thus take the form of a one-hot vector, where ⊘ and ⊙ denote element-wise division and product:

    w_t^∗=argmax   w_t ⊘ price_t⊙ price_t+1

Let this w_t^∗ be the solution to Eq. <ref>, we will have:

    w_t^∗ = (δΣ̅_t)^-1μ̅_t

where the Black-Litterman model gives[The proof of Eq. <ref> and <ref> can be found from the appendix of <cit.>.]:

    Σ̅_t=Σ_t+[(τΣ_t)^-1+P^'Ω̂^-1_tP]^-1
       μ̅_t= [(τΣ_t)^-1+P^'Ω̂^-1_tP]^-1[(τΣ_t)^-1Π_t+P^'Ω̂^-1_t Q_t]


According to Eq. <ref>, <ref>, and <ref>, the optimal expected returns for our market views for each period t is:

    Q_t^∗   =Ω̂_0,t{[ (τΣ_t)^-1+P^'Ω̂_0,t^-1P ] μ̅_t-(τΣ_t)^-1Π_t}
       =δ[ Ω̂_0,t(τΣ_t)^-1+𝕀 ] Σ̅_tw_t^∗-Ω̂_0,t(τΣ_t)^-1Π_t
       =δ[ Ω̂_0,t(τΣ_t)^-1+𝕀 ] [ Σ_t+[(τΣ_t)^-1+Ω̂^-1_t]^-1 ]w_t^∗
         -Ω̂_0,t(τΣ_t)^-1Π_t





 §.§ Generating Market Views with Neural Models

Eq. <ref> provides a theoretical perspective on determining the expected return of optimal market views. However, computing w_t^∗ requires future asset prices, which is not accessible. Therefore, the feasible approach is to learn approximating Q_t^∗ with historical data and other priors as input. We use the time series of asset prices, trading volumes, and public mood data stream to train neural models (nn) for this approximation problem of optimal market views:

    Q̂_t = nn(prices, volumes, sentiments;  Q_t^∗)

We denote the time series of asset prices price_t-k, price_t-k+1, ..., price_t by a lag operator ℒ^0∼ kprice_t. The notation of trading volumes follows a similar form. Then the model input at each time point: [ℒ^0∼ kprice_t, ℒ^0∼ kvolume_t, sentiment_t,
 capital_t] can be denoted by [p,v,s,c]_t in short.

Two types of neural models, including a neural-fuzzy approach and a deep learning approach are trained for comparison. Fig. <ref> provides an illustration of the online training process using a long short-term memory (LSTM) network, where Q̂ is the output. 




  §.§.§ Dynamic evolving neural-fuzzy inference system (DENFIS)
 is a neural network model with fuzzy rule nodes <cit.>. The partitioning of which rule nodes to be activated is dynamically updated with the new distribution of incoming data. This evolving clustering method (ECM) features the model with stability and fast adaptability. Comparing to many other fuzzy neural networks, DENFIS performs better in modeling nonlinear complex systems <cit.>.

Considering the financial market as a real-world complex system, we learn the first-order Takagi-Sugeno-Kang type rules online. Each rule node has the form of:

    IF ℒ^0∼ kattribute_t,i=pattern_i,  i=1,2,..., N
         THEN Q̂_̂t̂=f_1,2,..., N([p,v,s]_t)

where we have 3 attributes and (2^N-1) candidate functions to activate. In our implementation of the DENFIS model, all the membership functions are symmetrical and triangular, which can be defined by two parameters b± d/2. b is where the membership degree equals to 1; d is the activation range of the fuzzy rule. In our implementation, b is iteratively updated by linear least-square estimator of existing consequent function coefficients.



  §.§.§ LSTM
 is a type of recurrent neural network with gated units. This unit architecture is claimed to be well-suited for learning to predict time series with an unknown size of lags and long-term event dependencies. Early attempts, though not very successful <cit.>, have been made to apply LSTM to time series prediction. It is now recognized that though LSTM cells can have many variants, their performance across different tasks are similar <cit.>. 

Therefore, we use a vanilla LSTM unit structure. Our implementation of LSTM cells follows the update rules of the input gate, forget gate, and output gate as in Eq. <ref>: 

    i_t    = σ(W_i·[ h_t-1,[p,v,s]_t ]+b_i)
    
    f_t    = σ(W_f·[ h_t-1,[p,v,s]_t ]+b_f)
    
    o_t    = σ(W_o·[ h_t-1,[p,v,s]_t ]+b_o)

where σ denotes the sigmoid function, h_t-1 is the output of the previous state, W is a state transfer matrix, and b is the bias. 

The state of each LSTM cell c_t is updated by:

    c_t=f_t ⊙ c_t-1 + i_t ⊙(W_c·[ h_t-1,[p,v,s]_t ]+b_c)
       h_t-1=o_t⊙tanh(c_t-1)


We make the training process online as well, in a sense that each time a new input is received, we use the previous states and parameters of LSTM cells [c_t-1, 𝐖, 𝐛] to initialize the LSTM cells for period t.



§ EXPERIMENTS
 
To evaluate the quality and effectiveness of our formalization of market views, we run trading simulations with various experimental settings. 



 §.§ Data

The data used in this study are publicly available on the Webgithub.com/fxing79/ibaa. We obtain the historical closing price of stocks and daily trading volumes from the Quandl APIwww.quandl.com/tools/api; the market capitalization data from Yahoo! Finance; the daily count and intensity of company-level sentiment time series from PsychSignalpsychsignal.com. The sentiment intensity scores are computed from multiple social media platforms using NLP techniques. Fig. <ref> depicts a segment example of the public mood data stream. The market is closed on weekends, so a corresponding weekly cycle of message volume can be observed.

We investigate a window of around 8 years (2800 days). All the time series are trimmed from 2009-10-05 to 2017-06-04. For missing values such as the closing prices on weekends and public holidays, we fill them with the nearest historical data to train the neural models. 
The lagged values we use for both price and trading volume consist of 4 previous days and a moving average of the past 30 days, that is, the input of our neural models takes the form of Eq. <ref> and <ref>:


    ℒ^0∼ kprice_t   =(p_t, p_t-1, p_t-2, p_t-3, ∑^30_i=1 p_i/30)
    ℒ^0∼ kvolume_t   =(v_t, v_t-1, v_t-2, v_t-3, ∑^30_i=1 v_i/30)




 §.§ Trading Simulation

We construct a virtual portfolio consisting of 5 big-cap stocks: Apple Inc (), Goldman Sachs Group Inc (), Pfizer Inc (), Newmont Mining Corp (), and Starbucks Corp (). This random selection covers both the NYSE and NASDAQ markets and diversified industries, such as technology, financial services, health care, consumer discretionary etc. During the period investigated, there were two splits: a 7-for-1 split for  on June 9th 2014, and a 2-for-1 split for  on April 9th 2015. The prices per share are adjusted according to the current share size for computing all related variables, however, dividends are not taken into account. 
We benchmark our results with two portfolio construction strategies:



1) The value-weighted portfolio (VW): we re-invest daily according to the percentage share of each stock's market capitalization. In this case, the portfolio performance will be the weighted average of each stock's performance. This strategy is fundamental, yet empirical study <cit.> shows that beating the market even before netting out fees is difficult.

2) The neural trading portfolio (NT): we remove the construction of market views and directly train the optimal weights of daily position with the same input. For this black-box strategy, we can not get any insight on how this output portfolio weight comes about.

In the simulations, we assume no short selling, taxes, or transaction fees, and we assume the portfolio investments are infinitely divisible, starting from 10,000 dollars. We construct portfolios with no views (Ω_∅, in this case the degenerate portfolio is equivalent to Markowitz's mean-variance portfolio using historical return series to estimate covariance matrix as a measure of risk), random views (Ω_r), the standard views using the construction of Black-Litterman model (Ω_0), with and without our sentiment-induced expected returns (s). The trading performances are demonstrated in Fig. <ref>.

Following the previous research <cit.>, we set the risk aversion coefficient δ=0.25 and confidence level of CAPM, τ=0.05. Let the activation range of fuzzy membership function d=0.21, we obtain 21 fuzzy rule nodes from the whole online training process of DENFIS. This parameter minimizes the global portfolio weight error. For the second neural model using deep learning, we stack two layers of LSTMs followed by a densely connected layer. Each LSTM layer has 3 units; the densely connected layer has 50 neurons, which is set times larger than the number of LSTM units. We use the mean squared error of vector Q as the loss function and the rmsprop optimizer <cit.> to train this architecture. We observe fast training error convergence in our experiments.



 §.§ Performance Metrics

Diversified metrics have been proposed to evaluate the performance of a given portfolio <cit.>. We report four metrics in our experiments.

Root mean square error (RMSE) is a universal metric for approximation problems. It is widely used for engineering and data with normal distribution and few outliers. 
We calculate the RMSE of our realized portfolio weights to the optimal weights:

    RMSE= √(1/n∑_i=1^n w_i-ŵ_̂î^2)


Annualized return (AR) measures the profitability of a given portfolio. We calculate the geometric mean growth rate per year, which is also referred to as compound annual growth rate (CAGR) for these 2800 days. 

Sharpe ratio (SR) is a risk-adjusted return measure. We choose the value-weighted portfolio as a base, consequently the Sharpe ratio of VW will be 1:

    SR= 𝔼(R_portfolio/R_VW)/σ (R_portfolio)/σ (R_VW)

SR uses the standard deviation of daily returns as the measure of risk. Note that to distinguish between good and bad risk, we can also use the standard deviation of downside returns only <cit.>. Our results suggest that the Sortino ratios, which are not reported due to page limit, are very close to SRs and lead to the same conclusion. 

The maximum drawdown (MDD) measures the maximum possible percentage loss of an investor:

    MDD= max_0<t<τ{Value_t-Value_τ/Value_t}

Asset allocation strategies with large MDD are exposed to the risk of withdrawal. Table <ref> presents the metrics.





 §.§ Findings

We have some interesting observations from Fig. <ref> and Table <ref>. SR and AR are usually considered as the most important, and besides, RMSE and MDD are all very close in our experiments. The correlation between RMSE and the other three metrics is weak, though it is intuitive that if the realized weights are close to the optimal weights, the portfolio performance should be better. On the contrary, the LSTM models seem to overfit as they are trained on the mean squared error of weights or expected return of views <cit.>. However, as mentioned in Sect. <ref>, the relationship between weights and daily returns is nonlinear. Therefore, holding portfolio weights that are close to the optimal weights does not necessarily means that the AR must be higher. In fact, it is dangerous to use any seemingly reasonable metrics outside the study of asset allocation, such as directional accuracy of price change prediction <cit.>, to evaluate the expected portfolio performance.

The Markowitz portfolio (Ω_∅) displays a very similar behavior to the market-following strategy. This is consistent with the inefficacy of the mean-variance approach in practice mentioned by previous studies: holding the Markowitz portfolio is holding the market portfolio. In fact, if the CAPM holds, the market portfolio already reflects the adjustments to risk premiums, that is, fewer market participants will invest on highly risky assets, for this reason their market capitalization will be smaller as well. 

However, the Black-Litterman model does not always guarantee better performance over the Markowitz portfolio. “Garbage in, garbage out" still holds for this circumstance. Given random views (Ω_r), it can be worse than market-following in terms of both SR and AR. The lesson learned is that if the investor knows nothing, it is better to hold no views and follow the market than pretending to know something. 

In our experiments, DENFIS generally performs better than LSTM models, achieving higher SRs and ARs. The reason may be LSTM models adapt faster to the incoming data, whereas financial time series are usually very noisy. The ECM mechanism provides DENFIS models with converging learning rates, which may be beneficial to the stability of memorized rules. However, it is important to note that the ARs for both neural models improve with the blending of sentiments. The timespan used to estimate correlation and volatility of assets seems not that critical. DENFIS models perform better with longer timespan, while LSTM models perform better with shorter timespan. The Markowitz portfolio is less affected by timespan. 



§ A STORY
 
One of the main advantages of our formalization and computing of market views is that some transparency is brought to the daily asset reallocation decisions. In most cases, a stock price prediction system based on machine learning algorithms cannot justify “why he thinks that price will reach that predicted point". Unlike these systems, our method can tell a story of the portfolio to professional investors and advice seekers. Take June 1st 2017 as an example:


“On June 1st 2017, we observe 164 positive opinions of polarity +1.90, 58 negative opinions of polarity -1.77 on  stock; 54 positive opinions of polarity +1.77, 37 negative opinions of polarity -1.53 on  stock; 5 positive opinions of polarity +2.46, 1 negative opinion of polarity -1.33 on  stock; no opinion on  stock; and 9 positive opinions of polarity +1.76, 5 negative opinions of polarity -2.00 on  stock.
Given the historical prices and trading volumes of the stocks, we have 6.29% confidence that  will outperform the market by -70.11%; 23.50% confidence that  will outperform the market by 263.28%; 0.11% confidence that  will outperform the market by -0.50%; 1.21% confidence that  will outperform the market by 4.57%. Since our current portfolio invests 21.56% on , 25.97% on , 29.43% on , and 23.04% on , by June 2nd 2017, we should withdraw all the investment on , 2.76% of the investment on , 81.58% of the investment on , and 30.77% of the investment on , and re-invest them onto ."



§ CONCLUSION AND FUTURE WORK
 
In previous studies which have considered sentiment information for financial forecasting, the role of the investor as a market participant is often absent. In this paper, we present a novel approach to incorporate market sentiment by fusing public mood data stream into the Bayesian asset allocation framework. 

This work is pioneering in formalizing sentiment-induced market views. Our experiments show that the market views provide a powerful method to asset management. We also confirm the efficacy of public mood data stream based on social media for developing asset allocation strategies.

A limitation of this work is that we fixed a portfolio with five assets, though in practice the portfolio selection problem is of equal importance. How to assess the quality of sentiment data is not discussed in this paper as well. We are not at the stage to distinguish or detect opinion manipulation though concern like the open networks are rife with bots does exist. Another limitation is that survivor bias is not taken into account: the risk that assets selected in the portfolio may quit the market or suffer from a lack of liquidity. This problem can be alleviated by only including high quality assets. In the future, we will study examining the quality of sentiment data obtained using different content analysis approaches. We also plan to develop a Bayesian asset allocation model that can deal with market frictions.

splncs04


