Ghostwriting PYTHON R stock forecast demand and technical path

Stock forecast demand and technical path
1. Data preparation
(1) Given the daily data of the stock, txt format. The format is as follows:
data list content=['open','high','low','close','vol','value']
(2) The date of adding macd and kdj (only j line) after each line of data , 2 days, weeks, months and other four-period data, the multi-period superposition of macd, kdj (only j line) is used as the input variable. Custom indicators can be added.
Macd formula:
input:p(26,20,100),s(12,5,40),m(9,2,60);
DIFF : EMA(CLOSE,S) - EMA(CLOSE,P);
DEA : EMA( DIFF,M);
MACD : 2*(DIFF-DEA), COLORSTICK
Kdj formula:
input:n(9,1,100),p1(3,2,40),p2(3,2,40);
RSV:=( CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,P1,1);
D:SMA(K,P2,1);
J: 3*K-2*D;
month, week, 2nd, day need you to look at talib, it should be ok. If not, then negotiate.
2. Build the model
Use Tensorflow, keras, lstm and other technologies to train and fit data.
(1) The training target
is good = the maximum increase in the 20th day> 30% + the increase in the end of the 20th day>
The target is bad = the maximum decline on the 20th > 20% + the end of the 20-day increase < 0.
Take the three-class method to classify all good graphics, and find the probability of good and bad (good graphics are not necessarily really good). Probability of good = number of good \ total number of this figure, probability of bad = number of bad \ total number of this figure.
The daily horizontal cycle and increase can be customized.
(2) Training data
The historical data is divided into training set, validation set and test set.
Calculate the third rate:
precision rate = true number of cases / (true number of cases + false positive number)
recall rate = true number of cases / (true number of cases + false negative number)
accuracy rate = correct number of predictions / total number of samples
3. Prediction realization
(1) Probability of preliminary decision = probability of good stocks in the real market - probability of bad stocks in the real market, and sort. (Complete this item currently, the others are follow-up).
(2) Based on the above database, deduce 5 days day by day, and obtain the average probability of 5 days.
(3) Combining the above two probabilities, the final decision probability is obtained.
(4) Integrate custom functions into a dialog box.
(5) Use statistical methods to achieve the above requirements.
http://www.6daixie.com/contents/3/1341.html

 

Our field of direction: window programming, numerical algorithm, AI, artificial intelligence, financial statistics, econometric analysis, big data, network programming, WEB programming, communication programming, game programming, multimedia linux, plug-in programming program, API, image processing, embedded/MCU database programming, console process and thread, network security, assembly language hardware Programming software design engineering standards and regulations. The ghostwriting and ghostwriting programming languages ​​or tools include but are not limited to the following:

C/C++/C# ghostwriting

Java ghostwriting

IT ghostwriting

Python ghostwriting

Tutored programming assignments

Matlab ghostwriting

Haskell ghostwriting

Processing ghostwriting

Building a Linux environment

Rust ghostwriting

Data Structure Assginment

MIPS ghostwriting

Machine Learning homework ghostwriting

Oracle/SQL/PostgreSQL/Pig database ghostwriting/doing/coaching

web development, website development, website work

ASP.NET website development

Finance Insurance Statistics Statistics, Regression, Iteration

Prolog ghostwriting

Computer Computational method

 

Because professional, so trustworthy. If necessary, please add QQ: 99515681 or email: [email protected]

WeChat: codinghelp

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325116346&siteId=291194637