TIME-SERIES ANALYSIS: FORECASTING STOCK PRICE USING MACHINE LEARNING WITH PYTHON GUI

TIME-SERIES ANALYSIS: FORECASTING STOCK PRICE USING MACHINE LEARNING WITH PYTHON GUI

Author: Vivian Siahaan

Publisher: BALIGE PUBLISHING

Published: 2023-07-02

Total Pages: 463

ISBN-13:

DOWNLOAD EBOOK

Stock trading and financial instrument markets offer significant opportunities for wealth creation. The ability to predict stock price movements has long intrigued researchers and investors alike. While some theories, like the Efficient Market Hypothesis, suggest that consistently beating the market is nearly impossible, others contest this viewpoint. Stock price prediction involves forecasting the future value of a given stock. In this project, we focus on the S&P 500 Index, which consists of 500 stocks from various sectors of the US economy and serves as a key indicator of US equities. To tackle this task, we utilize the Yahoo stock price history dataset, which contains 1825 rows and 7 columns including Date, High, Low, Open, Close, Volume, and Adj Close. To enhance our predictions, we incorporate technical indicators such as daily returns, Moving Average Convergence-Divergence (MACD), Relative Strength Index (RSI), Simple Moving Average (SMA), lower and upper bands, and standard deviation. In this book, for the forecasting task, we employ various regression algorithms including Linear Regression, Random Forest Regression, Decision Tree Regression, Support Vector Regression, Naïve Bayes Regression, K-Nearest Neighbor Regression, Adaboost Regression, Gradient Boosting Regression, Extreme Gradient Boosting Regression, Light Gradient Boosting Regression, Catboost Regression, MLP Regression, Lasso Regression, and Ridge Regression. These models aim to predict the future Adj Close price of the stock based on historical data. In addition to stock price prediction, we also delve into predicting stock daily returns using machine learning models. We utilize K-Nearest Neighbor Classifier, Random Forest Classifier, Naive Bayes Classifier, Logistic Regression Classifier, Decision Tree Classifier, Support Vector Machine Classifier, LGBM Classifier, Gradient Boosting Classifier, XGB Classifier, MLP Classifier, and Extra Trees Classifier. These models are trained to predict the direction of daily stock returns (positive or negative) based on various features and technical indicators. To assess the performance of these machine learning models, we evaluate several important metrics. Accuracy measures the overall correctness of the predictions, while recall quantifies the ability to correctly identify positive cases (upward daily returns). Precision evaluates the precision of positive predictions, and the F1 score provides a balanced measure of precision and recall. Additionally, we consider macro average, which calculates the average metric value across all classes, and weighted average, which provides a balanced representation considering class imbalances. To enhance the user experience and facilitate data exploration, we develop a graphical user interface (GUI). The GUI is built using PyQt and offers an interactive platform for users to visualize and interact with the data. It provides features such as plotting boundary decisions, visualizing feature distributions and importance, comparing predicted values with true values, displaying confusion matrices, learning curves, model performance, and scalability analysis. The GUI allows users to customize the analysis by selecting different models, time periods, or variables of interest, making it accessible and user-friendly for individuals without extensive programming knowledge. The combination of exploring the dataset, forecasting stock prices, predicting daily returns, and developing a GUI creates a comprehensive framework for analyzing and understanding stock market trends. By leveraging machine learning algorithms and evaluating performance metrics, we gain valuable insights into the accuracy and effectiveness of our predictions. The GUI further enhances the accessibility and usability of the analysis, enabling users to make data-driven decisions and explore the stock market with ease.


GOOGLE STOCK PRICE: TIME-SERIES ANALYSIS, VISUALIZATION, FORECASTING, AND PREDICTION USING MACHINE LEARNING WITH PYTHON GUI

GOOGLE STOCK PRICE: TIME-SERIES ANALYSIS, VISUALIZATION, FORECASTING, AND PREDICTION USING MACHINE LEARNING WITH PYTHON GUI

Author: Vivian Siahaan

Publisher: BALIGE PUBLISHING

Published: 2023-06-11

Total Pages: 425

ISBN-13:

DOWNLOAD EBOOK

