# A Novel Mobile Personalized Recommended Method Based on Money Flow Model for Stock Exchange

Authors: Qingzhen Xu; Jiayong Wu; Qiang Chen
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

Personalized recommended method is widely used to recommend commodities for target customers in e-commerce sector. The core idea of merchandise personalized recommendation can be applied to financial field, which can  also achieve stock personalized recommendation. This paper proposes a new recommended method using collaborative filtering based on user fuzzy clustering and predicts the trend of those stocks based on money flow. We use M/G/1 queue system with multiple vacations and server close-down time to measure practical money flow. Based on the indicated results of money flow, we can select the more valued stock to recommend to investors. The experimental results show that the proposed method provides investors with reliable practical investment guidance and receiving more returns.


---

## Body

## 1. Introduction

The scale of the stock market is growing stronger; stock investment as a kind of high-risk and high-reward investment highlights people’s high attention. For investors, to get the maximum benefit and bear the lowest risk is the best investment. However, in such an ever-changing complicated stock market, those institutions with strong financial strength can use the state-of-the-art stock models for investment operation, having obvious professional advantages [1]. But for the majority of ordinary small and medium-sized stock, investors are still facing the risk which comes from the falling stock prices, single information sources, and improper investment options. Relying only on elementary analysis and technical analysis methods for investment decision-making is not enough. Money flow as a common technical index in stock market is conducting more perfectly in practical research. Therefore, mobile personalized recommended method is very crucial in money flow.Recommendation system [2] realizes the personalized service well. It not only can be used in the areas of electronic commerce, but also can apply to futures, stocks and other products recommended. Current stock recommended methods are mainly concentrated on two types, online stock recommended methods based on stock comment and price forecasting model based on mathematical analysis. The former cannot meet the demands of investors personalized recommendations, and the application process of latter method is relatively complex; it has certain difficulty for investors to understand and master.Given this situation, most of scholars abroad and at home have made a study on the stock recommendation. Cowels (1993) [3] found that the performance of those stocks can not satisfy the expected profit of investors, after aiming at the stocks recommended by U.S. stock organization for long-term follow-up observations. Ye (2011) [4] researched the problem of personalized recommendation in financial marketing by applying content-based personalized recommendation that is based on mean constraint sequential pattern mining method. Xin et al. [5] gave a strategy for filtering out users with similar demand characteristics by using collaborative recommendation algorithm with fuzzy clustering method, which exhibits excellent recommended effect. Xu [6] used regression equation to analyze the relation between shareholder personality traits and their investment decisions and established relational model among the corresponding investment decisions, personality traits, and investment behavior.However, the actual utility of stock recommended methods based on stock comment information remains further textual research, but its blindness and lack of personalized recommendation are inherent weakness, which is the bottleneck of its extensive application. At present, it has become a hot topic about how to integrate data mining, personalized recommendation, and other nontraditional technology into stock recommendation in financial field. Our goal in this paper is to propose a novel personalized stock recommended method based on money flow. At first, we utilize collaborative filtering algorithm [7] based on user fuzzy clustering to generate optimized stock list [8]. Fuzzy clustering technology can greatly improve the speed of online nearest neighbors search and meet the real-time requirement of recommendation system [9–14]. And then we use M/G/1 queue system [15] with multiple vacations and server close-down time to measure practical money flow. The judgment of money flow is crucial to the analysis of stock market trend and individual stock operation.In order to analyze the flow of funds from the perspective of quantity, we need to observe trading volume and turnover. In other words, money flow can measure the ups and downs of the market by evaluating the current state of money inflow or outflow of stocks in the stock market. The new personalized recommended method based on money flow using the indicators for investors to measure the capital and the pulsation of all market and considering investors’ preferences and behavior characteristics, which can improve the existing deficiencies of some current stock recommendation. In addition, the proposed method can analyze and filter the recommendation stock returns and improve the investment benefits of investors. And the experiment results show that the proposed method provides investors with valid personalized recommendation.The rest of this paper is organized as follows: Section2 describes the collaborative filtering algorithm based on user fuzzy clustering. Section 3 presents a new model for studying money flow. Section 4 presents the simulation experiment of the proposed method, and finally some conclusions are pointed out and future works are offered in Section 5.


## 2. Related Work

In this section, we review the traditional commodity personalized recommendation and learn from its core idea for applying to personalized stock recommendation. We utilize the collaborative filtering algorithm based on user fuzzy clustering to generate optimized stock set. Classifying the groups of investors based on a series of subdividing characteristic index of investors is the guarantee of obtaining relatively accurate recommendation results before taking the personalized stock recommendation.


### 2.1. Fuzzy Clustering Analysis

The classification principle of clustering method is dividing every data samples into different categories. But the essence of fuzzy clustering analysis [16, 17] is based on studying the attributes of the object itself to construct fuzzy matrix, on this basis, so as to determine its classification relationship. So, it can embody the uncertain characteristics and reflect the real world more objectively.We subdivide the investors as follows. We build the investor clustering index system in accordance with age, work, years, income level, exchange amount and exchange cycle, and so on. By listing the visual characteristics as segmentation index of investors, it can effectively distinguish different trading habits between those investors and then cluster them together. Such clustering results can reflect investors with similar trading dynamic, which is able to provide more effective and accurate recommendation information for demanders. And then we utilize fuzzy clustering analysis method to subdivide investors [18].


#### 2.1.1. Data Collection

Assume that a stock scored database exists, which includesn stock score data rating by m investors. The characteristics of investors based on the above segmentation index are given, and we define the set of investors as X
=
{
x
1
,
x
2
,
x
3
,
…
,
x
m
}, and the membership degree of the ith investor in the set X represented in the form of vector in a certain order
(1)
x
i
=
{
Ag
e
i
,
Wor
k
i
,
Yea
r
i
,
Salar
y
i
,
Amoun
t
i
,
Cycl
e
i
}
,
where x
i belongs to [
0,1
], i
=
1,2
,
3
…
,
m. x
i denotes the membership degree of the ith element in this set. We can get the feature vector quantitative results based on the investor subdivision index, denoted as x
i
=
{
x
i
1
,
x
i
2
,
x
i
3
,
x
i
4
,
x
i
5
,
x
i
6
}, i
=
1,2
,
3
…
,
m, and all feature indexes of m investors form a matrix:
(2)
X
*
=
[
x
11
x
12
…
x
16
x
21
x
22
…
x
26
⋮
⋮
⋮
x
m
1
x
m
2
…
x
m
6
]
,
where x
i
j represents the  jth characteristic index of theith object.


#### 2.1.2. Data Standardization

