20160104-三星证券-Big-data_algorithms__Naive_Bayes_classifiers_20页_565kb
报告摘要
Summary of the Document: Machine Learning and Investment Strategy
Core Content
This document discusses the application of machine learning, specifically Naive Bayes classifiers, in investment strategy. It outlines two models: the Winner/Loser model and the Bag of Words model, which are used to predict stock performance and analyze text sentiment, respectively. The document provides an overview of big data and how it is leveraged through machine learning algorithms to make quantitative investment decisions.
Main Points
1. Big Data and Machine Learning
- Big data refers to large and complex data sets that are difficult to process with traditional tools.
- Machine learning is the study of algorithms that can learn from data and make predictions.
- The demand for machine learning-based data analysis has increased significantly in developed markets, especially in the US.
- Machine learning is used in equity investment to analyze market data and build automatic investment models.
- Robo-advisers are based on machine learning algorithms and are becoming increasingly popular in the securities industry.
2. Introduction to Naive Bayes Classifiers
- Naive Bayes classifiers are a family of probabilistic algorithms used for classification tasks.
- They are based on Bayes’ theorem, which allows the calculation of posterior probabilities using prior probabilities and likelihoods.
- The assumption of independence among features is central to the naive Bayes approach.
- The final formula used in naive Bayes is:
$$
P(C_k | x_1, \dots, x_n) \propto P(C_k) \prod_{i=1}^n P(x_i | C_k)
$$ - This model can be applied to both numerical data and text data.
3. Winner/Loser Model
- The model is used to classify stocks into Winners (outperformers) or Losers (underperformers) based on fundamental data.
- The training data consists of 2400 data sets for each of the 200 Kospi constituents across 12 quarters.
- Classification criteria:
- A stock is classified as a Winner if its FQ1 relative performance is 0% or higher.
- A stock is classified as a Loser if its FQ1 return is negative.
- Features used:
- Book-to-price (B/P)
- Sales growth
- Target price (TP) upside
- Share price volatility
- ROE (Return on Equity)
- The model calculates the probability density function (PDF) for each feature and compares it to the prior probabilities of the classes to determine the class with the highest probability.
- Example: Stock A is classified as a Winner based on its features, even though its B/P is far from the mean of both classes, because the PDF for the Winner class is higher.
- Advantages:
- Automatically filters out ineffective investment indicators.
- Enables gradual and automatic replacement of investment strategies.
- Disadvantages:
- Does not predict the magnitude of stock performance, only the direction.
- Can be partially addressed by introducing more classes.
4. Bag of Words (BoW) Model
- The BoW model is used for text mining and classifies texts based on word frequency.
- It assumes that the order of words does not matter and only considers the frequency.
- The model is trained on a collection of texts with known categories (e.g., positive and negative reviews).
- The probability of a word appearing in a class is calculated as:
$$
P(x_i | C_k) = \frac{\text{number of word } x_i \text{ in } C_k \text{ training text} + \alpha}{\text{number of total words in } C_k \text{ training text} + \text{number of different words} \times \alpha}
$$ - Laplace smoothing is used to prevent zero probabilities for new words.
- The model is implemented in Python 2.7, and the code includes functions for:
- Loading training and testing texts.
- Creating a Bag of Words (BoW) representation.
- Calculating the probability of each class.
- Adjusting probabilities for classification.
Key Information
- The Winner/Loser model uses fundamental data to classify stocks into two groups.
- The Bag of Words model uses text frequency to classify news or reviews into positive or negative.
- Both models are based on Naive Bayes classifiers, which are probabilistic and assume feature independence.
- The Winner/Loser model can be used to make investment decisions by predicting the direction of stock performance.
- The BoW model is used for sentiment analysis and can be applied to stock market news.
- The code for the BoW model is written in Python 2.7 and includes functions for text processing and probability calculation.
- The example test sentence is classified as negative by the model, with a 94.3% probability of belonging to the negative class.
Conclusion
The document provides a detailed explanation of Naive Bayes classifiers and their application in investment strategies. It highlights the use of big data and machine learning in quantitative analysis, and introduces two models that can be used to classify stocks and text sentiment. The Winner/Loser model is used to predict stock performance based on fundamental data, while the Bag of Words model is used to analyze text sentiment for investment decisions. Both models are automated, data-driven, and efficient, and can be used to build investment strategies.
试读结束,高清完整版pdf/doc/ppt,请点下载