python web development ppt with code and the output.pptx
PankajRajbhar14
34 views
29 slides
Sep 01, 2024
Slide 1 of 29
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
About This Presentation
Python
Size: 20.48 MB
Language: en
Added: Sep 01, 2024
Slides: 29 pages
Slide Content
Should I invest in stock market?
The history of forcasting Should I BUY TATA Ltd. Shares… Well..!! Tata’s Future is Good… This Question Remains in Every Investors Mind.
How To Be Rich In Stock Market? Forecasting Financial future : Stock price prediction A Data-Mining Approach…
Capstone-1 project group no. 117
INTRODUCTION 01 A Share Market is a Place Where Share are put up for public Trading. Stock Markets are highly volatile and generate huge amounts of Data daily. Because of its high profit margin, investing in the stock market is one of the most popular alternatives. 03
INTRODUCTION 01 A Share Market is a Place Where Share are put up for public Trading. Stock Markets are highly volatile and generate huge amounts of Data daily. 02 Because of its high profit margin, investing in the stock market is one of the most popular alternatives. 03 02
INTRODUCTION 01 A Share Market is a Place Where Share are put up for public Trading. Stock Markets are highly volatile and generate huge amounts of Data daily. 02 Because of its high profit margin, investing in the stock market is one of the most popular alternatives. 03 As the amount of trading and investment rose, people searched for methods and tools that would maximize their gains while reducing their risk.
5 REASONS WHY WE NEED IT.. 5 REASONS 01 Market Analysis Stock Price Forecasting software enables through analysis of market patterns and trends. By analyzing the data and the current situation of the industry, it helps identify emerging trends and investment opportunities 04 Decision Making Software that forecasts stock prices can help traders and investors make sound choices about purchasing by providing data on possible future market shifts aids in the development effective trading strategies. 03 Risk Management Predictive models help in assessing market risks and making informed decisions to mitigate potential losses. 02 Automation Investors and analysts save energy and labour by cutting human effort through the automation of shares prediction operations . 05 Technological Advancement Leveraging advancements in machine learning to handle large datasets and uncover hidden patterns, improving predictive capabilities . .
2 3 1 DATA COLLECTION AND PREPROCESSING SPLIT THE DATA INTO TEST SETS CREATING AND TRAINING THE MODEL This Requires collecting information from sources of income and preparing it such that it is accurate and useful. Removing errors, and adding missing details are aspects of data cleaning Using the training data, a machine learning model is selected and trained in this stage. The programme gains the ability to spot data patterns that may be utilized to forecast future stock values Next, a pair of data are created from the data: a test set and a training set. The machine learning model is trained on the training set, and its performance is determined on the test set.
5 6 4 FEATURE ENGENEERING MAKING PREDECTIONS BACKTESTING OUR MODEL The model may be used to forecast future stock prices once it has been trained. The model will forecast the related stock price by using fresh data as input . It involves creating new features or modifying existing ones to improve the performance of the model. The goal is to make the data more suitable for the algorithm to learn from. It involves testing the model on historical data to see how well it would have predicted stock prices
IMPORTING LIBRARIES Pandas: Provides data manipulation and analysis tools, including DataFrames for handling tabular data and functions for data cleaning. Matplotlib : A plotting library for creating static, animated, and interactive visualizations in Python, such as line plots and histograms. Datetime: A module for manipulating dates and times, supporting date arithmetic, time zones, and formatting. NumPy: Offers numerical computing tools, including support for large multi-dimensional arrays and matrices, along with mathematical functions. Scikit-learn: A massive machine learning library providing tools for data mining, including classification, regression, clustering, and dimensionality reduction
DATA COLLECTION AND PREPROCESSING
DATA COLLECTION The first step in building a prediction model is gathering the stock price data. In our project, we have used the data provider ‘Alpha Vantage’ to extract our dataset in json format because it is:- Human-Readable and Easy to Understand Lightweight and Compact Language Agnostic Integrated with web APIs Supports Nested and Complex Data Structures Compatibility with NoSQL Databases Flexibility in Data Representation Ease of Parsing and Serialization
DATA PREPROCESSING Data preprocessing is a crucial step in building a stock price prediction model. It involves preparing raw data for analysis by cleaning, transforming, and structuring it. Proper preprocessing helps improve the model's accuracy and performance Preprocessing involves cleaning the data, handling missing values, and normalizing it. It also includes creating new features that can improve model performance, such as moving averages. Steps include: Handling missing values Impute missing data Dealing with outliers Normalizing and scaling Removing duplicates Encoding categorical data Handling date and time data Ensuring data consistency
SPLIT THE DATA INTO TEST SETS
SPLIT THE DATA INTO TEST SETS Splitting data into test sets is a crucial step in building a reliable stock price prediction model. The following steps are performed- 1. Loading data- read your stock price data into a pandas dataframe . 2. Sort by date- ensuring the data is sorted by date, , this ensures that the temporal order is maintained which is crucial for time series data. 3. Splitting the data- divide the data into training and test sets where you might typically use 70-80% of the data for training and remaining 20-30% for testing, this maintains the chronological order of the data which is important for time series prediction tasks.
CREATING AND TRAINING THE MODEL
CREATING AND TRAINING THE MODEL Creating and training a stock price prediction model involves several steps, including data preprocessing, model selection, defining the architecture, compiling the model, training it on historical data, and evaluating its performance. We trained the model using Python with TensorFlow. To train the LSTM model on the training data, we specified the batch size, number of epochs, and optionally validation data. Training data in a stock price prediction model is crucial for several reasons, like- 1. Pattern Recognition 2. Model Learning 3.Generalization 4.Optimization 5.Validation and Testing 6.Improving Forecast Accuracy
FEATURE ENGINEERING
FEATURE ENGINEERING Feature engineering is a crucial step in building a robust stock price prediction model. It involves creating new features from raw data that can help the model understand patterns and make more accurate predictions . Here are some common techniques and features used in stock price prediction: 1.Technical indicators 2.. Statistical features 3.Time based features 4.Fundamental features 5.Sentiment analysis 6.External factors 7.Custom features
BACKTESTING OUR MODEL
Backtesting our model Backtesting is an essential step in evaluating the performance of a stock price prediction model. It involves testing the model on historical data to see how well it would have predicted stock prices. Here, we will build a simple stock price prediction model using TensorFlow and backtest it. For backtesting our model, we perform the following – Predict stock prices on test set Inverse transform the predictions to get them back to original scale Evaluate the model using Mean Squared Error Plot the actual vs predicted stock prices
MAKING PREDICTIONS
Making predictions We predict the stock prices on the test set and inverse transform the predictions to get them back to the original scale. We evaluate the model using MSE and plot the actual vs predicted stock prices. To predict the next days’s stock prices, we take the last ‘ window size ’ days of scaled data, reshape it for the LSTM model and and make a prediction. We then inverse transform the prediction to get it back to the original scale and print the predicted next day’s stock price.
Our Team Kailash Rahul Sanjana Sakshi Shreyanka kailash Kailash Roll No: 2312RES317
Our Team Kailash Rahul Sanjana Sakshi Shreyanka rahul Rahul Roll No: 2312RES485
Our Team Kailash Rahul Sanjana Sakshi Shreyanka Sanjana Sanjana Roll No: 2312RES575
Our Team Kailash Rahul Sanjana Sakshi Shreyanka Sakshi Sakshi Roll No: 2312RES563
Our Team Kailash Rahul Sanjana Sakshi Shreyanka shreyanka Shreyanka Roll No: 2312RES627