Google, officially known as Alphabet Inc., is an American multinational technology company. It was founded in September 1998 by Larry Page and Sergey Brin while they were Ph.D. students at Stanford University. Initially, it started as a research project to develop a search engine, but it rapidly grew into one of the largest and most influential technology companies in the world. Google is primarily known for its internet-related services and products, with its search engine being its most well-known offering. It revolutionized the way people access information by providing a fast and efficient search engine that delivers highly relevant results. Over the years, Google expanded its portfolio to include a wide range of products and services, including Google Maps, Google Drive, Gmail, Google Docs, Google Photos, Google Chrome, YouTube, and many more. In addition to its internet services, Google ventured into hardware with products like the Google Pixel smartphones, Google Home smart speakers, and Google Nest smart home devices. It also developed its own operating system called Android, which has become the most widely used mobile operating system globally. Google's success can be attributed to its ability to monetize its services through online advertising. The company introduced Google AdWords, a highly successful online advertising program that enables businesses to display ads on Google's search engine and other websites through its AdSense program. Advertising contributes significantly to Google's revenue, along with other sources such as cloud services, app sales, and licensing fees. The dataset used in this project starts from 19-Aug-2004 and is updated till 11-Oct-2021. It contains 4317 rows and 7 columns. The columns in the dataset are Date, Open, High, Low, Close, Adj Close, and Volume. You can download the dataset from https://viviansiahaan.blogspot.com/2023/06/google-stock-price-time-series-analysis.html. In this project, you will involve technical indicators such as daily returns, Moving Average Convergence-Divergence (MACD), Relative Strength Index (RSI), Simple Moving Average (SMA), lower and upper bands, and standard deviation. In this book, you will learn how to perform forecasting based on regression on Adj Close price of Google stock price, you will use: Linear Regression, Random Forest regression, Decision Tree regression, Support Vector Machine regression, Naïve Bayes regression, K-Nearest Neighbor regression, Adaboost regression, Gradient Boosting regression, Extreme Gradient Boosting regression, Light Gradient Boosting regression, Catboost regression, MLP regression, Lasso regression, and Ridge regression. The machine learning models used to predict Google daily returns as target variable are K-Nearest Neighbor classifier, Random Forest classifier, Naive Bayes classifier, Logistic Regression classifier, Decision Tree classifier, Support Vector Machine classifier, LGBM classifier, Gradient Boosting classifier, XGB classifier, MLP classifier, and Extra Trees classifier. Finally, you will develop GUI to plot boundary decision, distribution of features, feature importance, predicted values versus true values, confusion matrix, learning curve, performance of the model, and scalability of the model.


Head First Python

Head First Python

Author: Paul Barry

Publisher: "O'Reilly Media, Inc."

Published: 2016-11-21

Total Pages: 624

ISBN-13: 1491919493

DOWNLOAD EBOOK

Want to learn the Python language without slogging your way through how-to manuals? With Head First Python, you’ll quickly grasp Python’s fundamentals, working with the built-in data structures and functions. Then you’ll move on to building your very own webapp, exploring database management, exception handling, and data wrangling. If you’re intrigued by what you can do with context managers, decorators, comprehensions, and generators, it’s all here. This second edition is a complete learning experience that will help you become a bonafide Python programmer in no time. Why does this book look so different? Based on the latest research in cognitive science and learning theory, Head First Pythonuses a visually rich format to engage your mind, rather than a text-heavy approach that puts you to sleep. Why waste your time struggling with new concepts? This multi-sensory learning experience is designed for the way your brain really works.


Empirical Asset Pricing

Empirical Asset Pricing

Author: Wayne Ferson

Publisher: MIT Press

Published: 2019-03-12

Total Pages: 497

ISBN-13: 0262039370

DOWNLOAD EBOOK

An introduction to the theory and methods of empirical asset pricing, integrating classical foundations with recent developments. This book offers a comprehensive advanced introduction to asset pricing, the study of models for the prices and returns of various securities. The focus is empirical, emphasizing how the models relate to the data. The book offers a uniquely integrated treatment, combining classical foundations with more recent developments in the literature and relating some of the material to applications in investment management. It covers the theory of empirical asset pricing, the main empirical methods, and a range of applied topics. The book introduces the theory of empirical asset pricing through three main paradigms: mean variance analysis, stochastic discount factors, and beta pricing models. It describes empirical methods, beginning with the generalized method of moments (GMM) and viewing other methods as special cases of GMM; offers a comprehensive review of fund performance evaluation; and presents selected applied topics, including a substantial chapter on predictability in asset markets that covers predicting the level of returns, volatility and higher moments, and predicting cross-sectional differences in returns. Other chapters cover production-based asset pricing, long-run risk models, the Campbell-Shiller approximation, the debate on covariance versus characteristics, and the relation of volatility to the cross-section of stock returns. An extensive reference section captures the current state of the field. The book is intended for use by graduate students in finance and economics; it can also serve as a reference for professionals.