Thejth of the matrix is calculated as
(3)
x
j
¯
=
1
m
∑
i
=
1
m
x
i
j
,
(4)
σ
2
=
1
m
∑
i
=
1
m
(
x
i
j
-
x
j
¯
)
2
,
j
=
1,2
,
…
,
6
.
Then, equation transformation is as follows:
(5)
x
i
j
′
=
x
i
j
-
x
j
¯
σ
j
,
i
=
1,2
,
3
,
…
,
m
;
j
=
1,2
,
…
,
6
.
After standardizing data, we can get the standardized feature index matrix:
(6)
X
′
=
[
x
11
′
x
12
′
…
x
16
′
x
21
′
x
22
′
…
x
26
′
⋮
⋮
⋮
x
m
1
′
x
m
2
′
…
x
m
6
′
]
.


#### 2.1.3. Constructing Fuzzy Similar Matrix

According to the standardized data, the similarity coefficient method is used to determine the similarity coefficient among investors and establish the fuzzy similar matrix. Consider(7)
r
i
j
=
∑
k
=
1
6
|
x
i
k
′
-
x
i
′
¯
|
|
x
j
k
-
x
j
′
¯
|
∑
k
=
1
6
(
x
i
k
′
-
x
i
′
¯
)
2
∑
k
=
1
6
(
x
j
k
′
-
x
j
′
¯
)
2
,
where x
i
′
¯
=
(
1
/
6
)
∑
k
=
1
6
x
i
k, i
=
1,2
,
3
,
…
,
m, x
j
′
¯
=
(
1
/
6
)
∑
k
=
1
6
x
j
k, j
=
1,2
,
…
,
6.Ifr
i
j is negative, then r
i
j
′
=
(
r
i
j
+
1
)
/
2.Ifr
i
j does not belong to [
0,1
], then r
i
j
′
=
(
r
i
j
-
m
)
/
(
M
-
m
) or r
i
j
′
=
(
M
-
r
i
j
)
/
(
M
-
m
), M
=
max
⁡
i
,
j
⁡
(
r
i
j
), m
=
min
⁡
i
,
j
⁡
(
r
i
j
).Thus, we established a fuzzy similar matrix ofm by m between shareholders
(8)
R
=
[
r
11
r
12
…
r
1
m
r
21
r
22
…
r
2
m
⋮
⋮
⋮
r
m
1
r
m
2
…
r
m
m
]
.


#### 2.1.4. Clustering

With the fuzzy similar matrixR, we utilize the square self-synthesis method to carry out the transitive closure t
(
R
)
:
R
⇒
R
2
⇒
R
4
⇒
⋯
⇒
R
2
k
=
t
(
R
), k
<
[
log
⁡
2
⁡
m
]
+
1.Based on the actual situation, we choose the appropriate confidence level valueδ, δ
∈
[
0,1
], so as to get the δ-matrix t
(
R
)
δ of t
(
R
). Having a classification based on (
R
)
δ, we can get the equivalence classification in the range of the confidence level δ.An investorU who is the target of stock recommendation will be added to investor information database. We subdivide the new database into several groups by using the fuzzy clustering method in order to determine which group the investor belongs to.


### 2.2. User-Based Collaborative Filtering Algorithm

#### 2.2.1. Nearest Neighbors Search

The basic idea of collaborative filtering algorithm [19, 20] based on user fuzzy clustering is to compare the degree of similarity in behavior between target investor and other investors in the same cluster, in order to find out the set of neighbor investors with similar preference more accurately. Then, according to the stock ratings of nearest neighbor, we can predict the stock ratings of target investor and generate optimized stock list.At first, we need to calculate the similarity between investors based on their historical scoring records. Currently, there are some methods to calculate the similarity between users, such as Pearson correlation and cosine-based similarity. For target investoru, we need to generate a neighbor set N
=
{
N
1
,
N
2
,
…
,
N
S
} which is ranked on the basic of the similarity (u
∉
N, from N
1 to N
s based on the sim
(
u
,
N
i
)) in descending order. And then we choose k investors as “neighbor users,” and the size of k is determined in two ways: one is choosing the correlation that is greater than the predetermined similarity threshold as neighbor users and the other is based on a predetermined number of neighbors (k) choosing the correlation maximum top-k stock as neighbor users.By the nature of the clustering, target investor and his most nearest neighbors belong to the same cluster. There is no need to search the nearest neighbors of target investor in the whole user space. However, user-based clustering method can greatly improve the speed of online nearest neighbors search and meet the real-time requirement of recommendation system.


#### 2.2.2. Predict and Generate Stock Set

From the above method, we are able to work out the nearest neighbor of the target investor and then refer to the neighbor investors’ actual scores for each stock, so as to predict the unknown stocks that the target investoru has not scored. The ratings of investor on the unknowns can be forecast by the following formula [21]:
(9)
Predictio
n
u
,
i
=
I
u
¯
+
∑
k
=
1
K
sim
(
a
,
k
)
*
(
I
k
-
I
k
¯
)
∑
k
=
1
K
sim
(
a
,
k
)
.
Cosine-based Similarity is as follows:
(10)
sim
(
a
,
k
)
=
∑
i
∈
I
a
k
r
a
,
i
r
k
,
i
∑
i
∈
I
a
k
r
a
,
i
2
r
k
,
i
2
,
where I
u
¯ denotes target investor U’s average rating for all stocks, m denotes the number of investors, K is the number of nearest neighbors, sim
(
a
,
k
) (see in formula (6)) denotes the level of similarity between investor a and investor k, I
a
,
k denotes investor a and investor k score items set commonly, r
a
,
i, and r
k
,
i denotes investor a and investor k score for stock i, respectively. I
k denotes neighbor investor k’s actual score for stock i and I
k
¯ denotes neighbor investor’s average ratings for all stocks.Finally, according to the prediction value of investors’ interest in the known and unknown stock, we select the rated top-N stocks as the most interesting stock set.


## 2.1. Fuzzy Clustering Analysis

The classification principle of clustering method is dividing every data samples into different categories. But the essence of fuzzy clustering analysis [16, 17] is based on studying the attributes of the object itself to construct fuzzy matrix, on this basis, so as to determine its classification relationship. So, it can embody the uncertain characteristics and reflect the real world more objectively.We subdivide the investors as follows. We build the investor clustering index system in accordance with age, work, years, income level, exchange amount and exchange cycle, and so on. By listing the visual characteristics as segmentation index of investors, it can effectively distinguish different trading habits between those investors and then cluster them together. Such clustering results can reflect investors with similar trading dynamic, which is able to provide more effective and accurate recommendation information for demanders. And then we utilize fuzzy clustering analysis method to subdivide investors [18].


### 2.1.1. Data Collection

