The objective for this publication is to understand one way on analyzing stocks using Python Code.
To start learning and analyzing stocks,
- we will start off by taking a quick look at the historical stocks prices. This will be done by extracting latest stocks data from pandas web-data reader and Yahoo Finance.
- Then we will try to view the data through exploratory analysis and predictions using Linear Analysis and K Nearest Neighbor (KNN).
Raw Data: In this stage, the historical stock data is collected from the stock price and this historical data is used for the prediction of future stock prices.
Data Preprocessing: The pre-processing stage involves a) Data discretization: Part of data reduction but with particular importance, especially for numerical data b) Data transformation: Normalization. c) Data cleaning: Fill in missing values. d) Data integration: Integration of data files. After the dataset is transformed into a clean dataset, the dataset is divided into training and testing sets so as to evaluate.