Introduction to Time Series and Forecasting

Introduction to Time Series and Forecasting

Author: Peter J. Brockwell

Publisher: Springer Science & Business Media

Published: 2013-03-14

Total Pages: 429

ISBN-13: 1475725264

DOWNLOAD EBOOK

Some of the key mathematical results are stated without proof in order to make the underlying theory acccessible to a wider audience. The book assumes a knowledge only of basic calculus, matrix algebra, and elementary statistics. The emphasis is on methods and the analysis of data sets. The logic and tools of model-building for stationary and non-stationary time series are developed in detail and numerous exercises, many of which make use of the included computer package, provide the reader with ample opportunity to develop skills in this area. The core of the book covers stationary processes, ARMA and ARIMA processes, multivariate time series and state-space models, with an optional chapter on spectral analysis. Additional topics include harmonic regression, the Burg and Hannan-Rissanen algorithms, unit roots, regression with ARMA errors, structural models, the EM algorithm, generalized state-space models with applications to time series of count data, exponential smoothing, the Holt-Winters and ARAR forecasting algorithms, transfer function models and intervention analysis. Brief introducitons are also given to cointegration and to non-linear, continuous-time and long-memory models. The time series package included in the back of the book is a slightly modified version of the package ITSM, published separately as ITSM for Windows, by Springer-Verlag, 1994. It does not handle such large data sets as ITSM for Windows, but like the latter, runs on IBM-PC compatible computers under either DOS or Windows (version 3.1 or later). The programs are all menu-driven so that the reader can immediately apply the techniques in the book to time series data, with a minimal investment of time in the computational and algorithmic aspects of the analysis.


Data Science and Machine Learning

Data Science and Machine Learning

Author: Dirk P. Kroese

Publisher: CRC Press

Published: 2019-11-20

Total Pages: 538

ISBN-13: 1000730778

DOWNLOAD EBOOK

Focuses on mathematical understanding Presentation is self-contained, accessible, and comprehensive Full color throughout Extensive list of exercises and worked-out examples Many concrete algorithms with actual code


Python Machine Learning By Example

Python Machine Learning By Example

Author: Yuxi (Hayden) Liu

Publisher: Packt Publishing Ltd

Published: 2017-05-31

Total Pages: 249

ISBN-13: 178355312X

DOWNLOAD EBOOK

Take tiny steps to enter the big world of data science through this interesting guide About This Book Learn the fundamentals of machine learning and build your own intelligent applications Master the art of building your own machine learning systems with this example-based practical guide Work with important classification and regression algorithms and other machine learning techniques Who This Book Is For This book is for anyone interested in entering the data science stream with machine learning. Basic familiarity with Python is assumed. What You Will Learn Exploit the power of Python to handle data extraction, manipulation, and exploration techniques Use Python to visualize data spread across multiple dimensions and extract useful features Dive deep into the world of analytics to predict situations correctly Implement machine learning classification and regression algorithms from scratch in Python Be amazed to see the algorithms in action Evaluate the performance of a machine learning model and optimize it Solve interesting real-world problems using machine learning and Python as the journey unfolds In Detail Data science and machine learning are some of the top buzzwords in the technical world today. A resurging interest in machine learning is due to the same factors that have made data mining and Bayesian analysis more popular than ever. This book is your entry point to machine learning. This book starts with an introduction to machine learning and the Python language and shows you how to complete the setup. Moving ahead, you will learn all the important concepts such as, exploratory data analysis, data preprocessing, feature extraction, data visualization and clustering, classification, regression and model performance evaluation. With the help of various projects included, you will find it intriguing to acquire the mechanics of several important machine learning algorithms – they are no more obscure as they thought. Also, you will be guided step by step to build your own models from scratch. Toward the end, you will gather a broad picture of the machine learning ecosystem and best practices of applying machine learning techniques. Through this book, you will learn to tackle data-driven problems and implement your solutions with the powerful yet simple language, Python. Interesting and easy-to-follow examples, to name some, news topic classification, spam email detection, online ad click-through prediction, stock prices forecast, will keep you glued till you reach your goal. Style and approach This book is an enticing journey that starts from the very basics and gradually picks up pace as the story unfolds. Each concept is first succinctly defined in the larger context of things, followed by a detailed explanation of their application. Every concept is explained with the help of a project that solves a real-world problem, and involves hands-on work—giving you a deep insight into the world of machine learning. With simple yet rich language—Python—you will understand and be able to implement the examples with ease.