Assume that a stock scored database exists, which includesn stock score data rating by m investors. The characteristics of investors based on the above segmentation index are given, and we define the set of investors as X
=
{
x
1
,
x
2
,
x
3
,
…
,
x
m
}, and the membership degree of the ith investor in the set X represented in the form of vector in a certain order
(1)
x
i
=
{
Ag
e
i
,
Wor
k
i
,
Yea
r
i
,
Salar
y
i
,
Amoun
t
i
,
Cycl
e
i
}
,
where x
i belongs to [
0,1
], i
=
1,2
,
3
…
,
m. x
i denotes the membership degree of the ith element in this set. We can get the feature vector quantitative results based on the investor subdivision index, denoted as x
i
=
{
x
i
1
,
x
i
2
,
x
i
3
,
x
i
4
,
x
i
5
,
x
i
6
}, i
=
1,2
,
3
…
,
m, and all feature indexes of m investors form a matrix:
(2)
X
*
=
[
x
11
x
12
…
x
16
x
21
x
22
…
x
26
⋮
⋮
⋮
x
m
1
x
m
2
…
x
m
6
]
,
where x
i
j represents the  jth characteristic index of theith object.


### 2.1.2. Data Standardization

Thejth of the matrix is calculated as
(3)
x
j
¯
=
1
m
∑
i
=
1
m
x
i
j
,
(4)
σ
2
=
1
m
∑
i
=
1
m
(
x
i
j
-
x
j
¯
)
2
,
j
=
1,2
,
…
,
6
.
Then, equation transformation is as follows:
(5)
x
i
j
′
=
x
i
j
-
x
j
¯
σ
j
,
i
=
1,2
,
3
,
…
,
m
;
j
=
1,2
,
…
,
6
.
After standardizing data, we can get the standardized feature index matrix:
(6)
X
′
=
[
x
11
′
x
12
′
…
x
16
′
x
21
′
x
22
′
…
x
26
′
⋮
⋮
⋮
x
m
1
′
x
m
2
′
…
x
m
6
′
]
.


### 2.1.3. Constructing Fuzzy Similar Matrix

According to the standardized data, the similarity coefficient method is used to determine the similarity coefficient among investors and establish the fuzzy similar matrix. Consider(7)
r
i
j
=
∑
k
=
1
6
|
x
i
k
′
-
x
i
′
¯
|
|
x
j
k
-
x
j
′
¯
|
∑
k
=
1
6
(
x
i
k
′
-
x
i
′
¯
)
2
∑
k
=
1
6
(
x
j
k
′
-
x
j
′
¯
)
2
,
where x
i
′
¯
=
(
1
/
6
)
∑
k
=
1
6
x
i
k, i
=
1,2
,
3
,
…
,
m, x
j
′
¯
=
(
1
/
6
)
∑
k
=
1
6
x
j
k, j
=
1,2
,
…
,
6.Ifr
i
j is negative, then r
i
j
′
=
(
r
i
j
+
1
)
/
2.Ifr
i
j does not belong to [
0,1
], then r
i
j
′
=
(
r
i
j
-
m
)
/
(
M
-
m
) or r
i
j
′
=
(
M
-
r
i
j
)
/
(
M
-
m
), M
=
max
⁡
i
,
j
⁡
(
r
i
j
), m
=
min
⁡
i
,
j
⁡
(
r
i
j
).Thus, we established a fuzzy similar matrix ofm by m between shareholders
(8)
R
=
[
r
11
r
12
…
r
1
m
r
21
r
22
…
r
2
m
⋮
⋮
⋮
r
m
1
r
m
2
…
r
m
m
]
.


### 2.1.4. Clustering

With the fuzzy similar matrixR, we utilize the square self-synthesis method to carry out the transitive closure t
(
R
)
:
R
⇒
R
2
⇒
R
4
⇒
⋯
⇒
R
2
k
=
t
(
R
), k
<
[
log
⁡
2
⁡
m
]
+
1.Based on the actual situation, we choose the appropriate confidence level valueδ, δ
∈
[
0,1
], so as to get the δ-matrix t
(
R
)
δ of t
(
R
). Having a classification based on (
R
)
δ, we can get the equivalence classification in the range of the confidence level δ.An investorU who is the target of stock recommendation will be added to investor information database. We subdivide the new database into several groups by using the fuzzy clustering method in order to determine which group the investor belongs to.


## 2.1.1. Data Collection

Assume that a stock scored database exists, which includesn stock score data rating by m investors. The characteristics of investors based on the above segmentation index are given, and we define the set of investors as X
=
{
x
1
,
x
2
,
x
3
,
…
,
x
m
}, and the membership degree of the ith investor in the set X represented in the form of vector in a certain order
(1)
x
i
=
{
Ag
e
i
,
Wor
k
i
,
Yea
r
i
,
Salar
y
i
,
Amoun
t
i
,
Cycl
e
i
}
,
where x
i belongs to [
0,1
], i
=
1,2
,
3
…
,
m. x
i denotes the membership degree of the ith element in this set. We can get the feature vector quantitative results based on the investor subdivision index, denoted as x
i
=
{
x
i
1
,
x
i
2
,
x
i
3
,
x
i
4
,
x
i
5
,
x
i
6
}, i
=
1,2
,
3
…
,
m, and all feature indexes of m investors form a matrix:
(2)
X
*
=
[
x
11
x
12
…
x
16
x
21
x
22
…
x
26
⋮
⋮
⋮
x
m
1
x
m
2
…
x
m
6
]
,
where x
i
j represents the  jth characteristic index of theith object.


## 2.1.2. Data Standardization

Thejth of the matrix is calculated as
(3)
x
j
¯
=
1
m
∑
i
=
1
m
x
i
j
,
(4)
σ
2
=
1
m
∑
i
=
1
m
(
x
i
j
-
x
j
¯
)
2
,
j
=
1,2
,
…
,
6
.
Then, equation transformation is as follows:
(5)
x
i
j
′
=
x
i
j
-
x
j
¯
σ
j
,
i
=
1,2
,
3
,
…
,
m
;
j
=
1,2
,
…
,
6
.
After standardizing data, we can get the standardized feature index matrix:
(6)
X
′
=
[
x
11
′
x
12
′
…
x
16
′
x
21
′
x
22
′
…
x
26
′
⋮
⋮
⋮
x
m
1
′
x
m
2
′
…
x
m
6
′
]
.


## 2.1.3. Constructing Fuzzy Similar Matrix

