2 paragraph

(indicate the title). Provide a paragraph describing the project goals and accomplishments (8 – 10 sentences minimum). Provide a second paragraph that describes unanswered questions you still have about the topic or project. ..
senior_design_presentation_2018_v3.pptx

Unformatted Attachment Preview

Don't use plagiarized sources. Get Your Custom Essay on
2 paragraph
Just from $13/Page
Order Essay

DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Stock Market Prediction Using
Machine Learning Algorithm
Implemented With Python
Mohammed Endris
Hassan Alqahtani
Advisor : Dr Mulugeta Dugda
Project Outline
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
?
Introduction
?
Objectives
?
Significance
?
Problem Statement
?
Motivation and Contribution
?
Background
?
Methodology
?
Conclusion & Future improvement
?
References
?
Acknowledgement
?
Questions
Introduction
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
?
Stock market serve as a medium for companies to add up to their
capital by introducing their company shares to the market.
?
Stock market prediction is the act of trying to determine the future
value of the company stock or financial instrument on an exchange.
?
There are different machine learning algorithms techniques that helps
to predict the price of stock market.
Objective
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
?
The technical objective of our project is to provide the future price
of stock by accessing the historical data.
?
We will test and evaluate the model with the same test data to find
their prediction accuracy.
?
The main aim of this project is to design an ef?cient model which
will accurately predict the trend of stock market using python
programing language.
Significance
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
?
This project will help for people who are interested in inventing on
the stock market in deciding when to buy or sell a particular stock.
?
It also helps in understanding the sentiments of experienced
financial analysts and financial news data more quickly than doing
the same manually.
?
Build a model of stock market prediction for individual investors
and business owners.
Problem Statement
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
?
Predicting the Stock Market has been a goal of investors since its
existence.
?
Predicting stock price is a difficult job because stock price
influenced by many global and local issues.
?
Predicting stock market price based on the machine learning
techniques is more accurate relative to different stock predicting
models.
Motivation and Contribution
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
?
The knowledge to able to predict stock market using machine
learning algorithm is interesting, important and relevant to the ECE
community.
?
It will help for investors to predict and to understand the movement
of the stock market.
Background
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
?
Recent researches use input data from various sources and multiple forms. Some
systems use historical stock data, some of them based on financial news articles,
some of them based on expert reviews while some use a hybrid system which
takes multiple inputs to predict the market.
?
In addition, there are a lot of different stock market prediction models based on
machine learning algorithms. These models have different methods to solve the
problem.
?
But, since stock market is volatile, no prediction model has a perfect or accurate
prediction
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
?
The model implemented on python which must be able
to access a list of historical stock prices.
?
We tested and evaluated the systems with the same test
data to find their prediction accuracy.
?
We will train both the systems using 80% of historic
data and then test our model to check which systems
yields better output using the remaining 20% of historic
data.
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
? Tools needed for this project
1.
Python 2.7
2.
Spider IDE
3.
Installing necessary libraries and modules like:
•
Import quandl
•
Import numpy as np
•
Import pandas as pd
•
Import datetime
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
How we collected data?
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
The following machine learning technique has been implemented:
? Logistic Regression (LR)
How LR works:
LR shows the relationship between 2 variables and how the change in one
variable impacts the other.
? Determine the relationship between a binary categorical
dependent
variable “Up” or “Down” and multiple independent continuous variables (the
lagged percentage returns).
? Linear Discriminant Analysis (LDA):
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
The Modules used
To implement the forecaster, we used the following Python Modules
The first step is to import relevant modules and libraries. We imported the
following libraries and modules for our program:-
? NumPy
? Pandas
? Scikit- learn and
? Quandl
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
The Modules used continued:
? Datetime
? Matplotlib
? from sklearn.lda import LDA
import quandl, math
import numpy as np
import pandas as pd
from sklearn import preprocessing, cross_validation, svm
from sklearn.linear_model import LinearRegression
from sklearn.discriminant_analysis
import LinearDiscriminantAnalysis
from sklearn.discriminant_analysis
import matplotlib.pyplot as plt
from matplotlib import style
import datetime
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Getting historical data:
style.use(‘ggplot’)
df = quandl.get(“WIKI/AAPL”)
print(df.tail())
df = df[[‘Adj. Open’, ‘Adj. High’, ‘Adj. Low’, ‘Adj. Close’,
‘Adj. Volume’]]
df[‘HL_PCT’] = (df[‘Adj. High’] – df[‘Adj. Low’]) / df[‘Adj.
Close’] * 100.0
df[‘PCT_change’] = (df[‘Adj. Close’] – df[‘Adj. Open’]) /
df[‘Adj. Open’] * 100.0
df = df[[‘Adj. Close’, ‘HL_PCT’, ‘PCT_change’, ‘Adj.
Volume’]]
forecast_col = ‘Adj. Close’
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Train the system and test the accuracy of the system:
forecast_out = int(math.ceil(0.01*len(df)))
df[‘label’] = df[forecast_col].shift(-forecast_out)
X = np.array(df.drop([‘label’], 1))
X = preprocessing.scale(X)
X_lately = X[-forecast_out:]
X = X[:-forecast_out]
df.dropna(inplace=True)
y = np.array(df[‘label’])
X_train, X_test, y_train, y_test =
cross_validation.train_test_split(X, y, test_size=0.01)
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
clf = LinearRegression(n_jobs=-1)
clf.fit(X_train, y_train)
confidence = clf.score(X_test, y_test)
print(confidence)
forecast_set = clf.predict(X_lately)
forecast_out = int(10)
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
How we get the output?
df[‘Forecast’] = np.nan
last_date = df.iloc[-1].name
last_unix = last_date.timestamp()
one_day = 86400
next_unix = last_unix + one_day
for i in forecast_set:
next_date = datetime.datetime.fromtimestamp(next_unix)
next_unix += 86400
df.loc[next_date] = [np.nan for _ in range(len(df.columns)-1)]+[i]
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
df[‘Adj. Close’].plot()
df[‘Forecast’].plot()
“””fig, ax = plt.subplots()
ax.plot(a, c, ‘k–‘, label=’Model length’)
ax.plot(a, d, ‘k:’, label=’Data length’)
ax.plot(a, c + d, ‘k’, label=’Total message length’)
legend = ax.legend(loc=’upper center’, shadow=True, fontsize=’x-large’)
# Put a nice background color on the legend.
legend.get_frame().set_facecolor(‘#00FFCC’)”””
plt.legend(loc=0)
plt.xlabel(‘Date’)
plt.ylabel(‘Price’)
plt.show()
Methods
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Flow chart:
Results
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
prediction for apple
([9400 rows x 4 columns]
(‘length =’, 9400, ‘and forecast_out =’, 20)
(‘Accuracy of Linear Regression: ‘, 0.9956544710431998)
Results
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Prediction for Google stock
[3424 rows x 4 columns]
(‘length =’, 3424, ‘and forecast_out =’, 45)
(‘Accuracy of Linear Regression: ‘, 0.9756120748134297)
Results
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Amazon stock prediction:
[5248 rows x 4 columns]
(‘length =’, 5248, ‘and forecast_out =’, 45)
(‘Accuracy of Linear Regression: ‘, 0.9828854800181228)
Conclusion
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
?
We studied the use of linear regression to predict financial
movement direction.
?
We also observed that the choice of the indicator function can
dramatically improve/reduce the accuracy of the prediction system.
?
A particular Machine Learning Algorithm might be better suited to a
particular type of stock.
?
In the future, we want to develop this prediction to higher level by
using more accurate machine learning techniques like quadratic
discriminant analysis and any others.
References
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
? https://www.python.org/
? Part I – Stock Market Prediction in Python Intro -. (2015, December 26).
Retrieved April 09, 2018, from http://francescopochetti.com/stock-marketprediction-part-introduction/
? Forecasting Financial Time Series – Part I. (n.d.). Retrieved April 09, 2018,
from https://www.quantstart.com/articles/Forecasting-Financial-Time-SeriesPart-1
? Welcome to STAT 501! (n.d.). Retrieved April 09, 2018, from
https://onlinecourses.science.psu.edu/stat501/node/2
? P. (2015, September 06). Python With Spyder 12: Dictionaries. Retrieved April
09, 2018, from https://www.youtube.com/watch?v=FzzYUbSuOSU
Acknowledgement
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Dr. Mulugeta Dugda : Advisor
ECE Faculties and Colleagues
The ECE Department
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING
Questions????

Purchase answer to see full
attachment

Order a unique copy of this paper
(550 words)

Approximate price: $22

Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency

Order your essay today and save 15% with the discount code DISCOUNT15