CN106485363A - The one B shareB in a few days quantization of upward price trend and Forecasting Methodology - Google Patents

The one B shareB in a few days quantization of upward price trend and Forecasting Methodology Download PDF

Info

Publication number
CN106485363A
CN106485363A CN201610919181.7A CN201610919181A CN106485363A CN 106485363 A CN106485363 A CN 106485363A CN 201610919181 A CN201610919181 A CN 201610919181A CN 106485363 A CN106485363 A CN 106485363A
Authority
CN
China
Prior art keywords
few days
price
stock
tendency
days
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610919181.7A
Other languages
Chinese (zh)
Inventor
李辉
王英杰
王军
赵玉涵
郑媛媛
鲍俊玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Henan University of Technology
Original Assignee
Henan University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Henan University of Technology filed Critical Henan University of Technology
Priority to CN201610919181.7A priority Critical patent/CN106485363A/en
Publication of CN106485363A publication Critical patent/CN106485363A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Technology Law (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention constructs a B shareB in a few days quantization of upward price trend and Forecasting Methodology.First, obtain stock history in a few days bid-ask spread, in a few days variation tendency is quantified by stock price by constructing in a few days transaction stream feature, and in a few days upward price trend feature includes, in a few days fluctuation, in a few days extreme difference, opening quotation tendency, closing quotation tendency, in a few days tendency.Then, using t 1 day, in a few days transaction stream feature inputted as forecast model, and the ups and downs that the t days stock prices compare 1 day stock price of t export as forecast model, using 1000 days in a few days transaction data set up sample set.Finally, stock price trend prediction model testing model effectiveness are trained by sample set.

Description

The one B shareB in a few days quantization of upward price trend and Forecasting Methodology
Technical field
The present invention relates to a B shareB in a few days quantization of upward price trend and Forecasting Methodology, belong to quantization investment field.
Background technology
In recent years, quantify investment and more and more occur in domestic equity, forward market.Quantify investment to refer to by quantity Change the investment way realized with computer programing transaction.In quantifying investment, statistical arbitrage is wherein important investment way. Statistical arbitrage is exactly to set up forecast model according to historical trading data, and the rule according to existing for historical transactional information is covered Profit.The basis of statistical arbitrage is historical trading data, and modal statistical arbitrage is that the yield volatility according to stock is set up in advance Survey model.The mode of this direct use time Series Modeling is excessively simple, wherein comprises Limited information, and accuracy is often less Preferable.Therefore, some conventional technical specification, listed company's financial report, economic indicators in stock market, or even public opinion can make It is characterized data for the prediction of stock.
We can be found that stock dealer during opening the set all the time not concern stock price trend, pass through Stock change in future direction is judged to stock short term variations situation.Experienced deal maker can enter according to the Short Term of stock Row dealing is made a profit.This explanation stock Short Term can reveal out some hiding informations, wherein often there is very strong regularity, because This, carry out statistical arbitrage using stock Short Term and have feasibility.By computer, data processing data is excavated Ability, can more accurately obtain the pattern that stock Short Term affects on stock future price.The problem that presently, there are is how Stock price Short Term is quantified as the data mode that can be subsequently can by computer.
The invention provides a B shareB in a few days quantization of upward price trend and Forecasting Methodology, by stock intraday price movement feelings Condition is quantified as stock in a few days trend feature, and according to stock, in a few days trend feature sets up forecast model, and stock future trend is carried out Prediction.
Content of the invention
It is an object of the invention to provide the method for a B shareB in a few days upward price trend quantization and prediction is used for improving stock The accuracy of trend prediction.
The present invention constructs a B shareB in a few days quantization of upward price trend and Forecasting Methodology.The method is by stock in a few days trend Quantified, obtained stock in a few days trend feature amount;Then, predict that next stock becomes the day of trade using in a few days trend feature amount Gesture.
Particular content includes following step:
Step 1:Obtain stock history in a few days bid-ask spread;Pretreatment is carried out to data, including Data Format Transform, data Noise eliminates, completion saves lacuna;Pen data is in a few days divided to quantify stock in a few days upward price trend using stock, the stock after quantization is in a few days Upward price trend comprises following characteristics amount:In a few days fluctuation, in a few days extreme difference, opening quotation tendency, height tendency, closing quotation tendency.
Step 2:Future stock upward price trend is predicted using SVM prediction model;In a few days is concluded the business for t-1 days Gesture feature inputs as forecast model, and the ups and downs that the t days stock prices compare the t-1 days stock prices are defeated as forecast model Go out;Using 1000 days in a few days transaction stream feature set up sample set, using ups and downs in next day of corresponding for sample stock as sample mark Sign, go up next day, sample labeling is 1;Next day drops, and sample labeling is -1.
Step 3:The sample set establishing is divided into training set, cross validation collection, test set;Training set accounts for sample set 70%, cross validation collection accounts for the 15% of sample set, and test set accounts for the 15% of sample set.Using training set, cross validation collection training prediction Model simultaneously determines model parameter;The model trained is used for test set, the effectiveness of inspection forecast model.
Step 4:The effective forecast model of checking is used for stock price trend prediction.
In step 1, stock history in a few days divides pen data can be obtained by various specialized financial data bases.To the data obtaining Carry out pretreatment, generally include form conversion, noise eliminates, the default several aspects of completion.Stock in a few days divides pen in the present invention Data in chronological sequence order inverted order arrangement, for example, has 2000 points of pen data, point pen data of sequence number the 2000th in a certain day Corresponding same day the first stroke transaction data, point pen data of sequence number the 1st corresponds to same day last transaction data.
In a few days upward price trend is quantified by stock in a few days to divide pen data using stock, and concrete grammar is:Construction stock day Interior price trend feature amount, including in a few days fluctuation, in a few days extreme difference, opening quotation tendency, height tendency, closing quotation tendency.
In a few days fluctuation is expressed as
Wherein,For stock price in the i-th transaction data, i represents the i-th transaction, and N represents in a few days common N transaction data,For in a few days dividing pen data price average,
In a few days extreme difference is expressed as
Wherein,Represent day high and same day lowest price respectively;
Opening quotation tendency is quantified as a bit, and ' 1 ' represents that opening price today is more than or equal to closing price yesterday, and ' 0 ' represents modern Day, opening price was less than closing price yesterday;
Closing quotation tendency is equally quantified as a bit, and ' 1 ' represents that today, closing price was more than or equal to opening price today, ' 0 ' table Show the little today opening price of closing price today;
Height tendency highest price and the moment character representation of lowest price appearance, in the present invention, pre-mkts is expressed as ' 0 ', The closing quotation moment is expressed as ' 1 ', and that is, in a few days the transaction moment is linearly mapped to interval [0,1];The moment that highest price occurs is expressed as , lowest price occur moment be expressed as.
Because in the present invention, stock in a few days divides pen data in chronological sequence order inverted order arrangement,,Computational methods are such as Under:
So highest price, lowest price can be passed through the information such as in a few days when,Represent, according to,,,,,In a few days stock price tendency can simply be depicted.
Stock price trend prediction is substantially classified prediction, i.e. stock price advance-decline forecasting.Using support in step 2 Vector machine(SVM)As forecast model, SVM is a kind of machine learning algorithm based on theory of statistics development, asks for classification Topic has very strong disposal ability.SVM is used for classification problem, and general consideration training set is , whereinInput for i-th,Corresponding output for i-th input.When SVM carries out two classification, find Optimal Separating Hyperplane
(1)
Wherein,,Generally nonlinear mapping, will input from lower dimensional space(N ties up)It is mapped to higher-dimension Feature space(M ties up).Positive and negative class sample is located at hyperplane both sides respectively it is achieved thereby that two classify.But, directly pass throughIt is not good mode classification that Optimal Separating Hyperplane separates two class samples, because being so not only difficult to excellent Changing also can lead to classifying quality not good because of sample data noise.Therefore it is desirable that positive and negative sample point is super far as possible from classification Plane.Theoretical according to structural risk minimization, original classification problem can be expressed as
(2)
Wherein,,For slack variable.So primal problem is described as, for convex optimization problem, minimizing, Be equivalent to the positive and negative two class hyperplane intervals of maximization.Meet conditionSample point to Optimal Separating Hyperplane Vertical vector be supporting vector,WithFor supporting vector hyperplane, positive class sample This?And away from Optimal Separating Hyperplane side, negative class sample?And Away from Optimal Separating Hyperplane side.
In the present invention, using stock, in a few days trend feature amount inputs as forecast model, advance versus decline conduct in next day Model exports(Rise and be expressed as ' 1 ', fall as representing ' -1 '), usage history data configuration sample set.
In step 3, the sample set establishing is divided into training set, cross validation collection, test set;Training set in the present invention Account for the 70% of sample set, cross validation collection accounts for sample 15%, test set accounts for sample 15%.The effect of training set is training SVM prediction mould Type;The effect of cross validation collection is to determine SVM forecast model optimized parameter, including penalty coefficientWith the ginseng in nonlinear mapping Number;Test set checks the effectiveness of forecast model.
Brief description
Fig. 1 is the stock in a few days quantization of upward price trend and Forecasting Methodology flow chart in the present invention.
Specific embodiment
Below in conjunction with accompanying drawing and content of the invention, embodiments of the present invention are described, example is used for illustrating, not Limit embodiments of the present invention, the present invention can also be implemented by other different specific embodiments.
In the present embodiment, in a few days trend quantizing process is completed by python programming for data prediction, stock;Modeling and forecasting Process is completed by Matlab programming.
As shown in figure 1, the stock in a few days quantization of upward price trend and prediction process are step S1-S4.
Step S1, stock history in a few days bid-ask spread in the present embodiment by Tushare(One free, increase income Python Money Data interface bag)Obtain, it is possible to use other finance data sampling instruments or from Relational database obtain.Right The data obtaining carries out pretreatment, and including Data Format Transform, data noise eliminates, completion saves lacuna.In a few days divided using stock Pen data quantifies stock in a few days upward price trend, and in a few days upward price trend comprises following characteristics amount to the stock after quantization:In a few days fluctuation, day Interior extreme difference, opening quotation tendency, height tendency, closing quotation tendency, write corresponding latent structure function by python and obtain.
In a few days fluctuation is expressed as
Wherein,For stock price in the i-th transaction data, i represents the i-th transaction, and N represents in a few days common N transaction data,For in a few days dividing pen data price average,
In a few days extreme difference is expressed as
Wherein,Represent day high and same day lowest price respectively;
Opening quotation tendency is quantified as a bit, and ' 1 ' represents that opening price today is more than or equal to closing price yesterday, and ' 0 ' represents modern Day, opening price was less than closing price yesterday;
Closing quotation tendency is equally quantified as a bit, and ' 1 ' represents that today, closing price was more than or equal to opening price today, ' 0 ' table Show the little today opening price of closing price today;
Height tendency highest price and the moment character representation of lowest price appearance, in the present invention, pre-mkts is expressed as ' 0 ', The closing quotation moment is expressed as ' 1 ', and that is, in a few days the transaction moment is linearly mapped to interval [0,1];The moment that highest price occurs is expressed as , lowest price occur moment be expressed as.
Because in the present embodiment, stock in a few days divides pen data in chronological sequence order inverted order arrangement, for example, a certain day of trade Pen data is divided to be 2000, the serial number 2000 of the 1st transaction data after opening quotation, the 2nd transaction data sequence number is 1999, successively Analogize, the 2000th transaction data sequence number is 1.,Computational methods are as follows:
By finding highest price, the corresponding sequence number of lowest price just can calculate,.According to,,,,,In a few days stock price tendency can simply be depicted.
Step S2:Using support vector machine(SVM)Forecast model predicts future stock upward price trend;By the t-1 days in a few days Transaction stream feature inputs as forecast model, and stock price compares the ups and downs of the t-1 days stock prices as prediction mould within the t days Type exports;Using 1000 days in a few days transaction stream feature set up sample set, using ups and downs in next day of corresponding for sample stock as sample This label, goes up next day, and sample labeling is 1;Next day drops, and sample labeling is -1.
Step S3, the sample set establishing is divided into training set, cross validation collection, test set;Train in the present embodiment Collection accounts for the 70% of sample set, and cross validation collection accounts for the 15% of sample set, and test set accounts for the 15% of sample set.The effect of training set is instruction Practice SVM forecast model;The effect of cross validation collection is to determine SVM forecast model optimized parameter, including penalty coefficientWith non-linear Parameter in mapping;Test set checks the effectiveness of forecast model.
In the present embodiment, the SVM prediction model degree of accuracy that test set predict after training and accurate Degree has respectively reached 79.68 and 75.32%, and this result illustrates confidence level in short-term trend prediction for this forecast model.Throw Money person selects the forecast model under suitable confidence level according to itself risk partiality and investment demand.
Step S4, the effective forecast model of checking is used for stock trend prediction, that is, using the t days stock in a few days trend spies Levy, predict the t+1 days stock price trend.
Step S2, S3, S4 are all completed by writing Matlab program, and wherein supporting vector machine model uses Matlab LIBSVM under version.
Above-described embodiment only principle of the illustrative present invention and its effect, not for the restriction present invention.Any ripe The personage knowing this technology all can carry out modifications and changes without prejudice under the spirit and the scope of the present invention to above-described embodiment.Cause This, those of ordinary skill in the art is complete with institute under technological thought without departing from disclosed spirit such as All equivalent modifications becoming or change, must be covered by the claim of the present invention.

Claims (2)

1. a B shareB in a few days quantization of upward price trend and Forecasting Methodology are it is characterised in that comprise the following steps:
Step 1:Obtain stock history in a few days bid-ask spread;Pretreatment is carried out to data, including Data Format Transform, data Noise eliminates, completion saves lacuna;Pen data is in a few days divided to quantify stock in a few days upward price trend using stock, the stock after quantization is in a few days Upward price trend comprises following characteristics amount:In a few days fluctuation, in a few days extreme difference, opening quotation tendency, height tendency, closing quotation tendency;
Step 2:Future stock upward price trend is predicted using SVM prediction model;By the t-1 days in a few days transaction stream special Levy as forecast model input, stock price compares the ups and downs of the t-1 days stock prices as forecast model output within the t days;Make With 1000 days in a few days transaction stream feature set up sample set, using ups and downs in next day of corresponding for sample stock as sample label, that is, Next day goes up, and sample labeling is 1;Next day drops, and sample labeling is -1;
Step 3:The sample set establishing is divided into training set, cross validation collection, test set;Training set accounts for the 70% of sample set, Cross validation collection accounts for the 15% of sample set, and test set accounts for the 15% of sample set;Using training set, cross validation collection training forecast model And determine model parameter;The model trained is used for test set, the effectiveness of inspection forecast model;
Step 4:The effective forecast model of checking is used for stock price trend prediction.
2. a B shareB according to claim 1 in a few days quantization of upward price trend and Forecasting Methodology are it is characterised in that step In 1, stock in a few days upward price trend quantization concrete grammar is:Construction stock in a few days upward price trend characteristic quantity, including in a few days fluctuation, day Interior extreme difference, opening quotation tendency, height tendency, closing quotation tendency;
In a few days fluctuation is expressed as
Wherein,For stock price in the i-th transaction data, i represents the i-th transaction, and N represents in a few days common N transaction data,For in a few days dividing pen data price average,
In a few days extreme difference is expressed as
Wherein,Represent day high and same day lowest price respectively;
Opening quotation tendency is quantified as a bit, and ' 1 ' represents that opening price today is more than or equal to closing price yesterday, and ' 0 ' represents modern Day, opening price was less than closing price yesterday;
Closing quotation tendency is equally quantified as a bit, and ' 1 ' represents that today, closing price was more than or equal to opening price today, ' 0 ' table Show the little today opening price of closing price today;
Height tendency highest price and the moment character representation of lowest price appearance, in the present invention, pre-mkts is expressed as ' 0 ', The closing quotation moment is expressed as ' 1 ', and that is, in a few days the transaction moment is linearly mapped to interval [0,1];The moment that highest price occurs is expressed as , lowest price occur moment be expressed as.
CN201610919181.7A 2016-10-21 2016-10-21 The one B shareB in a few days quantization of upward price trend and Forecasting Methodology Pending CN106485363A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610919181.7A CN106485363A (en) 2016-10-21 2016-10-21 The one B shareB in a few days quantization of upward price trend and Forecasting Methodology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610919181.7A CN106485363A (en) 2016-10-21 2016-10-21 The one B shareB in a few days quantization of upward price trend and Forecasting Methodology

Publications (1)

Publication Number Publication Date
CN106485363A true CN106485363A (en) 2017-03-08

Family

ID=58269918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610919181.7A Pending CN106485363A (en) 2016-10-21 2016-10-21 The one B shareB in a few days quantization of upward price trend and Forecasting Methodology

Country Status (1)

Country Link
CN (1) CN106485363A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108765154A (en) * 2018-05-24 2018-11-06 东莞市波动赢机器人科技有限公司 Training method, electronic equipment and the computer storage media of transaction machine people's disaggregated model
CN109408531A (en) * 2018-09-25 2019-03-01 平安科技(深圳)有限公司 The detection method and device of slow drop type data, electronic equipment, storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108765154A (en) * 2018-05-24 2018-11-06 东莞市波动赢机器人科技有限公司 Training method, electronic equipment and the computer storage media of transaction machine people's disaggregated model
CN109408531A (en) * 2018-09-25 2019-03-01 平安科技(深圳)有限公司 The detection method and device of slow drop type data, electronic equipment, storage medium
CN109408531B (en) * 2018-09-25 2023-04-18 平安科技(深圳)有限公司 Method and device for detecting slow-falling data, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
KR102044205B1 (en) Target information prediction system using big data and machine learning and method thereof
Yazdi et al. Oil project selection in Iran: a hybrid MADM approach in an uncertain environment
Ottaviano et al. SMEs in Argentina: who are the exporters?
CN110866819A (en) Automatic credit scoring card generation method based on meta-learning
CN110738564A (en) Post-loan risk assessment method and device and storage medium
CN111738504A (en) Enterprise financial index fund amount prediction method and device, equipment and storage medium
CN114048436A (en) Construction method and construction device for forecasting enterprise financial data model
CN105426441B (en) A kind of automatic preprocess method of time series
CN112541817A (en) Marketing response processing method and system for potential customers of personal consumption loan
CN104463673A (en) P2P network credit risk assessment model based on support vector machine
CN104850868A (en) Customer segmentation method based on k-means and neural network cluster
CN109063983B (en) Natural disaster damage real-time evaluation method based on social media data
CN110634060A (en) User credit risk assessment method, system, device and storage medium
CN112200659A (en) Method and device for establishing wind control model and storage medium
CN110689437A (en) Communication construction project financial risk prediction method based on random forest
CN112862182A (en) Investment prediction method and device, electronic equipment and storage medium
Mileris The impact of economic downturn on banks’ loan portfolio profitability
CN116187835A (en) Data-driven-based method and system for estimating theoretical line loss interval of transformer area
CN107742131A (en) Financial asset sorting technique and device
CN110738565A (en) Real estate finance artificial intelligence composite wind control model based on data set
CN106485363A (en) The one B shareB in a few days quantization of upward price trend and Forecasting Methodology
CN111738506A (en) Cash center cash stock usage amount prediction method and device, electronic device, and medium
Zhao et al. Forecasting short-term oil price with a generalised pattern matching model based on empirical genetic algorithm
Yang et al. Reform and competitive selection in China: An analysis of firm exits
HONG et al. Financial Decentralization, SOEs and Industrial Upgrading: An Empirical Explanation for Regional Differences of Financial Decentralization

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170308