According to the standardized data, the similarity coefficient method is used to determine the similarity coefficient among investors and establish the fuzzy similar matrix. Consider(7)
r
i
j
=
∑
k
=
1
6
|
x
i
k
′
-
x
i
′
¯
|
|
x
j
k
-
x
j
′
¯
|
∑
k
=
1
6
(
x
i
k
′
-
x
i
′
¯
)
2
∑
k
=
1
6
(
x
j
k
′
-
x
j
′
¯
)
2
,
where x
i
′
¯
=
(
1
/
6
)
∑
k
=
1
6
x
i
k, i
=
1,2
,
3
,
…
,
m, x
j
′
¯
=
(
1
/
6
)
∑
k
=
1
6
x
j
k, j
=
1,2
,
…
,
6.Ifr
i
j is negative, then r
i
j
′
=
(
r
i
j
+
1
)
/
2.Ifr
i
j does not belong to [
0,1
], then r
i
j
′
=
(
r
i
j
-
m
)
/
(
M
-
m
) or r
i
j
′
=
(
M
-
r
i
j
)
/
(
M
-
m
), M
=
max
⁡
i
,
j
⁡
(
r
i
j
), m
=
min
⁡
i
,
j
⁡
(
r
i
j
).Thus, we established a fuzzy similar matrix ofm by m between shareholders
(8)
R
=
[
r
11
r
12
…
r
1
m
r
21
r
22
…
r
2
m
⋮
⋮
⋮
r
m
1
r
m
2
…
r
m
m
]
.


## 2.1.4. Clustering

With the fuzzy similar matrixR, we utilize the square self-synthesis method to carry out the transitive closure t
(
R
)
:
R
⇒
R
2
⇒
R
4
⇒
⋯
⇒
R
2
k
=
t
(
R
), k
<
[
log
⁡
2
⁡
m
]
+
1.Based on the actual situation, we choose the appropriate confidence level valueδ, δ
∈
[
0,1
], so as to get the δ-matrix t
(
R
)
δ of t
(
R
). Having a classification based on (
R
)
δ, we can get the equivalence classification in the range of the confidence level δ.An investorU who is the target of stock recommendation will be added to investor information database. We subdivide the new database into several groups by using the fuzzy clustering method in order to determine which group the investor belongs to.


## 2.2. User-Based Collaborative Filtering Algorithm

### 2.2.1. Nearest Neighbors Search

The basic idea of collaborative filtering algorithm [19, 20] based on user fuzzy clustering is to compare the degree of similarity in behavior between target investor and other investors in the same cluster, in order to find out the set of neighbor investors with similar preference more accurately. Then, according to the stock ratings of nearest neighbor, we can predict the stock ratings of target investor and generate optimized stock list.At first, we need to calculate the similarity between investors based on their historical scoring records. Currently, there are some methods to calculate the similarity between users, such as Pearson correlation and cosine-based similarity. For target investoru, we need to generate a neighbor set N
=
{
N
1
,
N
2
,
…
,
N
S
} which is ranked on the basic of the similarity (u
∉
N, from N
1 to N
s based on the sim
(
u
,
N
i
)) in descending order. And then we choose k investors as “neighbor users,” and the size of k is determined in two ways: one is choosing the correlation that is greater than the predetermined similarity threshold as neighbor users and the other is based on a predetermined number of neighbors (k) choosing the correlation maximum top-k stock as neighbor users.By the nature of the clustering, target investor and his most nearest neighbors belong to the same cluster. There is no need to search the nearest neighbors of target investor in the whole user space. However, user-based clustering method can greatly improve the speed of online nearest neighbors search and meet the real-time requirement of recommendation system.


### 2.2.2. Predict and Generate Stock Set

From the above method, we are able to work out the nearest neighbor of the target investor and then refer to the neighbor investors’ actual scores for each stock, so as to predict the unknown stocks that the target investoru has not scored. The ratings of investor on the unknowns can be forecast by the following formula [21]:
(9)
Predictio
n
u
,
i
=
I
u
¯
+
∑
k
=
1
K
sim
(
a
,
k
)
*
(
I
k
-
I
k
¯
)
∑
k
=
1
K
sim
(
a
,
k
)
.
Cosine-based Similarity is as follows:
(10)
sim
(
a
,
k
)
=
∑
i
∈
I
a
k
r
a
,
i
r
k
,
i
∑
i
∈
I
a
k
r
a
,
i
2
r
k
,
i
2
,
where I
u
¯ denotes target investor U’s average rating for all stocks, m denotes the number of investors, K is the number of nearest neighbors, sim
(
a
,
k
) (see in formula (6)) denotes the level of similarity between investor a and investor k, I
a
,
k denotes investor a and investor k score items set commonly, r
a
,
i, and r
k
,
i denotes investor a and investor k score for stock i, respectively. I
k denotes neighbor investor k’s actual score for stock i and I
k
¯ denotes neighbor investor’s average ratings for all stocks.Finally, according to the prediction value of investors’ interest in the known and unknown stock, we select the rated top-N stocks as the most interesting stock set.


## 2.2.1. Nearest Neighbors Search

The basic idea of collaborative filtering algorithm [19, 20] based on user fuzzy clustering is to compare the degree of similarity in behavior between target investor and other investors in the same cluster, in order to find out the set of neighbor investors with similar preference more accurately. Then, according to the stock ratings of nearest neighbor, we can predict the stock ratings of target investor and generate optimized stock list.At first, we need to calculate the similarity between investors based on their historical scoring records. Currently, there are some methods to calculate the similarity between users, such as Pearson correlation and cosine-based similarity. For target investoru, we need to generate a neighbor set N
=
{
N
1
,
N
2
,
…
,
N
S
} which is ranked on the basic of the similarity (u
∉
N, from N
1 to N
s based on the sim
(
u
,
N
i
)) in descending order. And then we choose k investors as “neighbor users,” and the size of k is determined in two ways: one is choosing the correlation that is greater than the predetermined similarity threshold as neighbor users and the other is based on a predetermined number of neighbors (k) choosing the correlation maximum top-k stock as neighbor users.By the nature of the clustering, target investor and his most nearest neighbors belong to the same cluster. There is no need to search the nearest neighbors of target investor in the whole user space. However, user-based clustering method can greatly improve the speed of online nearest neighbors search and meet the real-time requirement of recommendation system.


## 2.2.2. Predict and Generate Stock Set

From the above method, we are able to work out the nearest neighbor of the target investor and then refer to the neighbor investors’ actual scores for each stock, so as to predict the unknown stocks that the target investoru has not scored. The ratings of investor on the unknowns can be forecast by the following formula [21]:
(9)
Predictio
n
u
,
i
=
I
u
¯
+
∑
k
=
1
K
sim
(
a
,
k
)
*
(
I
k
-
I
k
¯
)
∑
k
=
1
K
sim
(
a
,
k
)
.
Cosine-based Similarity is as follows:
(10)
sim
(
a
,
k
)
=
∑
i
∈
I
a
k
r
a
,
i
r
k
,
i
∑
i
∈
I
a
k
r
a
,
i
2
r
k
,
i
2
,
where I
u
¯ denotes target investor U’s average rating for all stocks, m denotes the number of investors, K is the number of nearest neighbors, sim
(
a
,
k
) (see in formula (6)) denotes the level of similarity between investor a and investor k, I
a
,
k denotes investor a and investor k score items set commonly, r
a
,
i, and r
k
,
i denotes investor a and investor k score for stock i, respectively. I
k denotes neighbor investor k’s actual score for stock i and I
k
¯ denotes neighbor investor’s average ratings for all stocks.Finally, according to the prediction value of investors’ interest in the known and unknown stock, we select the rated top-N stocks as the most interesting stock set.


