In the original: "Bi thing" Microsoft logistic regression algorithm--Forecast stock rise and fall
Data preparation:
A set of stock history sold data (stock code: 601106 China One heavy), starting Date: 2011-01-04 to date, where variables are "open", "highest", "minimum", "close", "Total hand", "Amount", "ups and downs" and so on
UPDATEFactstockSET [Ups and Downs] =N'Rise'WHERE [gains] > 0UPDATEFactstockSET [Ups and Downs] =N'Fall'WHERE [gains] < 0UPDATEFactstockSET [Ups and Downs] =N'Flat'WHERE [gains] = 0SELECT [Ups and Downs] , COUNT(*) asCnt fromFactstockGROUP by [Ups and Downs]SELECT * fromFactstockWHERE [Ups and Downs] =N'Flat'SELECT MAX(Close),MIN(Close),AVG(Close) fromFactstockUPDATEFactstockSETSequence= CAST(REPLACE(CONVERT(CHAR(Ten),SUBSTRING([Time],1,Ten), -),'-', "') as INT)SELECT * fromFactstock
Analysis Process:
"Bi thing" Microsoft logistic regression algorithm--predicting the rise and fall of stocks