Data processing method and electronic equipment
By acquiring and analyzing the characteristic stock data of the target fund and building a multi-data source retrieval and analysis model, the problem of single fund net value data is solved, the diversity and processing efficiency of data are improved, and more accurate analysis support is achieved.
Patent Information
- Application Number
- CN202411277553.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-31
AI Technical Summary
In the prior art, the net value data of stock funds is single source and cannot provide sufficient data support, resulting in a single analysis data and lack of diversity.
By obtaining structured data of characteristic stocks held by the target fund, a search formula is constructed, multi-data source searches are carried out, public opinion data, fundamental data and influencing factors are obtained, factor exposure and fund attenuation coefficient are calculated, and multi-factor model and synthesis are constructed. Process the model to improve the diversity and accuracy of the data.
It improves data processing efficiency, increases the richness and accuracy of data sources, reduces the workload of manual processing, avoids manual mistakes, and provides more comprehensive data analytical support.
Smart Images

Figure CN119226582A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology; specifically, to a data processing method and electronic equipment. Background Art
[0002] With the development of social economy and the rapid progress of science and technology, stock funds have become an important means of asset allocation in recent years. The net value of stock funds is an important indicator for investors to understand fund performance and make trading decisions; however, the current data source of fund net value is single, which only comes from the net value announced by the fund company, and cannot provide investors with strong data support.
[0003] It can be seen that how to improve the diversity of analytical data is an urgent problem to be solved. Summary of the invention
[0004] In order to solve the above technical problems, the embodiments of the present application provide a data processing method and an electronic device, which solve the problem of single analysis data in the related art.
[0005] According to one aspect of an embodiment of the present application, a data processing method is provided, the method comprising: obtaining a number of characteristic stocks held by a target fund, and obtaining structured data of each characteristic stock; the structured data comprises stock name, stock code, industry, position data and rate of return; constructing a search formula based on the structured data, and searching in multiple data sources according to the search formula to obtain public opinion data and fundamental data of the characteristic industry corresponding to the target fund; obtaining the public opinion score of the characteristic industry according to the public opinion data, obtaining the fundamental score of the characteristic industry according to the fundamental data, and obtaining the factor exposure corresponding to the target fund on the influencing factor according to the structured data; wherein the fundamental score of the characteristic industry, the public opinion score of the characteristic industry and the factor exposure corresponding to the target fund on the influencing factor are used as multiple analysis data of the target fund.
[0006] Optionally, when the influencing factors include market factors, scale factors and momentum factors, the factor exposure corresponding to the target fund on the influencing factors is obtained based on the structured data, including: based on the structured data, obtaining the yield of the target fund on several trading days, and the market factor, the scale factor and the momentum factor corresponding to each trading day; taking the yield as the dependent variable, and the market factor, the scale factor and the momentum factor as independent variables, and performing linear regression analysis on the yield, the market factor, the scale factor and the momentum factor to obtain regression results; the regression results include the regression coefficient corresponding to each independent variable; taking the regression coefficient corresponding to each independent variable as the factor exposure of the corresponding influencing factor.
[0007] Optionally, obtaining the public opinion score of the characteristic industry based on the public opinion data includes: preprocessing the industry evaluation data of each characteristic industry in a preset type of media to obtain industry preprocessed text; performing sentiment analysis on the industry preprocessed text of each characteristic industry to obtain the public opinion score of each characteristic industry in the preset type of media; when the fundamental data includes industry growth rates, market shares and financial indicators of several characteristic industries, obtaining the fundamental scores of the characteristic industries based on the fundamental data includes: obtaining the fundamental scores corresponding to each characteristic industry based on the growth rates, market shares and financial indicators of each characteristic industry.
[0008] Optionally, when the multiple analysis data also include a fund attenuation coefficient, the method also includes: obtaining the holdings data of the target fund in each reporting period, the holdings data include several characteristic industries, and the corresponding holding ratio of each characteristic industry; based on the holdings data of the target fund in adjacent reporting periods, confirming the adjustment range and adjustment possibility of the characteristic industry in each reporting period, and using them as dependent variables; obtaining the news media scores and social media scores of each characteristic industry in each reporting period, and using them as independent variables; using the industry growth rate, market share and financial indicators of each characteristic industry in each reporting period as independent variables; performing linear regression analysis on the adjustment range, adjustment possibility, news media scores, social media scores, industry growth rate, market share and financial indicators corresponding to each characteristic industry, and obtaining a position adjustment model for each characteristic industry; and calculating the fund attenuation coefficient based on the position adjustment model.
[0009] Optionally, the fund attenuation coefficient is calculated according to the portfolio adjustment model, including: obtaining the current portfolio adjustment possibility and the current portfolio adjustment range corresponding to each characteristic industry according to the portfolio adjustment model; confirming the industry attenuation coefficient of each characteristic industry according to the current portfolio adjustment possibility and the current portfolio adjustment range corresponding to each characteristic industry; and obtaining the fund attenuation coefficient based on the attenuation coefficient and position ratio of each characteristic industry.
[0010] Optionally, after obtaining a plurality of analysis data corresponding to the target fund, the method further includes: constructing a data analysis model based on the plurality of analysis data; the data analysis model includes a multi-factor model; the construction process of the multi-factor model includes: constructing a multi-factor model based on market factors, scale factors and momentum factors, and the calculation formula is as follows:
[0011]
[0012] Among them, R f Indicates the first reference value of the target fund; sw i represents the holding ratio of the i-th feature stock; R iis the return rate of the i-th characteristic stock; MK represents the market factor; SMB represents the size factor; MOM represents the momentum factor; β1 represents the factor exposure of the target fund to the market factor, β2 represents the factor exposure of the target fund to the size factor, and β3 represents the factor exposure of the target fund to the momentum factor.
[0013] Optionally, the data analysis model also includes a comprehensive processing model, which is used to adjust the first reference value of the target fund using the fund attenuation coefficient in accordance with several preset methods to obtain several second reference values.
[0014] Optionally, several characteristic stocks held by the target fund are obtained, including: obtaining all stocks held by the target fund and arranging them in descending order of proportion of holdings; taking stocks ranked before or before a preset ranking as characteristic stocks; taking stocks after the preset ranking as supplementary stocks; obtaining performance data of each supplementary stock; analyzing the performance data of each supplementary stock to obtain the influence of each supplementary stock; judging whether the influence of each supplementary stock is greater than a preset influence; if so, taking the supplementary stock as a characteristic stock.
[0015] Optionally, when the performance data includes real-time price screenshots and holdings of stocks, the performance data of each supplementary stock is analyzed to obtain the influence of each supplementary stock, including: based on the real-time price screenshots, obtaining the number of price changes, the frequency of changes, the single change amplitude and the total amplitude; based on the number of price changes, the frequency of changes, the single change amplitude and the total amplitude, confirming the stock's expressiveness; based on the stock's expressiveness and holdings, confirming the stock's influence.
[0016] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the data processing method in the above technical solution is implemented.
[0017] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions so that the electronic device implements a data processing method as in the above technical solution.
[0018] According to one aspect of an embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the data processing method in the above technical solution is implemented.
[0019] The technical solution provided by this application includes at least the following beneficial effects:
[0020] (1) This application obtains structured data of several characteristic stocks held by the target fund, while ensuring the representativeness of the data, reducing the amount of data and improving data processing efficiency;
[0021] (2) This application constructs a search formula through the structured data of several characteristic stocks, and searches in multiple data sources to obtain the public opinion data, fundamental data and influencing factors of each characteristic industry corresponding to the target fund; while increasing the richness of data sources, the data obtained by retrieval is more accurate and targeted;
[0022] (3) This application obtains multiple analytical data for reference based on structured data, public opinion data, fundamental data and influencing factors; it can reduce the workload of manual processing and avoid human errors, thereby further improving the data processing efficiency of multiple data sources. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0024] Figure 1 The figure is a flow chart of a data processing method provided by an embodiment of the present application;
[0025] Figure 2 Shown Figure 1 An exemplary flow chart of step S30 in FIG.
[0026] Figure 3 FIG. 1 is a flow chart of another data processing method provided in an embodiment of the present application;
[0027] Figure 4 The figure is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0028] Figure 5 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0029] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0030] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0031] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0032] It should also be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.
[0033] Figure 1 FIG. 1 is a flow chart of a data processing method provided in an embodiment of the present application; Figure 1 As shown, the method specifically comprises the following steps:
[0034] Step S10: obtaining a number of characteristic stocks held by the target fund, and obtaining structured data of each characteristic stock;
[0035] In this embodiment, the target fund holds multiple stocks. If data is collected for each stock for analysis, the amount of data required for analysis will be too large. Especially for a target fund that holds many stocks, the data generated is undoubtedly very large, which increases the difficulty of analysis. Therefore, in this embodiment, by obtaining several characteristic stocks of the target fund and analyzing based on the structured data of the characteristic stocks, the situation of the entire target fund is judged, thereby improving the efficiency of data processing. In this embodiment, the structured data includes stock name, stock code, industry, position data and rate of return.
[0036] It should be noted that this application obtains disclosure information, research reports and other data related to the capital market, industry, fund products, etc. from the official website of the fund company, Internet public data, and financial market data suppliers; extracts the required basic information of the fund products, regular product operation reports, real-time quotation data of the capital market, macroeconomic indicators, meso-industry data, product-related social and news information, etc. from the collected data, structures and normalizes the data to obtain the structured data of this application.
[0037] For example: The following data can be obtained through the fund company's official website and third-party financial data platform:
[0038]
[0039]
[0040] (2) Structuring and normalizing news information and public opinion information. Assume that the information obtained is structured as follows:
[0041]
[0042] (3) Clean and segment the text content.
[0043] The processing results for the news content "The information technology industry continues to grow, and AI technology leads a new round of technological revolution" are as follows:
[0044] Original text: The information technology industry continues to grow, and AI technology leads a new round of technological revolution.
[0045] Cleaned text: The information technology industry continues to grow, and AI technology leads a new round of technological revolution
[0046] Word segmentation results: ["information technology", "industry", "sustainable", "growth", "ai", "technology", "lead", "new round", "technology", "revolution"]
[0047] (4) Analyze and normalize the data. Use the BERT model to perform sentiment analysis and sentiment classification to obtain a sentiment score. The sentiment score uses Min-Max, ranging from -1 to 1, with positive values representing positive emotions and negative values representing negative emotions.
[0048] Text 1: "The information technology industry continues to grow, and AI technology leads a new round of technological revolution", sentiment score: 0.85 (positive value indicates positive emotion), sentiment classification: positive.
[0049] Text 2: "Information technology stocks rose again as investor confidence grew", sentiment score: 0.75 (positive values indicate positive sentiment), sentiment classification: positive.
[0050] Step S20: constructing a search formula based on the structured data, and searching multiple data sources according to the search formula to obtain public opinion data and fundamental data of the characteristic industry corresponding to the target fund;
[0051] In this embodiment, the characteristic industries include the industries in which the characteristic stocks are located; the characteristic stocks are divided according to the industry, and the influence of public opinion, fundamentals and influencing factors on multiple characteristic stocks in the same characteristic industry is similar. The characteristic industries described in this embodiment include information technology industry, financial industry, consumer service industry and industry, etc.
[0052] In this embodiment, each characteristic industry is provided with a corresponding search formula, the search formula includes several synonyms of the name of the characteristic industry, and the search formula also includes the stock name of the characteristic stock.
[0053] Multiple data sources include: news media, social media, fund company websites, and third-party financial platforms, etc. By searching in multiple data sources, the source of data is expanded, so that users can analyze the target fund from multiple angles and multiple sources.
[0054] Step S30: Obtain the public opinion score of the characteristic industry according to the public opinion data, obtain the fundamental score of the characteristic industry according to the fundamental data, and obtain the factor exposure corresponding to the target fund on the influencing factor according to the structured data; and use the fundamental score of the characteristic industry, the public opinion score of the characteristic industry and the factor exposure corresponding to the target fund on the influencing factor as multiple analysis data of the target fund.
[0055] In this embodiment, the plurality of analysis data includes the public opinion scores and fundamental scores of several characteristic industries, and the factor exposure corresponding to the target fund on the influencing factors. In this embodiment, the factor exposure indicates the degree of influence of the influencing factors on the target fund.
[0056] In this embodiment, obtaining the public opinion score of the characteristic industry based on the public opinion data includes: preprocessing the industry evaluation data of each characteristic industry in the preset type of media to obtain the industry preprocessed text; performing sentiment analysis on the industry preprocessed text of each characteristic industry to obtain the public opinion score of each characteristic industry in the preset type of media.
[0057] In this embodiment, when the fundamental data includes industry growth rates, market shares and financial indicators of several characteristic industries, obtaining the fundamental scores of the characteristic industries based on the fundamental data includes: obtaining the fundamental scores corresponding to each characteristic industry based on the growth rate, market share and financial indicators of each characteristic industry.
[0058] In this embodiment, by analyzing the industry distribution of fund holdings and using the AI big model to evaluate the public opinion and fundamentals of related industries, we can better understand market dynamics, fit the possibility and extent of fund managers' position adjustments, and add it as an attenuation coefficient to the calculation of net asset value increases or decreases.
[0059] Based on the industry distribution of the underlying holdings of the fund products, extract the heavily weighted industries and the corresponding proportion of each industry in the fund holdings. For example: Classify fund (f) according to the GICS industry classification standard and calculate the holding proportion. The data is as follows
[0060] Serial number industry Proportion 1 information Technology 36% 2 finance 22% 3 Consumer Services 13% 4 industry 3%
[0061] In this embodiment, (1) industry public opinion data, including news and social media data, is collected, and sentiment analysis and sentiment classification are performed using the BERT large model to obtain sentiment scores. The sentiment score ranges from -1 to 1, with positive values indicating positive sentiment and negative values indicating negative sentiment. (2) Fundamental data such as industry growth rate, market share, and financial indicators are collected, and the BERT large model is used to analyze and obtain fundamental scores. The fundamental score ranges from 0 to 1, and the higher the value, the better the industry fundamentals. For example: Through collection and analysis, the data set related to the fund (f) industry can be obtained as follows:
[0062]
[0063] It should be noted that users use processed public opinion scores, fundamental scores and factor exposure to assist in the analysis of target funds, which improves the efficiency of multi-data source processing and reduces the difficulty of manual processing and analysis of multi-data source data.
[0064] In some embodiments, the public opinion data includes industry evaluation data of several preset types of media on several characteristic industries within a preset time range; the preset types of media include news media and social media; the public opinion score includes news media score and social media score; obtaining news media score or social media score includes: preprocessing the industry evaluation data of each characteristic industry in the preset type of media to obtain preprocessed text; preprocessing includes data cleaning and word segmentation processing; performing sentiment analysis on the industry preprocessed text of each characteristic industry respectively to obtain the score of each characteristic industry in the preset type of media; the larger the score, the more positive the corresponding characteristic industry is in the evaluation of the preset type of media.
[0065] The preset time range described in this embodiment includes several trading days before the current trading day, holidays, and the date of issuance of official documents for each characteristic industry and several days thereafter. In this embodiment, the preset types of media collected include news media and social media. Among them, the characteristics of news media texts include: official and standardized terms, accurate information, representative of official opinions, and small amount of data; the characteristics of social media texts include: colloquial terms, more erroneous information, representative of public opinions, and large amount of data; therefore, the industry data collected by news media and social media are processed and analyzed separately. It can make the public opinion evaluation corresponding to each characteristic industry more accurate.
[0066] In this embodiment, corresponding sentiment analysis models are set for news media and social media to perform sentiment analysis and emotion classification on the corresponding industry preprocessed texts, and obtain the scores of news media and social media; in this embodiment, the sentiment analysis model includes the BERT large model. In this embodiment, the range of the scores of news media or social media includes [-1,1]; when the score is less than 0, it means that the news media or social media evaluates the characteristic industry negatively, and the lower the score, the more negative; when the score is greater than 1, it means that the news media or social media evaluates the characteristic industry positively, and the higher the score, the more positive.
[0067] The more positive the news media and social media's evaluation of characteristic industries is, the better the performance of several characteristic stocks corresponding to the characteristic industries will be, which can provide a reference for financial practitioners when analyzing the net value of funds.
[0068] In some embodiments, the fundamental data includes industry growth rates, market shares, and financial indicators of several characteristic industries; obtaining the fundamental scores includes: obtaining the fundamental scores corresponding to each characteristic industry based on the growth rates, market shares, and financial indicators of each characteristic industry; the larger the fundamental score, the better the fundamentals of the corresponding characteristic industry.
[0069] In this embodiment, the growth rate, market share and financial indicators of each characteristic industry are input into the fundamental analysis model to obtain the corresponding fundamental score. In this embodiment, the fundamental analysis model includes the BERT large model, and the range of the fundamental score includes [0,1].
[0070] The fundamentals of a characteristic industry are important factors that affect the performance of each characteristic stock in the characteristic industry. The better the fundamentals, the better the performance of the characteristic stocks therein. In this embodiment, a fundamental score is obtained based on growth rate, market share and financial indicators to quantify the performance of the fundamentals and provide auxiliary analysis for financial practitioners.
[0071] Figure 2 Shown Figure 1 An exemplary flow chart of step S30 in FIG. Figure 2As shown, in some embodiments, when the influencing factors include market factors, scale factors, and momentum factors, obtaining the factor exposure of the target fund on the influencing factors based on the structured data specifically includes the following steps:
[0072] Step S311: based on the structured data, obtaining the rate of return of the target fund on several trading days, and the market factor, the scale factor and the momentum factor corresponding to each trading day;
[0073] Step S312: taking the rate of return as the dependent variable, taking the market factor, the scale factor and the momentum factor as the independent variables, and performing a linear regression analysis on the rate of return, the market factor, the scale factor and the momentum factor to obtain a regression result; the regression result includes a regression coefficient corresponding to each independent variable;
[0074] Step S313: taking the regression coefficient corresponding to each independent variable as the factor exposure of the corresponding influencing factor.
[0075] In one embodiment, after obtaining a plurality of analysis data corresponding to the target fund, the method further includes: constructing a data analysis model based on the plurality of analysis data.
[0076] In this embodiment, the data analysis model includes a multi-factor model; the construction process of the multi-factor model includes:
[0077] A multi-factor model is constructed based on market factors, scale factors, and momentum factors. The calculation formula is as follows:
[0078]
[0079] Among them, R f represents the first reference value of the target fund; represents the holding ratio of the i-th characteristic stock; R i is the return rate of the i-th characteristic stock; MK represents the market factor; SMB represents the size factor; MOM represents the momentum factor; β1 represents the factor exposure of the target fund to the market factor, β2 represents the factor exposure of the target fund to the size factor, and β3 represents the factor exposure of the target fund to the momentum factor.
[0080] An example of calculating fund factor exposure is as follows: (1) First, obtain the market factor (MK), size factor (SMB), momentum factor (MOM) and fund rate of return (R f ) and other data, which can be obtained from financial data suppliers (such as Wind, Tonghuashun, etc.).
[0081] Assume that the collected data is as follows
[0082] date <![CDATA[(R f )]]> (MK) (SMB) (MOM) 2024-06-01 0.01 0.008 0.012 0.020 2024-06-02 0.015 0.010 0.010 0.018 2024-06-03 0.012 0.007 0.011 0.019
[0083] (2) Using the multivariate linear regression model, we set the fund rate of return (R f ) is the dependent variable, market return (MK), size factor (SMB), and momentum factor (MOM) are the independent variables, and the least squares method (OLS) is used for regression analysis to estimate the regression coefficients.
[0084] (3) Assume that the statsmodels library in Python is used for regression analysis. The specific process is as follows: construct a database with historical data, define independent variables and dependent variables, add a constant term, regress the independent variables and dependent variables through the regression model, and obtain the regression results.
[0085] (4) From the regression results (coef usually represents the coefficient of the linear model), we can get the exposure of each factor The values are as follows: Exposure to the market factor (MK) Exposure to size factor (SMB) Exposure to the Momentum Factor (MOM)
[0086] For example, the factor exposure and factor data of fund (f) are as follows: i =0.02, MK=0.01, SMB=0.02, MOM=0.025, β1=0.12, β2=0.08, β3=0.1.
[0087] Based on the above factor exposure and factor data, the first reference value of the target fund can be obtained.
[0088] In this embodiment, the greater the factor exposure corresponding to the impact factor, the greater the impact of the impact factor on the fund; financial practitioners should focus on referring to it when conducting analysis; the smaller the factor exposure, the smaller the impact of the impact factor on the fund, and financial practitioners can refer to it appropriately when conducting analysis.
[0089] The technical solution provided in this embodiment has at least the following beneficial effects:
[0090] (1) This application obtains structured data of several characteristic stocks held by the target fund, while ensuring the representativeness of the data, reducing the amount of data and improving data processing efficiency;
[0091] (2) This application constructs a search formula through the structured data of several characteristic stocks, and searches in multiple data sources to obtain the public opinion data, fundamental data and influencing factors of each characteristic industry corresponding to the target fund; while increasing the richness of data sources, the data obtained by retrieval is more accurate and targeted;
[0092] (3) This application obtains multiple analytical data for reference based on structured data, public opinion data, fundamental data and influencing factors; it can reduce the workload of manual processing and avoid human errors, thereby further improving the data processing efficiency of multiple data sources.
[0093] In this embodiment, based on multiple analysis data, a data analysis model is automatically constructed, and auxiliary analysis is performed through the data analysis model, further reducing the workload of financial practitioners in data processing. The parameters in the model can also be manually adjusted to observe the law of result changes, so as to facilitate more in-depth analysis.
[0094] Figure 3 FIG. 2 is a flow chart of another data processing method provided in an embodiment of the present application; Figure 3 As shown, when the plurality of analysis data also include a fund attenuation coefficient, the data processing method further includes the following steps:
[0095] Step S321, obtaining the target fund's holdings data in each reporting period, the holdings data for a number of characteristic industries, and the corresponding holding ratio of each characteristic industry;
[0096] Step S322: Based on the holdings data of the target fund in the adjacent reporting periods, determine the adjustment range and possibility of the characteristic industry in each reporting period, and use them as the dependent variable;
[0097] Step S323, obtaining the news media score and social media score of each characteristic industry in each reporting period, and using them as independent variables;
[0098] Step S324, taking the industry growth rate, market share and financial indicators of each characteristic industry in each reporting period as independent variables;
[0099] Step S325: Perform linear regression analysis on the adjustment range, adjustment possibility, news media rating, social media rating industry growth rate, market share, and financial indicators corresponding to each characteristic industry, and obtain a adjustment model for each characteristic industry;
[0100] Step S326: Calculate the fund attenuation coefficient based on the portfolio adjustment model.
[0101] In one embodiment, the fund attenuation coefficient is calculated according to the position adjustment model, including: obtaining the current position adjustment possibility and the current position adjustment range corresponding to each characteristic industry according to the position adjustment model; confirming the industry attenuation coefficient of each characteristic industry according to the current position adjustment possibility and the current position adjustment range corresponding to each characteristic industry; and obtaining the fund attenuation coefficient based on the attenuation coefficient and position ratio of each characteristic industry.
[0102] It should be noted that a linear regression analysis is performed on the adjustment range, adjustment possibility, news media score, social media score industry growth rate, market share and financial indicators corresponding to each characteristic industry, and the adjustment model of each characteristic industry is obtained. The calculation formula is as follows:
[0103] Y 可能性 =α0+α1X1+α2X2+α3X3+α4X4+α5X5+∈1;
[0104] Y 幅度 =γ0+γ1X1+γ2X2+γ3X3+γ4X4+γ5X5+∈2;
[0105] Among them, Y 可能性 Y is the possibility of rebalancing. 幅度 is the adjustment range, X1, X2, X3, X4, X5 are news media scores, social media scores, industry growth rate, market share and financial indicators respectively, α0, α1, α2, α3, α4, α5 and γ0, γ1, γ2, γ3, γ4, γ5 are regression coefficients, ∈1 and ∈2 are error terms;
[0106] The industry attenuation coefficient of each characteristic industry is determined based on the current possibility of position adjustment and the current range of position adjustment corresponding to each characteristic industry. The calculation formula is as follows:
[0107] M=1-Y 可能性 ×Y 调仓幅度 ;
[0108] Among them, M is the industry attenuation coefficient;
[0109] Based on the attenuation coefficient and holding ratio of each characteristic industry, the fund attenuation coefficient is obtained. The calculation formula is as follows:
[0110]
[0111] Among them, M f is the fund decay coefficient, M n is the attenuation coefficient of the nth characteristic industry, iw n It is the proportion of holdings in the nth characteristic industry.
[0112] It should be noted that this embodiment selects news sentiment scores, social media sentiment scores, industry growth rates, market shares and financial indicators as feature variables, selects the possibility and magnitude of position adjustment as target variables, and uses a multiple linear regression model to fit the relationship between the feature variables and the target variables. The formula of the multiple linear regression model is as follows:
[0113]
[0114] in: Indicates the predicted possibility or magnitude of position adjustment; (X1, X2, X3, X4, X5) are news sentiment score, social media sentiment score, industry growth rate, market share and financial indicators respectively; is the regression coefficient.
[0115] In this embodiment, the method for obtaining the regression coefficient of the possibility / range of fund (f) position adjustment includes:
[0116] (1) Download the fund's historical holdings report (such as monthly, quarterly, semi-annual, and annual reports) from the fund company's official website or a third-party financial data platform, parse the holdings report to extract the holdings and their proportions for each reporting period, and classify the stocks into corresponding industries. The following example only lists some of the holdings for display and calculation.
[0117]
[0118] (2) Add up the proportion of stocks held in the same industry to calculate the total proportion of industry holdings. Compare the total proportion of industry holdings in two consecutive reporting periods and calculate the change. The calculation results are as follows:
[0119]
[0120]
[0121] (3) Use the absolute value of the position change and normalize it to between 0 and 1 to quantify the possibility of position adjustment:
[0122]
[0123] Where: (P normalized ) represents the possibility of rebalancing after normalization, (|V change |) represents the absolute value of the change in position; (V max ) is the maximum value of position change in all industries and is used for normalization.
[0124] Assuming that the maximum change in all fund holdings is 5% (financial industry), the probability of position adjustment is calculated as follows:
[0125]
[0126] (4) The absolute value of the change in the rebalancing range can be directly regarded as the rebalancing range. Therefore, the rebalancing range is as follows:
[0127]
[0128] (5) Collect other historical data related to portfolio adjustments, including news sentiment scores, social media sentiment scores, industry growth rates, market share, and financial indicators. Add the possibility and range of portfolio adjustments calculated above, and you will get the following industry data set:
[0129]
[0130]
[0131] (6) Set up a multivariate linear regression model, taking news sentiment score, social media sentiment score, industry growth rate, market share and financial indicators as independent variables, and the possibility and magnitude of position adjustment as dependent variables. The formula is as follows:
[0132]
[0133] Where: (Y 可能性 / 幅度 ) is the possibility or magnitude of position adjustment; (X1, X2, X3, X4, X5) are news sentiment score, social media sentiment score, industry growth rate, market share and financial indicators respectively; is the regression coefficient; (∈) is the error term.
[0134] (7) Use the statsmodels library in Python to perform regression analysis on historical data and solve the regression coefficient; from the regression results, the regression coefficient (β) value can be obtained, the possible regression coefficient: constant term News Sentiment Score Social Media Sentiment Score Industry growth rate market share Financial indicators Regression coefficient of rebalancing: constant term News Sentiment Score Social Media Sentiment Score Industry growth rate market share
[0135] 0.015, financial indicators
[0136] The fund attenuation coefficient in this embodiment provides the fund with data from more angles for reference, thereby improving data processing capabilities.
[0137] In some embodiments, the data analysis model also includes a comprehensive processing model, which is used to adjust the first reference value of the target fund using the fund attenuation coefficient in accordance with several preset methods to obtain several second reference values.
[0138] In this embodiment, the preset method includes overall attenuation, and the calculation formula is as follows:
[0139]
[0140] Among them, R2 is the second reference value, sw i is the holding ratio of the i-th feature stock; R i is the return rate of the i-th characteristic stock; MK is the market factor; SMB is the size factor; MOM is the momentum factor; is the factor exposure of the target fund on the jth influencing factor; M f is the fund decay coefficient.
[0141] The preset method also includes local attenuation, which is calculated as follows:
[0142]
[0143] Among them, R2 is the second reference value, sw i is the holding ratio of the i-th feature stock; R i is the return rate of the i-th characteristic stock; MK is the market factor; SMB is the size factor; MOM is the momentum factor; is the factor exposure of the target fund on the jth influencing factor; M f is the fund decay coefficient.
[0144] In this embodiment, a comprehensive combing model is also provided to combine the results of the multi-factor model and the attenuation model to conduct a comprehensive analysis from multiple angles, making the analysis results more valuable for reference.
[0145] In one embodiment of the present application, a number of characteristic stocks held by a target fund are obtained, including: obtaining all stocks held by the target fund and arranging them in descending order of the proportion of holdings; taking stocks ranked before or before a preset ranking as characteristic stocks; taking stocks after the preset ranking as supplementary stocks; obtaining performance data of each supplementary stock; analyzing the performance data of each supplementary stock to obtain the influence of each supplementary stock; determining whether the influence of each supplementary stock is greater than the preset influence; if so, taking the supplementary stock as the characteristic stock.
[0146] In one embodiment, when the performance data includes a real-time price screenshot and holdings of the stock, the performance data of each supplementary stock is analyzed to obtain the influence of each supplementary stock, including: based on the real-time price screenshot, obtaining the number of price changes, the frequency of changes, the single change amplitude and the total amplitude; based on the number of price changes, the frequency of changes, the single change amplitude and the total amplitude, confirming the stock's expressiveness; based on the stock's expressiveness and holdings, confirming the stock's influence.
[0147] Figure 4 FIG. 1 is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application; Figure 4 As shown, the device comprises:
[0148] The data collection module is used to obtain a number of characteristic stocks held by the target fund and obtain structured data of each characteristic stock; the structured data includes stock name, stock code, industry, position data and rate of return;
[0149] A search module, used to construct a search formula based on the structured data, and search multiple data sources according to the search formula to obtain public opinion data and fundamental data of the characteristic industry corresponding to the target fund;
[0150] An analytical data acquisition module is used to obtain the public opinion score of the characteristic industry based on the public opinion data, obtain the fundamental score of the characteristic industry based on the fundamental data, and obtain the factor exposure corresponding to the target fund on the influencing factor based on the structured data; wherein the fundamental score of the characteristic industry, the public opinion score of the characteristic industry and the factor exposure corresponding to the target fund on the influencing factor are used as multiple analytical data of the target fund.
[0151] Figure 5 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0152] It should be noted that Figure 5 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0153] like Figure 5 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage part 1008 to the random access memory (RAM) 1003, such as executing the method described in the above embodiment. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002 and the RAM 1003 are connected to each other through the bus 1604. The input / output (I / O) interface 1005 is also connected to the bus 1004.
[0154] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0155] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1009, and / or installed from a removable medium 1011. When the computer program is executed by a central processing unit (CPU) 1001, various functions defined in the system of the present application are executed.
[0156] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0157] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0158] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0159] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A data processing method, characterized in that: The method comprises: Obtaining a number of characteristic stocks held by the target fund, and obtaining structured data of each characteristic stock; the structured data includes stock name, stock code, industry, position data and rate of return; Constructing a search formula based on the structured data, and searching multiple data sources according to the search formula to obtain public opinion data and fundamental data of characteristic industries corresponding to the target fund; Obtaining the public opinion score of the characteristic industry according to the public opinion data, obtaining the fundamental score of the characteristic industry according to the fundamental data, and obtaining the factor exposure corresponding to the target fund on the influencing factor according to the structured data; Among them, the fundamental score of the characteristic industry, the public opinion score of the characteristic industry and the corresponding factor exposure of the target fund on the influencing factors are used as multiple analysis data of the target fund.
2. The method according to claim 1, characterized in that When the influencing factors include market factors, scale factors, and momentum factors, obtaining the factor exposure of the target fund on the influencing factors based on the structured data includes: Based on the structured data, the yield of the target fund on several trading days, and the market factor, the scale factor and the momentum factor corresponding to each trading day are obtained; Take the rate of return as the dependent variable, the market factor, the scale factor and the momentum factor as the independent variables, and perform linear regression analysis on the rate of return, the market factor, the scale factor and the momentum factor to obtain the regression results; the regression results include the regression coefficient corresponding to each independent variable; The regression coefficient corresponding to each independent variable is taken as the factor exposure of the corresponding influencing factor.
3. The method according to claim 1, characterized in that Obtaining the public opinion score of the characteristic industry based on the public opinion data includes: preprocessing the industry evaluation data of each characteristic industry in the preset type of media to obtain the industry preprocessed text; performing sentiment analysis on the industry preprocessed text of each characteristic industry to obtain the public opinion score of each characteristic industry in the preset type of media; When the fundamental data include industry growth rates, market shares and financial indicators of several characteristic industries, obtaining the fundamental scores of the characteristic industries based on the fundamental data includes: obtaining the fundamental scores corresponding to each characteristic industry based on the growth rate, market share and financial indicators of each characteristic industry.
4. The method according to claim 1, characterized in that: When the plurality of analysis data further include a fund decay coefficient, the method further includes: Obtain the target fund's holdings data for each reporting period, including several characteristic industries of the holdings data, and the corresponding holding ratio of each characteristic industry; Based on the holdings data of the target funds in the adjacent reporting periods, the adjustment range and possibility of the characteristic industries in each reporting period are confirmed and used as the dependent variable; Obtain the news media score and social media score of each characteristic industry in each reporting period and use them as independent variables; The industry growth rate, market share, and financial indicators of each characteristic industry in each reporting period are used as independent variables; Conduct linear regression analysis on the adjustment range, adjustment possibility, news media rating, social media rating industry growth rate, market share, and financial indicators corresponding to each characteristic industry, and obtain the adjustment model for each characteristic industry; According to the portfolio adjustment model, the fund attenuation coefficient is calculated.
5. The method according to claim 4, characterized in that According to the portfolio adjustment model, the fund attenuation coefficient is calculated, including: According to the rebalancing model, the current rebalancing possibility and current rebalancing range corresponding to each characteristic industry are obtained; Determine the industry attenuation coefficient of each characteristic industry based on the current rebalancing possibility and current rebalancing range corresponding to each characteristic industry; Based on the attenuation coefficient and holding ratio of each characteristic industry, the fund attenuation coefficient is obtained.
6. The method according to any one of claims 1 to 5, characterized in that: After obtaining a plurality of analysis data corresponding to the target fund, the method further includes: constructing a data analysis model based on the plurality of analysis data; the data analysis model includes a multi-factor model; and the construction process of the multi-factor model includes: A multi-factor model is constructed based on market factors, scale factors, and momentum factors. The calculation formula is as follows: Among them, R f Indicates the first reference value of the target fund; sw i represents the holding ratio of the i-th feature stock; R i is the return rate of the i-th characteristic stock; MK represents the market factor; SMB represents the size factor; MOM represents the momentum factor; β1 represents the factor exposure of the target fund to the market factor, β2 represents the factor exposure of the target fund to the size factor, and β3 represents the factor exposure of the target fund to the momentum factor.
7. The method according to claim 6, characterized in that The data analysis model also includes a comprehensive processing model, which is used to adjust the first reference value of the target fund using the fund attenuation coefficient in accordance with several preset methods to obtain several second reference values.
8. The method according to claim 1, characterized in that Obtain several characteristic stocks held by the target fund, including: Obtain all the stocks held by the target fund and arrange them in descending order according to the proportion of holdings; The stocks ranked by a preset number or higher are used as feature stocks; Use the stocks after the preset ranking as supplementary stocks; obtain the performance data of each supplementary stock; Analyze the performance data of each supplementary stock to obtain the influence of each supplementary stock; Determine whether the influence of each supplementary stock is greater than the preset influence; If so, the supplementary stock is used as the feature stock.
9. The method according to claim 8, characterized in that When the performance data includes a real-time price screenshot and holdings of the stock, the performance data of each supplementary stock is analyzed to obtain the influence of each supplementary stock, including: Based on real-time price screenshots, obtain the number of price changes, frequency of changes, single change range, and total range; Identify the performance of a stock based on the number of price changes, frequency of changes, magnitude of a single change, and total magnitude; Identify stocks' influence based on their performance and holdings.
10. An electronic device, characterized in that: include: processor; as well as A memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions to enable the electronic device to implement the data processing method as described in any one of claims 1 to 9.