## 3. Utilizing Money Flow for Stock Recommendation

Both online stock recommended methods based on stock comment and price forecasting model based on mathematical analysis have some drawbacks. Given this, we proposed a new method for stock recommendation: recommended stocks based on money flow.Money flow is an important indicator of stock investment, which partly says that it indicates the direction of stock price movements in the future [22]. The process of judging money flow is more complex and not easy to master. Therefore, we establish a new model [23] based on M/G/1 to study money flow, and we are able to know the direction of stock price fluctuation in the future. In addition, consider the preference of stock-buying in different groups of investors, so that it can make appropriate personalized stock recommendation.


### 3.1. Model Description and Embedded Markov Chain

An exhaustive service and multiple vacations in classical M/G/1 queue system are introduced, which have vacation policy of close-down time. If there are customers in system as at completion of a vacation with lengthV, it stops the vacation and starts a new busy period. If there is no customer waiting at the completion of a vacation with length V, it will take another vacation following the same independent distribution of vacation until there are waiting customers at the completion of a vacation. Then, the system will start a new busy period. An exhaustive service rule is established in this section. It enters a close-down time after completion of last customer’s service. If there is no arrival customer during close-down period, it will take vacation after completion of close-down period. If there is at least one arrival customer, the server will complete the close-down period and serve for the customers until there is no waiting customers in system. It enters close-down period at the completion of the last customer and repeats the above process as the above-mentioned rule. The PGF and LST of stationary queue length and waiting time and their stochastic decomposition results are given. Queue discipline is single server and FCFS (first-come-first-serve) [24]. Assuming that interarrival time follows Poisson distribution with parameter λ, service time S is a nonnegative random variable with mean value 1
/
u, and it has a general distribution function G
(
x
) and LST G
*
(
s
). The distribution functions of vacation time, close time are denoted by V
(
x
) and C
(
x
), respectively. Their respective LSTs are V
*
(
x
), C
*
(
x
), T, S, V, and C which are mutually independent and follow FCFS rule.LetL
n be the number of customers after the nth customer departure instant, let Q
b be the number of customers at the start of a busy period, and let {
L
n
,
n
≥
1
} be the embedded Markov chain at the departure instant, where
(11)
v
j
=
∫
0
∞
(
λ
t
)
j
j
!
e
-
λ
t
d
v
(
t
)
j
≥
0
,
c
0
=
∫
0
∞
e
-
λ
t
d
C
(
t
)
=
C
*
(
λ
)
,
c
1
=
1
-
c
0
.
Then, the distribution of Q
b is given by
(12)
b
j
=
P
(
Q
b
=
j
)
=
{
1
-
c
0
+
c
0
v
1
1
-
v
0
,
j
=
1
c
0
v
j
1
-
v
0
,
j
≥
2
,
where v
0
=
∫
0
∞
e
-
λ
t
d
v
(
t
)
=
v
*
(
λ
). Thus, the transition probability matrix of Markov Chain {
L
n
,
n
≥
1
} is given by
(13)
P
~
=
[
k
0
k
1
k
2
…
a
0
a
1
a
2
…
a
0
a
1
…
…
…
]
,
where k
j
=
P
(
Q
b
-
1
+
A
=
j
)
=
∑
i
-
1
j
+
1
b
i
a
j
+
1
-
i, j
>
0, A denotes the number of arrival customers during a service period and its probability distribution is given by a
j
=
∫
0
∞
(
(
λ
t
)
j
/
j
!
)
e
-
λ
t
d
G
(
t
). It is proved that Markov chain {
L
n
,
n
≥
1
} is positive recurrence by Foster rule, if and only if ρ
=
λ
μ
-
1
<
1, which can be found in [25].


### 3.2. Stochastic Decomposition of Stationary Queue Length and Waiting Time

Theorem 1.
Ifρ
<
1, stationary queue length L
v can be decomposed into the sum of two independent random variables; namely, L
v
=
L
+
L
d, in which L denotes the stationary queue length of classical M/G/1 queue without vacation model, and its PGF L
(
z
) has been given by
(14)
L
(
z
)
=
(
1
-
ρ
)
(
1
-
z
)
B
*
(
λ
(
1
-
z
)
)
B
*
(
λ
(
1
-
Z
)
)
-
Z
.
And the probability generating function (PGF) of additional queue length L
d is given by
(15)
L
d
(
z
)
=
(
1
-
z
(
1
-
C
*
(
λ
)
)
-
c
*
(
λ
)
1
-
v
*
(
λ
)
(
v
*
(
λ
(
1
-
z
)
)
-
v
*
(
λ
)
)
)
×
(
β
(
1
-
z
)
)
-
1
,
where β
=
1
-
C
*
(
λ
)
+
λ
C
*
(
λ
)
E
(
V
)
/
(
1
-
v
*
(
λ
)
).Theorem 2.
Ifρ
<
1, stationary waiting time W
v can be decomposed into the sum of two independent random variables; namely, W
V
=
W
+
W
d, in which W denotes stationary waiting time of classical M/G/1 queue without vacation model, and its Laplace-Satieties transform (LST) W
*
(
s
) has been given in [26] by
(16)
W
*
(
s
)
=
(
1
-
ρ
)
s
s
-
λ
(
1
-
B
*
(
s
)
)
.
The Laplace-Satieties transform (LST) W
d
*
(
s
) of additional delay time W
d is given by
(17)
W
d
*
(
s
)
=
(
λ
-
(
λ
-
s
)
(
1
-
C
*
(
λ
)
)
-
c
*
(
λ
)
1
-
v
*
(
λ
)
(
v
*
(
s
)
-
v
*
(
λ
)
)
)
×
(
β
s
)
-
1
.From the results of the above new money flow model, we can know the direction of stock price movements in the future. Generally speaking, the price of those stocks with huge capital inflows will continue to rise. Conversely, the share price has gradually declined under the condition of ongoing outflow of funds. Then, according to the indicated results of money flow, we select the optimal stock in the above TOP-N recommendation set in order to recommend to investors.


## 3.1. Model Description and Embedded Markov Chain

An exhaustive service and multiple vacations in classical M/G/1 queue system are introduced, which have vacation policy of close-down time. If there are customers in system as at completion of a vacation with lengthV, it stops the vacation and starts a new busy period. If there is no customer waiting at the completion of a vacation with length V, it will take another vacation following the same independent distribution of vacation until there are waiting customers at the completion of a vacation. Then, the system will start a new busy period. An exhaustive service rule is established in this section. It enters a close-down time after completion of last customer’s service. If there is no arrival customer during close-down period, it will take vacation after completion of close-down period. If there is at least one arrival customer, the server will complete the close-down period and serve for the customers until there is no waiting customers in system. It enters close-down period at the completion of the last customer and repeats the above process as the above-mentioned rule. The PGF and LST of stationary queue length and waiting time and their stochastic decomposition results are given. Queue discipline is single server and FCFS (first-come-first-serve) [24]. Assuming that interarrival time follows Poisson distribution with parameter λ, service time S is a nonnegative random variable with mean value 1
/
u, and it has a general distribution function G
(
x
) and LST G
*
(
s
). The distribution functions of vacation time, close time are denoted by V
(
x
) and C
(
x
), respectively. Their respective LSTs are V
*
(
x
), C
*
(
x
), T, S, V, and C which are mutually independent and follow FCFS rule.LetL
n be the number of customers after the nth customer departure instant, let Q
b be the number of customers at the start of a busy period, and let {
L
n
,
n
≥
1
} be the embedded Markov chain at the departure instant, where
(11)
v
j
=
∫
0
∞
(
λ
t
)
j
j
!
e
-
λ
t
d
v
(
t
)
j
≥
0
,
c
0
=
∫
0
∞
e
-
λ
t
d
C
(
t
)
=
C
*
(
λ
)
,
c
1
=
1
-
c
0
.
Then, the distribution of Q
b is given by
(12)
b
j
=
P
(
Q
b
=
j
)
=
{
1
-
c
0
+
c
0
v
1
1
-
v
0
,
j
=
1
c
0
v
j
1
-
v
0
,
j
≥
2
,
where v
0
=
∫
0
∞
e
-
λ
t
d
v
(
t
)
=
v
*
(
λ
). Thus, the transition probability matrix of Markov Chain {
L
n
,
n
≥
1
} is given by
(13)
P
~
=
[
k
0
k
1
k
2
…
a
0
a
1
a
2
…
a
0
a
1
…
…
…
]
,
where k
j
=
P
(
Q
b
-
1
+
A
=
j
)
=
∑
i
-
1
j
+
1
b
i
a
j
+
1
-
i, j
>
0, A denotes the number of arrival customers during a service period and its probability distribution is given by a
j
=
∫
0
∞
(
(
λ
t
)
j
/
j
!
)
e
-
λ
t
d
G
(
t
). It is proved that Markov chain {
L
n
,
n
≥
1
} is positive recurrence by Foster rule, if and only if ρ
=
λ
μ
-
1
<
1, which can be found in [25].


## 3.2. Stochastic Decomposition of Stationary Queue Length and Waiting Time

Theorem 1.
Ifρ
<
1, stationary queue length L
v can be decomposed into the sum of two independent random variables; namely, L
v
=
L
+
L
d, in which L denotes the stationary queue length of classical M/G/1 queue without vacation model, and its PGF L
(
z
) has been given by
(14)
L
(
z
)
=
(
1
-
ρ
)
(
1
-
z
)
B
*
(
λ
(
1
-
z
)
)
B
*
(
λ
(
1
-
Z
)
)
-
Z
.
And the probability generating function (PGF) of additional queue length L
d is given by
(15)
L
d
(
z
)
=
(
1
-
z
(
1
-
C
*
(
λ
)
)
-
c
*
(
λ
)
1
-
v
*
(
λ
)
(
v
*
(
λ
(
1
-
z
)
)
-
v
*
(
λ
)
)
)
×
(
β
(
1
-
z
)
)
-
1
,
where β
=
1
-
C
*
(
λ
)
+
λ
C
*
(
λ
)
E
(
V
)
/
(
1
-
v
*
(
λ
)
).Theorem 2.
Ifρ
<
1, stationary waiting time W
v can be decomposed into the sum of two independent random variables; namely, W
V
=
W
+
W
d, in which W denotes stationary waiting time of classical M/G/1 queue without vacation model, and its Laplace-Satieties transform (LST) W
*
(
s
) has been given in [26] by
(16)
W
*
(
s
)
=
(
1
-
ρ
)
s
s
-
λ
(
1
-
B
*
(
s
)
)
.
The Laplace-Satieties transform (LST) W
d
*
(
s
) of additional delay time W
d is given by
(17)
W
d
*
(
s
)
=
(
λ
-
(
λ
-
s
)
(
1
-
C
*
(
λ
)
)
-
c
*
(
λ
)
1
-
v
*
(
λ
)
(
v
*
(
s
)
-
v
*
(
λ
)
)
)
×
(
β
s
)
-
1
.From the results of the above new money flow model, we can know the direction of stock price movements in the future. Generally speaking, the price of those stocks with huge capital inflows will continue to rise. Conversely, the share price has gradually declined under the condition of ongoing outflow of funds. Then, according to the indicated results of money flow, we select the optimal stock in the above TOP-N recommendation set in order to recommend to investors.


## 4. Simulation Experiment

### 4.1. Experimental Data and Method

In this section, we empirically study the performance of the proposed method. The experimental data come from real stock market, whereby, shareholders’ historical transaction information involves the privacy of individual investment, so the simulated data will be used in this experiment. The basic data used to calculate money flow in this article is market free data between 2013/9/2 and 2013/9/30, crossing off those stocks information with the opening time less than five days during five days of trading, in order to ensure the data neatly.Using stock return as the stock assessment indicators and analyzing investment matters of one target investor in order to have a comparison on investors’ returns by using different stock recommended methods. Determining whether the proposed recommended method can make returns depends on stock yields. The higher the yields the investors get, the better the effect of the recommended method.


### 4.2. Data Preprocessing

At first, 1000 investors are clustered according to their information, adjusting the clustering threshold. If the threshold is valued as too high, the classification will be less, which will lead to increase the complexity of computing user neighbors. Contrarily, if the threshold is valued as too small, the classification will become more, which will also decrease the accuracy of computing user neighbors. Therefore, we chose an appropriate clustering thresholdδ
=
0.7 through several tries in the experiment and 1000 investors are divided into five categories (see Table 1).Table 1
Fuzzy clustering algorithms-investor clustering distributed results.
Category name
The number of investors
Percentage
Cluster: 1
366
35.53%
Cluster: 2
110
10.68%
Cluster: 3
283
27.48%
Cluster: 4
172
16.70%
Cluster: 5
99
9.61%With the complement of clustering, we can use the user-based collaborative filtering recommendation method to figure out the nearest neighbors and preferred stock set. We chose an investor as analyzed target for research and work out that the target investor belongs to cluster 1 after clustering. Use the cosine-based similarity method to calculate the similarity between investor and other members in the same clustering, so as to find out the nearest neighbors (see Table2).Table 2
Nearest neighbors of target investor.
Ranking
Neighbor investors
The similarity with target investor
1
Investor 45
0.998
2
Investor 158
0.995
3
Investor 267
0.824
4
Investor 103
0.758
5
Investor 467
0.702
6
Investor 193
0.679
7
Investor 302
0.560
8
Investor 219
0.532
9
Investor 79
0.503
10
Investor 10
0.400From the proofs and the results of the above experiment, we know that, by the nature of the clustering, target investor and his most nearest neighbors belong to the same cluster, and there is no need to search the nearest neighbors of target investor in the whole user space. Thus, fuzzy clustering technology can greatly improve the speed of online nearest neighbors search and meet the real-time requirement of recommendation system.According to the stock rating that is evaluated by target investor, we select the stocks with higher scores as the candidate (see Table3).Table 3
Candidate set of target investor.
Ranking
Stock name
Rating
1
China Unicom (600050)
5.000
2
Vanke A (0000002)
4.000
3
Johnson Holding (600662)
4.896
4
Sinolink Securities (600109)
3.452
5
Merchants Bank (600036)
3.104
⋯
⋯
⋯We do some research on several stocks with higher scores by using the proposed money flow model to predict the trend of stocks during the time interval from 2013/9/2 to 2013/9/30 and utilize the new model to filter the candidate stocks, and those stocks with higher investment value will be selected as the recommendation set (see Table4).Table 4
Previous money flow of the candidate stocks.
Stock name
Period
Sample days
Cumulative
Up/down ratio
money flow
China Unicom (600050)
2013/9/2–2013/9/6
5
6187.665
0.31%
2013/9/9–2013/9/14
5
51077.402
4.31%
2013/9/16–2013/9/18
3
64736.340
2.65%
2013/9/23–2013/9/27
5
12501.850
−6.03%
Vanke A (0000002)
2013/9/2–2013/9/6
5
−13123.830
0.95%
2013/9/9–2013/9/14
5
28359.422
6.18%
2013/9/16–2013/9/18
3
15296.272
−5.03%
2013/9/23–2013/9/27
5
−33870.768
−5.92%
Johnson Holding (600662)
2013/9/2–2013/9/6
5
12300.750
−1.17%
2013/9/9–2013/9/14
5
13402.440
7.13%
2013/9/16–2013/9/18
3
6816.415
−4.88%
2013/9/23–2013/9/27
5
3489.594
−1.40%
Sinolink Securities (600109)
2013/9/2–2013/9/6
5
3560.799
−1.31%
2013/9/9–2013/9/14
5
10093.790
7.19%
2013/9/16–2013/9/18
3
6917.482
−3.21%
2013/9/23–2013/9/27
5
3194.956
−2.79%
Merchants Bank (600036)
2013/9/2–2013/9/6
5
11066.220
2.16%
2013/9/9–2013/9/14
5
60900.591
8.54%
2013/9/16–2013/9/18
3
34223.933
−5.67%
2013/9/23–2013/9/27
5
3981.332
−3.14%


### 4.3. Experimental Results

In this part, we apply the above model to study the effectiveness of stocks recommendation. We select several candidate stocks at random and process their weekly money flow data though using the proposed method to predict stocks movement. By observing the relationship between the money flow and closing price, we can verify whether the proposed method can predict stocks movements or not. We take China Unicom, Vanke A, and Merchants Bank as the research stock (see Figure1).Figure 1
China Unicom weekly existing cash flow.Figure1 shows the weekly existing cash flow of China Unicom. The red post in the below indicates cash inflows. The blue post in the below indicates cash outflow. The green line up and line down indicate the closing price fluctuation. If red post begins to shorten, it shows that the stock price will be moving lower. If blue post begins to shorten, it shows that the stock price will be moving higher. When the blue post changes to red post, it shows us that the stock price will be improved and we can follow the trend.Figure2 shows the weekly existing cash flow of Vanke A, and Figure 3 shows the weekly existing cash flow of Merchants Bank. We can see that the price of those stocks with huge capital inflows will move higher, and the share price has been gradually declined under the condition of ongoing outflow of funds. Furthermore, they more fully illustrate the effectiveness of the proposed algorithm. Money flow can reflect the variation of stock prices and we can choose the high investment value stocks based on the money flow indicator.Figure 2
Vanke A weekly existing cash flow.Figure 3
Merchants Bank weekly existing cash flow.According to the above research results, we assume that the target investor purchased two stocks in September, 2003. Different stock recommended methods bring different investment returns (see Figure4). Figure 4 shows the comparison of the rate of return. The target investor bought the stock of China Unicom and Vanke A by using the traditional recommended method in the past five weeks. And the red line indicates the rate of return of two stocks. If the target investor bought the stocks of China Unicom and Merchants Bank using the new proposed recommended method, they can receive much more return as the blue line indicated.Figure 4
Returns comparison of different recommended methods.It is clearly evident from Figure5 that different number of investors uses proposed recommended method and traditional recommended method, respectively, in September, 2003, which brings different returns as indicated. The blue line indicates the returns of investors using the proposed recommended method, and the red line indicates the returns of investors using traditional recommended method. Obviously, the proposed recommended method brings more returns than traditional method. All in all, by comparing different numbers of investors, it can fully verify the universities and effectiveness of the proposed recommendation method.Figure 5
Returns comparison of different number of investors.Through the above experimental results, it can be observed that the cash flow is very practical in the practical investment. It can guide us effectively to determine market trends.


## 4.1. Experimental Data and Method

In this section, we empirically study the performance of the proposed method. The experimental data come from real stock market, whereby, shareholders’ historical transaction information involves the privacy of individual investment, so the simulated data will be used in this experiment. The basic data used to calculate money flow in this article is market free data between 2013/9/2 and 2013/9/30, crossing off those stocks information with the opening time less than five days during five days of trading, in order to ensure the data neatly.Using stock return as the stock assessment indicators and analyzing investment matters of one target investor in order to have a comparison on investors’ returns by using different stock recommended methods. Determining whether the proposed recommended method can make returns depends on stock yields. The higher the yields the investors get, the better the effect of the recommended method.


## 4.2. Data Preprocessing

At first, 1000 investors are clustered according to their information, adjusting the clustering threshold. If the threshold is valued as too high, the classification will be less, which will lead to increase the complexity of computing user neighbors. Contrarily, if the threshold is valued as too small, the classification will become more, which will also decrease the accuracy of computing user neighbors. Therefore, we chose an appropriate clustering thresholdδ
=
0.7 through several tries in the experiment and 1000 investors are divided into five categories (see Table 1).Table 1
Fuzzy clustering algorithms-investor clustering distributed results.
Category name
The number of investors
Percentage
Cluster: 1
366
35.53%
Cluster: 2
110
10.68%
Cluster: 3
283
27.48%
Cluster: 4
172
16.70%
Cluster: 5
99
9.61%With the complement of clustering, we can use the user-based collaborative filtering recommendation method to figure out the nearest neighbors and preferred stock set. We chose an investor as analyzed target for research and work out that the target investor belongs to cluster 1 after clustering. Use the cosine-based similarity method to calculate the similarity between investor and other members in the same clustering, so as to find out the nearest neighbors (see Table2).Table 2
Nearest neighbors of target investor.
Ranking
Neighbor investors
The similarity with target investor
1
Investor 45
0.998
2
Investor 158
0.995
3
Investor 267
0.824
4
Investor 103
0.758
5
Investor 467
0.702
6
Investor 193
0.679
7
Investor 302
0.560
8
Investor 219
0.532
9
Investor 79
0.503
10
Investor 10
0.400From the proofs and the results of the above experiment, we know that, by the nature of the clustering, target investor and his most nearest neighbors belong to the same cluster, and there is no need to search the nearest neighbors of target investor in the whole user space. Thus, fuzzy clustering technology can greatly improve the speed of online nearest neighbors search and meet the real-time requirement of recommendation system.According to the stock rating that is evaluated by target investor, we select the stocks with higher scores as the candidate (see Table3).Table 3
Candidate set of target investor.
Ranking
Stock name
Rating
1
China Unicom (600050)
5.000
2
Vanke A (0000002)
4.000
3
Johnson Holding (600662)
4.896
4
Sinolink Securities (600109)
3.452
5
Merchants Bank (600036)
3.104
⋯
⋯
⋯We do some research on several stocks with higher scores by using the proposed money flow model to predict the trend of stocks during the time interval from 2013/9/2 to 2013/9/30 and utilize the new model to filter the candidate stocks, and those stocks with higher investment value will be selected as the recommendation set (see Table4).Table 4
Previous money flow of the candidate stocks.
Stock name
Period
Sample days
Cumulative
Up/down ratio
money flow
China Unicom (600050)
2013/9/2–2013/9/6
5
6187.665
0.31%
2013/9/9–2013/9/14
5
51077.402
4.31%
2013/9/16–2013/9/18
3
64736.340
2.65%
2013/9/23–2013/9/27
5
12501.850
−6.03%
Vanke A (0000002)
2013/9/2–2013/9/6
5
−13123.830
0.95%
2013/9/9–2013/9/14
5
28359.422
6.18%
2013/9/16–2013/9/18
3
15296.272
−5.03%
2013/9/23–2013/9/27
5
−33870.768
−5.92%
Johnson Holding (600662)
2013/9/2–2013/9/6
5
12300.750
−1.17%
2013/9/9–2013/9/14
5
13402.440
7.13%
2013/9/16–2013/9/18
3
6816.415
−4.88%
2013/9/23–2013/9/27
5
3489.594
−1.40%
Sinolink Securities (600109)
2013/9/2–2013/9/6
5
3560.799
−1.31%
2013/9/9–2013/9/14
5
10093.790
7.19%
2013/9/16–2013/9/18
3
6917.482
−3.21%
2013/9/23–2013/9/27
5
3194.956
−2.79%
Merchants Bank (600036)
2013/9/2–2013/9/6
5
11066.220
2.16%
2013/9/9–2013/9/14
5
60900.591
8.54%
2013/9/16–2013/9/18
3
34223.933
−5.67%
2013/9/23–2013/9/27
5
3981.332
−3.14%


## 4.3. Experimental Results

In this part, we apply the above model to study the effectiveness of stocks recommendation. We select several candidate stocks at random and process their weekly money flow data though using the proposed method to predict stocks movement. By observing the relationship between the money flow and closing price, we can verify whether the proposed method can predict stocks movements or not. We take China Unicom, Vanke A, and Merchants Bank as the research stock (see Figure1).Figure 1
China Unicom weekly existing cash flow.Figure1 shows the weekly existing cash flow of China Unicom. The red post in the below indicates cash inflows. The blue post in the below indicates cash outflow. The green line up and line down indicate the closing price fluctuation. If red post begins to shorten, it shows that the stock price will be moving lower. If blue post begins to shorten, it shows that the stock price will be moving higher. When the blue post changes to red post, it shows us that the stock price will be improved and we can follow the trend.Figure2 shows the weekly existing cash flow of Vanke A, and Figure 3 shows the weekly existing cash flow of Merchants Bank. We can see that the price of those stocks with huge capital inflows will move higher, and the share price has been gradually declined under the condition of ongoing outflow of funds. Furthermore, they more fully illustrate the effectiveness of the proposed algorithm. Money flow can reflect the variation of stock prices and we can choose the high investment value stocks based on the money flow indicator.Figure 2
Vanke A weekly existing cash flow.Figure 3
Merchants Bank weekly existing cash flow.According to the above research results, we assume that the target investor purchased two stocks in September, 2003. Different stock recommended methods bring different investment returns (see Figure4). Figure 4 shows the comparison of the rate of return. The target investor bought the stock of China Unicom and Vanke A by using the traditional recommended method in the past five weeks. And the red line indicates the rate of return of two stocks. If the target investor bought the stocks of China Unicom and Merchants Bank using the new proposed recommended method, they can receive much more return as the blue line indicated.Figure 4
Returns comparison of different recommended methods.It is clearly evident from Figure5 that different number of investors uses proposed recommended method and traditional recommended method, respectively, in September, 2003, which brings different returns as indicated. The blue line indicates the returns of investors using the proposed recommended method, and the red line indicates the returns of investors using traditional recommended method. Obviously, the proposed recommended method brings more returns than traditional method. All in all, by comparing different numbers of investors, it can fully verify the universities and effectiveness of the proposed recommendation method.Figure 5
Returns comparison of different number of investors.Through the above experimental results, it can be observed that the cash flow is very practical in the practical investment. It can guide us effectively to determine market trends.


## 5. Conclusions

In this paper, we proposed a personalized stock recommended method based on money flow model. And the proposed recommended method based on money flow model not only can satisfy the investors’ investment preferences, but also can filter some low investment value stocks in order to make investors choose the more valued stocks and get more returns. From the experimental results, it is shown that, compared with the traditional recommended method, the proposed method can analyze and filter the recommendation stock returns and improve the investment benefits of investors.In the future, in order to increase the accuracy of recommendation, we will choose the most comprehensive and representative investor characteristic indexes so as to acquire the exquisite investor segmentation results. And, considering the changes of investor’s preference impacts on investor segmentation, we will improve the recommended method purposefully. Furthermore, the proposed recommended model will be applied to more stock markets and recommend stocks with more investing values for the investors.



---

*Source: 353910-2014-10-16.xml*