Machine Learning in Action

Machine Learning in Action

Author: Peter Harrington

Publisher: Simon and Schuster

Published: 2012-04-03

Total Pages: 558

ISBN-13: 1638352453

DOWNLOAD EBOOK

Summary Machine Learning in Action is unique book that blends the foundational theories of machine learning with the practical realities of building tools for everyday data analysis. You'll use the flexible Python programming language to build programs that implement algorithms for data classification, forecasting, recommendations, and higher-level features like summarization and simplification. About the Book A machine is said to learn when its performance improves with experience. Learning requires algorithms and programs that capture data and ferret out the interestingor useful patterns. Once the specialized domain of analysts and mathematicians, machine learning is becoming a skill needed by many. Machine Learning in Action is a clearly written tutorial for developers. It avoids academic language and takes you straight to the techniques you'll use in your day-to-day work. Many (Python) examples present the core algorithms of statistical data processing, data analysis, and data visualization in code you can reuse. You'll understand the concepts and how they fit in with tactical tasks like classification, forecasting, recommendations, and higher-level features like summarization and simplification. Readers need no prior experience with machine learning or statistical processing. Familiarity with Python is helpful. Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book. What's Inside A no-nonsense introduction Examples showing common ML tasks Everyday data analysis Implementing classic algorithms like Apriori and Adaboos Table of Contents PART 1 CLASSIFICATION Machine learning basics Classifying with k-Nearest Neighbors Splitting datasets one feature at a time: decision trees Classifying with probability theory: naïve Bayes Logistic regression Support vector machines Improving classification with the AdaBoost meta algorithm PART 2 FORECASTING NUMERIC VALUES WITH REGRESSION Predicting numeric values: regression Tree-based regression PART 3 UNSUPERVISED LEARNING Grouping unlabeled items using k-means clustering Association analysis with the Apriori algorithm Efficiently finding frequent itemsets with FP-growth PART 4 ADDITIONAL TOOLS Using principal component analysis to simplify data Simplifying data with the singular value decomposition Big data and MapReduce


Singular Spectrum Analysis for Time Series

Singular Spectrum Analysis for Time Series

Author: Nina Golyandina

Publisher: Springer Nature

Published: 2020-11-23

Total Pages: 156

ISBN-13: 3662624362

DOWNLOAD EBOOK

This book gives an overview of singular spectrum analysis (SSA). SSA is a technique of time series analysis and forecasting combining elements of classical time series analysis, multivariate statistics, multivariate geometry, dynamical systems and signal processing. SSA is multi-purpose and naturally combines both model-free and parametric techniques, which makes it a very special and attractive methodology for solving a wide range of problems arising in diverse areas. Rapidly increasing number of novel applications of SSA is a consequence of the new fundamental research on SSA and the recent progress in computing and software engineering which made it possible to use SSA for very complicated tasks that were unthinkable twenty years ago. In this book, the methodology of SSA is concisely but at the same time comprehensively explained by two prominent statisticians with huge experience in SSA. The book offers a valuable resource for a very wide readership, including professional statisticians, specialists in signal and image processing, as well as specialists in numerous applied disciplines interested in using statistical methods for time series analysis, forecasting, signal and image processing. The second edition of the book contains many updates and some new material including a thorough discussion on the place of SSA among other methods and new sections on multivariate and multidimensional extensions of SSA.


Microsoft Azure Essentials Azure Machine Learning

Microsoft Azure Essentials Azure Machine Learning

Author: Jeff Barnes

Publisher: Microsoft Press

Published: 2015-04-25

Total Pages: 393

ISBN-13: 073569818X

DOWNLOAD EBOOK

Microsoft Azure Essentials from Microsoft Press is a series of free ebooks designed to help you advance your technical skills with Microsoft Azure. This third ebook in the series introduces Microsoft Azure Machine Learning, a service that a developer can use to build predictive analytics models (using training datasets from a variety of data sources) and then easily deploy those models for consumption as cloud web services. The ebook presents an overview of modern data science theory and principles, the associated workflow, and then covers some of the more common machine learning algorithms in use today. It builds a variety of predictive analytics models using real world data, evaluates several different machine learning algorithms and modeling strategies, and then deploys the finished models as machine learning web services on Azure within a matter of minutes. The ebook also expands on a working Azure Machine Learning predictive model example to explore the types of client and server applications you can create to consume Azure Machine Learning web services. Watch Microsoft Press’s blog and Twitter (@MicrosoftPress) to learn about other free ebooks in the Microsoft Azure Essentials series.