100% found this document useful (1 vote)
87 views96 pages

Pa - PPT Unit 4

Uploaded by

alexking9918
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
87 views96 pages

Pa - PPT Unit 4

Uploaded by

alexking9918
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 96

Noida Institute of Engineering and Technology, Greater Noida

PREDICTIVE ANALYTICS

Unit: 4

Forecasting models
Mr. Sovers Singh Bisht
Assistant Professor
B-Tech 5TH Sem DS-DEPT
ONLINE & Offline (Sec A, B) NIET

SOVERS SINGH BISHT UNIT 01 1


12/21/2024
Noida Institute of Engineering and Technology, Greater
THE CONCEPT LEARNING TASK
Noida

Mr. Sovers Singh Bisht


Dep. HOD (Data Science)
B.Tech, M.Tech
PH.D (P) in CSE ..

Area of Expertise: Data Science, Big Data Analytics


& Cloud Computing.

12/21/2024 2
THE CONCEPT LEARNING
Evaluation Scheme TASK
PROGRAM ELECTIVES BUCKET
DS
Mobility CRM-RPA
Full Stack
Management
Data Analytics Development
Python Web Mobile Application CRM Fundamentals
Development with Development
Program Django
Elective 1 Predictive Analytics
Program Design Patterns Development in Swift CRM Administration
Elective 2 Web Technologies Fundamentals
Advanced Java Development in Swift CRM Development
Programming Explorations and Data
Program Programming for Collections
Elective 3 Data Analytics
Web Development Augmented Reality and Robotics Process
Program Social Media using MEAN Stack Virtual Reality Automation (RPA)
Elective 4 Analytics
Web Development Game Programming Robotics Process
using MERN Stack Automation (RPA)
Program Natural language Implementation
Elective 5 Processing

December 21, 2024 3


THE CONCEPT LEARNING
Evaluation Scheme TASK
DATA ANALYTICS (AI/AIML)
SUBJECTS CREDITS ELECTIVE SEMESTER
Predictive Analytics 3 I 5th
II 5th
Web Technologies 3
Programming for Data III 6th
Analytics 3
IV 6th
Social Media Analytics 3
Natural language V 7th
Processing 3

December 21, 2024 4


THE CONCEPT LEARNING
Evaluation Scheme TASK

• B.Tech. (Data Analytics-DS)


• Elective- I
• 5th SEMESTER

PREDICTIVE ANALYTICS

LTP Credits
3–0–0 3

ELECTIVE BUCKET(DATA ANALYTICS/MOBILITY


MANAGEMENT/CLOUD AND BIG DATA/SMART SYSTEMS)

December 21, 2024 5


THE CONCEPT
Course LEARNING
Contents TASK
/ Syllabus
B. TECH. THIRD YEAR (ELECTIVE-I)
Course code LTP Credits
Course title PREDICTIVE ANALYTICS 300 3
Course objective:
To be able to solve complex problems that require discovering hidden patterns in the data and a deep
understanding of intricate relationships between a large number of interdependent variables tasked with
collecting, analyzing, and interpreting large amounts of data.
Pre-requisites: Basic concepts of Machine learning Algorithms
Course Contents / Syllabus
UNIT-I LINEAR REGRESSION 8 HOURS
Introduction to Predictive Analytics, Regression basics: Relationship between attributes using Covariance and
Correlation, Relationship, between multiple variables: Regression (Linear, Multivariate) in prediction, Residual
Analysis Identifying significant features, feature reduction using AIC, multi-collinearity, Non-normality and
Hetero scedasticity, Hypothesis testing of Regression Model, Confidence intervals of Slope, R-square and
goodness of fit, Influential Observations – Leverage.
UNIT-II MULTIPLE LINEAR REGRESSION 8 HOURS
Polynomial Regression, Regularization methods, Lasso, Ridge and Elastic nets, Categorical Variables in
Regression.
UNIT-III NON-LINEAR REGRESSION 8 HOURS
Logit function and interpretation, Types of error measures (ROCR), Logistic Regression in classification.

December 21, 2024 6


THE CONCEPT
Course LEARNING
Contents TASK
/ Syllabus
UNIT-IV FORECASTING MODELS 8 HOURS
Trend analysis, Cyclical and Seasonal analysis, smoothing, Moving averages, Box-Jenkins, Holt-winters,
Autocorrelation, ARIMA, Examples: Applications of Time Series in financial markets.
UNIT-V FEATURE ENGINEERING 8 HOURS
Data Science Vs. Machine Learning, Exploratory Data Analysis, Feature Encoding, Imputation Feature Scaling,
Determining correlation, Feature selection, Feature extraction.
Course outcome: After completion of this course students will be able to
CO 1 Apply specific statistical and regression analysis methods applicable to K1, K2
predictive analytics to identify new trends and patterns, uncover relationships,
create forecasts, predict likelihoods, and test predictive hypotheses.
CO 2 Learn how to select the appropriate method for predictive analysis, and how
to build effective predictive models.

CO 3 Learn how to evaluate the soundness, appropriateness and validity of their K3


models and how to interpret and report on results for a management
audience.
CO 4 Apply predictive analytics approaches on diverse business cases and K4
scenarios.
CO 5 Understand the process of formulating business objectives, data K5, K6
selection/collection, preparation and process to successfully design, build,
evaluate and implement predictive models for a various business application.

December 21, 2024 7


THE CONCEPT
External LinksLEARNING TASK
as per Syllabus
NPTEL/ Youtube/ Faculty Video Link:
Unit 1 Predictive Analytics Tutorial | Linear Regression in Python | Logistic Regression | Great Learn
ing - YouTube
Multiple Regression Analysis: Hypothesis Tests - YouTube
Mod-06 Lec-28 Goodness of Fit - YouTube
Unit 2 Multiple Linear Regression Model - YouTube
Regularization In Machine Learning | Regularization Example | Machine Learning Tutorial |
Simplilearn - YouTube
Implementing Ridge, Lasso and Elastic Net in Python from Scratch (Mathematics Explained!) -
YouTube
Unit 3 Non Linear Regression | Data Science | Econometrics - YouTube
Machine Learning Tutorial Python - 8: Logistic Regression (Binary Classification) - YouTube
Unit 4 Time Series Talk : ARIMA Model - YouTube
Holt winters Model, Easiest Times series Model. Additive multiplicative trend and seasonality
- YouTube
Time Series Analysis in Python | Time Series Forecasting | Data Science with Python |
Edureka - YouTube
Unit 5 Data Science vs Machine Learning – What’s The Difference? | Data Science Course | Edureka
- YouTube
Exploratory Data Analysis (EDA) Using Python | Python Data Analysis | Python Training |
Edureka - YouTube
Feature Selection In Machine Learning | Feature Selection Techniques With Examples |
Simplilearn - YouTube
ELECTIVE BUCKET(DATA
ANALYTICS/MOBILITY
December 21, 2024 8
MANAGEMENT/CLOUD AND BIG
THE CONCEPT
Branch wiseLEARNING TASK
Applications
• Predictive analytics is a branch of advanced analytics that makes predictions about
future outcomes using historical data combined with statistical modeling, data
mining techniques and machine learning. Companies employ predictive analytics
to find patterns in this data to identify risks and opportunities.
• Predictive analytics are used to determine customer responses or purchases, as
well as promote cross-sell opportunities. Predictive models help businesses attract,
retain and grow their most profitable customers. Improving operations. Many
companies use predictive models to forecast inventory and manage resources.
• Predictive analytics uses statistics and modeling techniques to determine future
performance.
• Industries and disciplines, such as insurance and marketing, use predictive
techniques to make important decisions.
• Predictive models help make weather forecasts, develop video games, translate
voice-to-text messages, customer service decisions, and develop investment
portfolios.
• People often confuse predictive analytics with machine learning even though the
two are different disciplines.
• Types of predictive models include decision trees, regression, and neural networks.
12/21/2024 Dr. Priyanka Chandani UNIT 01 9
THE CONCEPT LEARNING TASK
Course Objective

The objective of this course is -

To be able to solve complex problems that require discovering hidden patterns

in the data and a deep understanding of intricate relationships between a large

number of interdependent variables tasked with collecting, analyzing, and

interpreting large amounts of data.

12/21/2024 Dr. Priyanka Chandani UNIT 01 10


CONTENT
Course Outcomes

12/21/2024 Dr. Priyanka Chandani UNIT 01 11


CONTENT
Program Outcomes

Engineering Graduates will be able to Understand:


1. Engineering knowledge
2. Problem analysis
3. Design/development of solutions
4. Conduct investigations of complex
5. Modern tool usage
6. The engineer and society
7. Environment and sustainability
8. Ethics
9. Individual and team work
10. Communication
11. Project management and finance
12. Life-long learning

12/21/2024 Dr. Priyanka Chandani UNIT 01 12


CONTENT
CO-PO Mapping

PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12
CO1 2 2 1 2 1 0 0 0 0 0 0 2
CO2 2 2 3 2 1 0 0 0 0 0 0 1
CO3 2 1 2 1 2 0 0 0 0 0 0 1
CO4 2 2 1 2 2 0 0 0 0 0 0 2
CO5 3 2 2 2 2 0 0 0 0 0 0 2
Average 2.2 1.8 1.8 1.8 1.6 0 0 0 0 0 0 1.6

12/21/2024 Dr. Priyanka Chandani UNIT 01 13


CONTENT
Program Specific Outcomes (PSOs)

PSO’s
At the end of the program, the student will be able to-

PSO 1: Analyse, design and develop solutions by applying


fundamental concepts of Data Science

PSO 2: Apply technical knowledge while using modern tools and


technologies for solving complex problems.

PSO 3: Collaborate different fields of science and technology with


right attitude, to work as an individual or as a team, demonstrating
professional ethics for the well-being of society

12/21/2024 SOVERS SINGH BISHT UNIT 01 14


COs andCONTENT
PSOs Mapping

PSO 1 PSO 2 PSO 3


CO1 2 1 0
CO2 2 2 0
CO3 2 2 0
CO4 2 2 0
CO5 2 2 0
Average 2 1.8 0

12/21/2024 SOVERS SINGH BISHT UNIT 01 15


CONTENT
Program Educational Objectives (PEOs)

PEO’s
The graduates of B.Tech Data Science program will-

PEO1: Solve real time complex problems and adapt to


technological changes with the ability of lifelong learning.

PEO2: Work as data scientists ,entrepreneurs and bureaucrats for


goodwill of the society and pursue higher education.

PEO3: Exhibit professional ethics and moral values with good


leadership qualities and effective interpersonal skills

12/21/2024 SOVERS SINGH BISHT UNIT 01 16


THE CONCEPT LEARNING TASK
RESULT ANALYSIS

12/21/2024 SOVERS SINGH BISHT 17


QuestionCONTENT
Paper Template

12/21/2024 Dr. Priyanka Chandani UNIT 01 18


QuestionCONTENT
Paper Template
SECTION – A CO

1. Attempt all parts- [10×1=10]

1-a. Question- (1)


1-b. Question- (1)
1-c. Question- (1)
1-d. Question- (1)
1-e. Question- (1)
1-f. Question- (1)
1-g. Question- (1)
1-h. Question- (1)
1-i. Question- (1)
1-j. Question- (1)

2. Attempt all parts- [5×2=10] CO

2-a. Question- (2)


2-b. Question- (2)
2-c. Question- (2)
2-d. Question- (2)
2-e. Question- (2)

SECTION – B CO

3. Answer any five of the following- [5×6=30]


3-a. Question- (6)
3-b. Question- (6)
3-c. Question- (6)
3-d. Question- (6)
3-e. Question- (6)
3-f. Question- (6)
3-g. Question- (6)
SECTION – C CO

4 Answer any one of the following- [5×10=50]

4-a. Question- (10)

4-b. Question- (10)


5. Answer any one of the following-
5-a. Question- (10)

5-b. Question- (10)


6. Answer any one of the following-
6-a. Question- (10)

6-b. Question- (10)


7. Answer any one of the following-
7-a. Question- (10)

7-b. Question- (10)

8. Answer any one of the following-


8-a. Question- (10)

8-b. Question- (10)

12/21/2024 Dr. Priyanka Chandani UNIT 01 19


THE CONCEPT
PrerequisiteLEARNING
and Recap TASK

Prerequisites:
• Linux/ Windows operating system.

• Knowledge of basic descriptive statistics and machine learning.

• Java & R Studio.

• MS Office 2019 and Above.

• Programming Languages (Python)

Recap:
• Discussion about Data Science Environments.

12/21/2024 SOVERS SINGH BISHT UNIT 01 20


THE
BriefCONCEPT LEARNING
Intro of Subject TASK
with video

Predictive analytics is a form of technology that makes predictions about certain


unknowns in the future. It draws on a series of techniques to make these
determinations, including artificial intelligence (AI), data mining, machine learning,
modeling, and statistics.

For instance, data mining involves the analysis of large sets of data to detect patterns
from it. Text analysis does the same, except for large blocks of text.

Predictive models are used for all kinds of applications, including:

 Weather forecasts
 Creating video games
 Translating voice to text for mobile phone messaging
 Customer service
 Investment portfolio development
 https://www.youtube.com/watch?v=4y6fUC56KPw
 https://www.youtube.com/watch?v=JOArz7wggkQ
12/21/2024 Dr. Priyanka Chandani UNIT 01 21
CONTENT
CONTENTS

Forecasting models:

 Trend analysis
 Cyclical and Seasonal analysis smoothing
 Moving averages
 Box-Jenkins
 Holt-winters
 Autocorrelation
 ARIMA
 Examples: Applications of Time Series in financial markets.

12/21/2024 SOVERS SINGH BISHT UNIT 01 22


THE CONCEPT LEARNING TASK
Unit Objective

The objective of the Unit 4 is :


1.To provide an overview of an exciting growing field of data science.
2. To inculcate the preliminary knowledge of handling data , discuss various statistical
techniques for handling data.
3. Predictive analytics is a decision-making tool in a variety of industries.
4. Forecasting will help you to:
 Monitor emerging market trends
 Find new market opportunities
 Create data-driven business strategies
 Identify which products will be in high demand
 Develop a consumer insights strategy based on business goals
 Analyze the impact of trends in your brand and industry
 Understand the social values that matter to consumers
 Turn research findings into actionable insights
12/21/2024
Benchmark against your competitors
SOVERS SINGH BISHT UNIT 01 23
THE CONCEPT LEARNING TASK
Trend analysis

Objective:
 In this topic we learn about Trend analysis that will allows you to
predict what's going to happen, based on what's already happened.
It provides businesses with information regarding marketing and
sales performance, product development, spending, and more.
Enabling businesses to make data-driven decisions with regard to
future events.
 Recap:

 Revision of basic statistical approaches.

12/21/2024 SOVERS SINGH BISHT UNIT 01 24


THE CONCEPT LEARNING TASK
Trend analysis

• Forecasting models
• What is a forecasting model?
• Forecasting models are one of the many tools businesses use to predict
outcomes regarding sales, supply and demand, consumer behavior and
more. These models are especially beneficial in the field of sales and
marketing. There are several forecasting methods businesses use that
provide varying degrees of information. From the simple to the complex,
the appeal of using forecasting models comes from having a visual
reference of expected outcomes.
• Four common types of forecasting models
• While there are numerous ways to forecast business outcomes, there are
four main types of models or methods that companies use to predict
actions in the future. You'll have a better understanding of how
companies use these methods to enhance their business practices and
improve the customer experience with the following examples of
common forecasting models:
12/21/2024 SOVERS SINGH BISHT UNIT 01 25
THE CONCEPT LEARNING TASK
Trend analysis

•Time series model


•Econometric model
•Judgmental forecasting model
•The Delphi method

Time series model


This type of model uses historical data as the key to reliable forecasting.
You'll be able to visualize patterns of data better when you know how the
variables interact in terms of hours, weeks, months or years.
While there are several methods of completing a time series model, you can
follow these general steps in a spreadsheet to estimate outcomes using
information gleaned from recent analytical data:

12/21/2024 SOVERS SINGH BISHT UNIT 01 26


THE CONCEPT LEARNING TASK
Trend analysis

1. Have your time-based data available for use (time series and values series).
2. Input the compiled data involving time or duration in the first column.
3. Insert remaining values you want to forecast in the next column.
4. Select relevant data
5. Click the Data tab, then select Forecast Group, then choose Forecast Sheet.
6. Access the sheet, then select the line or bar graph option you want to use.
7. In the Forecast End box, determine your end date and hit Create.

• Once you've set up your forecasting model, you will then move onto interpreting it to
formulate your best estimation of the future.

Econometric model
• Those employed in the field of economics often use an econometric model to forecast
changes in supply and demand, as well as prices. These models incorporate complex data
and knowledge throughout the process of creation. Like the name infers, this type of
statistical model proves valuable when predicting future developments in the economy.
• Here is the basic structure behind this type of model:

12/21/2024 SOVERS SINGH BISHT UNIT 01 27


THE CONCEPT LEARNING TASK
Trend analysis

1. Decide what your independent and dependent variables are. Which


economic relation do you want to test? For example, you may ask "Does X
have an effect on Y?"
2. Formulate a hypothesis to test this relationship. Consider other factors
that may have an effect on "Y" and label them "Z," also known as the control
variables.
3. Gather the data set encompassing "Y," "Z" and "X."
4. Plot this data to find any anomalies or outliers.
5. Determine whether the relationship between "Y" and "X" is linear,
quadratic or something else.
6. Calculate the transformations using a mathematical method you
understand.
7. Interpret the effect that "Y" has on "X." What is the significance of "X"
about your hypothesis?
8. Add the "W" variables to this regression to further analyze your findings.
12/21/2024 SOVERS SINGH BISHT UNIT 01 28
THE CONCEPT LEARNING TASK
Trend analysis

Judgmental forecasting model


• Various forecasting models of the judgmental kind utilize subjective and
intuitive information to make predictions. For instance, there are times when
there is no data available for reference. Launching a new product or facing
unpredictable market conditions also creates situations in which judgmental
forecasting models prove beneficial.
Here are some characteristics of judgmental models:
• Takes a subjective, opinionated approach
• Assumes specific variables
• Comes with limitations
• Accuracy improves with the addition of new information
• This type of forecasting model is especially helpful in the field of research and
development. Focus groups and expert panels can provide insight that no
computerized model would have. For instance, when surveying a group of
people about what they look for in a product, companies can better assess their
direction when developing specific product features.
12/21/2024 SOVERS SINGH BISHT UNIT 01 29
THE CONCEPT LEARNING TASK
Trend analysis

• The Delphi method


• This method is commonly used to forecast trends based on the
information given by a panel of experts. This series of steps is
based on the Delphi method, which is about the Oracle of
Delphi. It assumes that a group's answers are more useful and
unbiased than answers provided by one individual. The total
number of rounds involved may differ depending on the goal of
the company or group's researchers.
• These experts answer a series of questions in continuous rounds
that ultimately lead to the "correct answer" a company is
looking for. The quality of information improves with each round
as the experts revise their previous assumptions following
additional insight from other members in the panel. The
method ends upon completion of a predetermined metric.
12/21/2024 SOVERS SINGH BISHT UNIT 01 30
THE CONCEPT LEARNING TASK
Trend analysis
• Here is a list of steps you can take to make your own judgmental forecasting model:
• 1. Select a facilitator
• Before choosing a facilitator who will manage the discussion, consider the neutrality of the
individual and the person's experiences conducting research. The head of research and
development may choose this role, for example.
• 2. Choose your experts
• When businesses research a product that is not yet on the market, they rely on a panel of
anonymous experts who can weigh in on the matter. Experts can be anyone with substantial
experience in a given topic. For example, in the instance of developing a new swim product,
a company may reach out to instructors or safety experts in the field. They may even
approach professional athletes or loyal customers who use similar products.
• 3. Define the problem
• Companies looking to solve a problem must first provide the details surrounding the
problem, as well as the significant details that can help them make an informed decision.
This ensures that everyone understands what is being asked of them. Businesses may want
to create a new monofin with features that none of their competitors have tried before.
• 4. Round one questions
• This first round of questions introduces the topic and starts the conversation. The experts
will read the information, provide anonymous feedback and submit their information back
to the facilitator.
12/21/2024 SOVERS SINGH BISHT UNIT 01 31
THE CONCEPT LEARNING TASK
Trend analysis

• 5. Round two questions


• After the facilitator has reviewed the answers provided by the panel, edited
content, filtered out irrelevant data and scanned through the content to find
common themes, the facilitator then submits new information to the panel.
Members of the panel have the chance to review the previous responses
anonymously and based on the new information, can resubmit a response to
another's statement. They again send their responses back to the facilitator.
• 6. Round three questions
• For possibly the last time, the facilitator will review the new responses and
again sort through the information presented before sending out the surveys to
the panel. However, the process may continue until a general consensus is
achieved, which can end in three or four iterations.
• 7. Take action
• Once the researchers have received sufficient information, they can move
ahead with any plans to implement their findings. This may be the start of new
product development or the start of production on an item they were unsure
about.
12/21/2024 SOVERS SINGH BISHT UNIT 01 32
THE CONCEPT LEARNING TASK
Trend analysis

• 1. Trend analysis
• What Is Trend Analysis?
• Trend analysis is a technique used in technical analysis that attempts to
predict future stock price movements based on recently observed trend
data. Trend analysis uses historical data, such as price movements and
trade volume, to forecast the long-term direction of market sentiment.
• KEY TAKEAWAYS
• • Trend analysis tries to predict a trend, such as a bull market run,
and then ride that trend until data suggests a trend reversal, such as a
bull-to-bear market.
• • Trend analysis is based on the idea that what has happened in the
past gives traders an idea of what will happen in the future.
• • Trend analysis focuses on three typical time horizons: short-;
intermediate-; and long-term.

12/21/2024 SOVERS SINGH BISHT UNIT 01 33


THE CONCEPT LEARNING TASK
Trend analysis

• Understanding Trend Analysis


• Trend analysis tries to predict a trend, such as a bull market run, and ride that trend
until data suggests a trend reversal, such as a bull-to-bear market. Trend analysis is
helpful because moving with trends, and not against them, will lead to profit for an
investor. It is based on the idea that what has happened in the past gives traders an
idea of what will happen in the future. There are three main types of trends: short-,
intermediate- and long-term.
• A trend is a general direction the market is taking during a specified period of time.
Trends can be both upward and downward, relating to bullish and bearish markets,
respectively. While there is no specified minimum amount of time required for a
direction to be considered a trend, the longer the direction is maintained, the more
notable the trend.
• Trend analysis is the process of looking at current trends in order to predict future
ones and is considered a form of comparative analysis. This can include attempting to
determine whether a current market trend, such as gains in a particular market
sector, is likely to continue, as well as whether a trend in one market area could result
in a trend in another. Though a trend analysis may involve a large amount of data,
there is no guarantee that the results will be correct.
12/21/2024 SOVERS SINGH BISHT UNIT 01 34
THE CONCEPT LEARNING TASK
Trend analysis
• In order to begin analyzing applicable data, it is necessary to first determine which market
segment will be analyzed. For instance, you could focus on a particular industry, such as the
automotive or pharmaceuticals sector, as well as a particular type of investment, such as the
bond market.
• Once the sector has been selected, it is possible to examine its general performance. This can
include how the sector was affected by internal and external forces. For example, changes in
a similar industry or the creation of a new governmental regulation would qualify as forces
impacting the market. Analysts then take this data and attempt to predict the direction the
market will take moving forward.
• Critics of trend analysis, and technical trading in general, argue that markets are efficient, and
already price in all available information. That means that history does not necessarily need
to repeat itself and that the past does not predict the future. Adherents of fundamental
analysis, for example, analyze the financial condition of companies using financial statements
and economic models to predict future prices. For these types of investors, day-to-day stock
movements follow a random walk that cannot be interpreted as patterns or trends. Critics of
trend analysis, and technical trading in general, argue that markets are efficient, and already
price in all available information. That means that history does not necessarily need to repeat
itself and that the past does not predict the future. Adherents of fundamental analysis, for
example, analyze the financial condition of companies using financial statements and
economic models to predict future prices. For these types of investors, day-to-day stock
movements follow a random walk that cannot be interpreted as patterns or trends.
12/21/2024 SOVERS SINGH BISHT UNIT 01 35
THE CONCEPT LEARNING TASK
Trend analysis

• Trend Trading Strategies


• Trend traders attempt to isolate and extract profit from trends. There are
many different trend trading strategies using a variety of technical
indicators:
• • Moving Averages: These strategies involve entering into long
positions when a short-term moving average crosses above a long-term
moving average, and entering short positions when a short-term moving
average crosses below a long-term moving average.
• • Momentum Indicators: These strategies involve entering into long
positions when a security is trending with strong momentum and exiting
long positions when a security loses momentum. Often, the relative
strength index (RSI) is used in these strategies.
• • Trendlines & Chart Patterns: These strategies involve entering long
positions when a security is trending higher and placing a stop-loss below
key trendline support levels. If the stock starts to reverse, the position is
exited for a profit.
12/21/2024 SOVERS SINGH BISHT UNIT 01 36
THE CONCEPT LEARNING TASK
Trend analysis

• Trend following is a trading system based on using trend analysis


and following the recommendation produced to determine which
investments to make. Often, the analysis is conducted via
computer analysis and modeling of relevant data and is tied to
market momentum.
• Indicators can simplify price information, as well as provide trend
trade signals or warn of reversals. They may be used on all time
frames, and have variables that can be adjusted to suit each
trader's specific preferences.
• Usually, it is advisable to combine indicator strategies or come up
with your own guidelines, so entry and exit criteria are clearly
established for trades. Each indicator can be used in more ways
than outlined. If you like an indicator, research it further, and most
importantly, test it out before using it to make live trades.
12/21/2024 SOVERS SINGH BISHT UNIT 01 37
THE CONCEPT LEARNING TASK
Trend analysis

• What Is a Trend?
• A trend is the overall direction of a market during a specified period of time. Trends can be
both upward and downward, relating to bullish and bearish markets, respectively. While
there is no specified minimum amount of time required for a direction to be considered a
trend, the longer the direction is maintained, the more notable the trend. Trends are
identified by drawing lines, known as trendlines, that connect price action making higher
highs and higher lows for an uptrend, or lower lows and lower highs for a downtrend.
• What Are Examples of Trend Trading Strategies?
• Trend trading strategies attempt to isolate and extract profit from trends by combining a
variety of technical indicators along with the financial instrument's price action. Typically,
these include moving averages, momentum indicators, and trendlines, and chart patterns.
• Moving averages strategies involve entering into long, or short, positions when the short-
term moving average crosses above, or below, a long-term moving average. Momentum
indicator strategies involve entering into positions when a security is exhibiting strong
momentum and exiting when that wanes. Trendlines and chart pattern strategies involve
entering long, or short, positions when a security is trending higher, or lower, and placing a
stop-loss below, or above, key trendline support levels to exit the trade.

12/21/2024 SOVERS SINGH BISHT UNIT 01 38


THE CONCEPT LEARNING TASK
Trend analysis

• What Are Some Criticisms of Trend Analysis?


• Critics of trend analysis, and technical trading in general,
argue that markets are efficient, and already price in all
available information. That means that history does not
necessarily need to repeat itself and that the past does not
predict the future. Adherents of fundamental analysis, for
example, analyze the financial condition of companies using
financial statements and economic models to predict future
prices. For these types of investors, day-to-day stock
movements follow a random walk that cannot be interpreted
as patterns or trends.

12/21/2024 SOVERS SINGH BISHT UNIT 01 39


THE and
Cyclical CONCEPT
SeasonalLEARNING TASK
analysis smoothing

Objective:
 In this topic we learn about Structured data that is clearly defined
and searchable types of data, while unstructured data is usually
stored in its native format. Structured data is quantitative, while
unstructured data is qualitative. Structured data is often stored in
data warehouses, while unstructured data is stored in data lakes

Recap:
 Revision of basic statistical approaches.

12/21/2024 SOVERS SINGH BISHT UNIT 01 40


THE and
Cyclical CONCEPT
SeasonalLEARNING TASK
analysis smoothing

• 2. Cyclical and Seasonal analysis


• These terms get confused all the time (e.g., this question on
CrossValidated.com), and so I thought it might be helpful to try to
summarize the distinction and some of the associated models.
• Definitions
• A seasonal pattern exists when a series is influenced by seasonal
factors (e.g., the quarter of the year, the month, or day of the
week). Seasonality is always of a fixed and known period. Hence,
seasonal time series are sometimes called periodic time series.
• A cyclic pattern exists when data exhibit rises and falls that are
not of fixed period. The duration of these fluctuations is usually
of at least 2 years. Think of business cycles which usually last
several years, but where the length of the current cycle is
unknown beforehand.
12/21/2024 SOVERS SINGH BISHT UNIT 01 41
THE and
Cyclical CONCEPT
SeasonalLEARNING TASK
analysis smoothing

• Many people confuse cyclic behaviour with seasonal behaviour,


but they are really quite different. If the fluctuations are not of
fixed period then they are cyclic; if the period is unchanging
and associated with some aspect of the calendar, then the
pattern is seasonal. In general, the average length of cycles is
longer than the length of a seasonal pattern, and the
magnitude of cycles tends to be more variable than the
magnitude of seasonal patterns.

12/21/2024 SOVERS SINGH BISHT UNIT 01 42


THE and
Cyclical CONCEPT
SeasonalLEARNING TASK
analysis smoothing

12/21/2024 SOVERS SINGH BISHT UNIT 01 43


THE and
Cyclical CONCEPT
SeasonalLEARNING TASK
analysis smoothing

• parameters in order to obtain cyclicity. For an AR(2), where yt=c+ϕ1yt−1+ϕ2yt−2+εt and


εt is white noise, cyclic behaviour is observed if ϕ12+4ϕ2<0. In that case, the average
period of the cycles is2πarc cos(−ϕ1(1−ϕ2)/(4ϕ2)).For example, the lynx data can be
modelled (although not very well) withyt=1545+1.147yt−1−0.600yt−2+εt,giving an
average cyclic period of 8.97. See Jiru (2008) for derivations and further results along
these lines.
• Seasonal ARMA models
• A seasonal ARMA model requires additional seasonal terms. For example, a seasonal
ARMA(1,0)(1,0)4 for quarterly data is written as(1−ϕ1B)(1−Φ1B4)yt=εtwhere B is the
backshift operator. The quarterly seasonality is explicitly handled with the term involving
B4.
• It is possibly to have both cyclic and seasonal behaviour in an ARMA model, but long-
period cyclicity is not handled very well in the ARMA framework. Alternative (nonlinear)
models are usually better.
• Periodic ARMA models
• There is also a class of periodic ARMA models where the parameters take different
values in different seasons. For example, a periodic AR(2) for quarterly data could be
written asyt=ϕ1,syt−1+ϕ2,syt−2+εtwhere s=t mod 4 denotes the four seasons. A model
of12/21/2024
this kind could handle dataSOVERS
with SINGH
bothBISHT
cyclic andUNIT
seasonal
01 patterns more easily than
44 a
seasonal ARMA model.
THE and
Cyclical CONCEPT
SeasonalLEARNING TASK
analysis smoothing

• Smoothing Time Series


• Smoothing is usually done to help us better see patterns, trends
for example, in time series. Generally smooth out the irregular
roughness to see a clearer signal. For seasonal data, we might
smooth out the seasonality so that we can identify the trend.
Smoothing doesn’t provide us with a model, but it can be a good
first step in describing various components of the series.

• The term filter is sometimes used to describe a smoothing


procedure. For instance, if the smoothed value for a particular
time is calculated as a linear combination of observations for
surrounding times, it might be said that we’ve applied a linear
filter to the data (not the same as saying the result is a straight
line, by the way).
12/21/2024 SOVERS SINGH BISHT UNIT 01 45
THE CONCEPT LEARNING TASK
Moving averages

Objective:
 In this topic we learn about moving average is a calculation used to
analyze data points by creating a series of averages of different
subsets of the full data set. In finance, a moving average (MA) is a
stock indicator that is commonly used in technical analysis.

Recap:
 Revision of basic statistical approaches.

12/21/2024 SOVERS SINGH BISHT UNIT 01 46


THE CONCEPT LEARNING TASK
Moving averages

• 4. Moving averages
• What Is a Moving Average (MA)?
• In statistics, a moving average is a calculation used to analyze
data points by creating a series of averages of different subsets
of the full data set. In finance, a moving average (MA) is a stock
indicator that is commonly used in technical analysis. The
reason for calculating the moving average of a stock is to help
smooth out the price data by creating a constantly updated
average price.
• By calculating the moving average, the impacts of random,
short-term fluctuations on the price of a stock over a specified
time frame are mitigated.

12/21/2024 SOVERS SINGH BISHT UNIT 01 47


THE CONCEPT LEARNING TASK
Moving averages

• KEY TAKEAWAYS
• • A moving average (MA) is a stock indicator that is commonly
used in technical analysis.
• • The reason for calculating the moving average of a stock is
to help smooth out the price data over a specified period of time
by creating a constantly updated average price.
• • A simple moving average (SMA) is a calculation that takes
the arithmetic mean of a given set of prices over the specific
number of days in the past; for example, over the previous 15,
30, 100, or 200 days.
• • Exponential moving averages (EMA) is a weighted average
that gives greater importance to the price of a stock in more
recent days, making it an indicator that is more responsive to
new information.
12/21/2024 SOVERS SINGH BISHT UNIT 01 48
THE CONCEPT LEARNING TASK
Moving averages

• Moving Average
• Understanding a Moving Average (MA)
• Moving average is a simple, technical analysis tool. Moving averages are usually calculated
to identify the trend direction of a stock or to determine its support and resistance levels.
It is a trend-following—or lagging—indicator because it is based on past prices.
• The longer the time period for the moving average, the greater the lag. So, a 200-day
moving average will have a much greater degree of lag than a 20-day MA because it
contains prices for the past 200 days. The 50-day and 200-day moving average figures for
stocks are widely followed by investors and traders and are considered to be important
trading signals.
• Moving averages are a totally customizable indicator, which means that an investor can
freely choose whatever time frame they want when calculating an average. The most
common time periods used in moving averages are 15, 20, 30, 50, 100, and 200 days. The
shorter the time span used to create the average, the more sensitive it will be to price
changes. The longer the time span, the less sensitive the average will be.
• Investors may choose different time periods of varying lengths to calculate moving
averages based on their trading objectives. Shorter moving averages are typically used for
short-term trading, while longer-term moving averages are more suited for long-term
investors.

12/21/2024 SOVERS SINGH BISHT UNIT 01 49


THE CONCEPT LEARNING TASK
Moving averages

• There is no correct time frame to use when setting up your moving


averages. The best way to figure out which one works best for you is
to experiment with a number of different time periods until you find
one that fits your strategy.
• Predicting trends in the stock market is no simple process. While it is
impossible to predict the future movement of a specific stock, using
technical analysis and research can help you make better
predictions.
• A rising moving average indicates that the security is in an uptrend,
while a declining moving average indicates that it is in a downtrend.
Similarly, upward momentum is confirmed with a bullish crossover,
which occurs when a short-term moving average crosses above a
longer-term moving average. Conversely, downward momentum is
confirmed with a bearish crossover, which occurs when a short-term
moving average crosses below a longer-term moving average.1
12/21/2024 SOVERS SINGH BISHT UNIT 01 50
THE CONCEPT LEARNING TASK
Moving averages

• Exponential Moving Average (EMA)


• The exponential moving average is a type of moving average that gives more weight to
recent prices in an attempt to make it more responsive to new information. To
calculate an EMA, you must first compute the simple moving average (SMA) over a
particular time period. Next, you must calculate the multiplier for weighting the EMA
(referred to as the "smoothing factor"), which typically follows the formula:
[2/(selected time period + 1)]. So, for a 20-day moving average, the multiplier would
be [2/(20+1)]= 0.0952. Then you use the smoothing factor combined with the previous
EMA to arrive at the current value. The EMA thus gives a higher weighting to recent
prices, while the SMA assigns an equal weighting to all values.

• \begin{aligned} &EMA_t = \left [ V_t \times \left ( \frac{ s }{ 1 + d } \right ) \right ] +


EMA_y \times \left [ 1 - \left ( \frac { s }{ 1 + d} \right ) \right ] \\ &\textbf{where:}\\
&EMA_t = \text{EMA today} \\ &V_t = \text{Value today} \\ &EMA_y = \text{EMA
yesterday} \\ &s = \text{Smoothing} \\ &d = \text{Number of days} \\ \
end{aligned}EMAt=[Vt×(1+ds)]+EMAy×[1−(1+ds)]where:EMAt=EMA todayVt=Value
todayEMAy=EMA yesterdays=Smoothingd=Number of days

• Simple Moving Average (SMA) vs. Exponential Moving Average (EMA)


12/21/2024 SOVERS SINGH BISHT UNIT 01 51
THE CONCEPT LEARNING TASK
Moving averages

• The calculation for EMA puts more emphasis on the recent data points. Because of
this, EMA is considered a weighted average calculation.
• In the figure below, the number of time periods used in each average is identical–15–
but the EMA responds more quickly to the changing prices than the SMA. You can
also observe in the figure that the EMA has a higher value when the price is rising
than the SMA (and it falls faster than the SMA when the price is declining). This
responsiveness to price changes is the main reason why some traders prefer to use
the EMA over the SMA.
• Example of a Moving Average
• The moving average is calculated differently depending on the type: SMA or EMA.
Below, we look at a simple moving average (SMA) of a security with the following
closing prices over 15 days:
• • Week 1 (5 days): 20, 22, 24, 25, 23
• • Week 2 (5 days): 26, 28, 26, 29, 27
• • Week 3 (5 days): 28, 30, 27, 29, 28
• A 10-day moving average would average out the closing prices for the first 10 days as
the first data point. The next data point would drop the earliest price, add the price
on day 11 and take the average.
12/21/2024 SOVERS SINGH BISHT UNIT 01 52
THE CONCEPT LEARNING TASK
Box-Jenkins

Objective:
 In this topic we learn about the Box-Jenkins Model which can
analyze several different types of time series data for forecasting
purposes. Its methodology uses differences between data points to
determine outcomes. The methodology allows the model to identify
trends using auto regresssion, moving averages, and seasonal
differencing to generate forecasts.

Recap:
 Revision of basic statistical approaches.

12/21/2024 SOVERS SINGH BISHT UNIT 01 53


THE CONCEPT LEARNING TASK
Box-Jenkins

The Box-Jenkins Method


• Introduction
• Box - Jenkins Analysis refers to a systematic method of identifying, fitting, checking, and using
integrated autoregressive, moving average (ARIMA) time series models. The method is
appropriate for time series of medium to long length (at least 50 observations).
• In this chapter we will present an overview of the Box-Jenkins method, concentrating on the
how-to parts rather than on the theory. Most of what is presented here is summarized from
the landmark book on time series analysis written by George Box and Gwilym Jenkins (1976).
• A time series is a set of values observed sequentially through time. The series may be denoted
by X1 , X 2 , , Xt , where t refers to the time period and X refers to the value. If the X’s are
exactly determined by a mathematical
• formula, the series is said to be deterministic. If future values can be described only by their
probability distribution, the series is said to be a statistical or stochastic process.
• A special class of stochastic processes is a stationary stochastic process. A statistical process is
stationary if the probability distribution is the same for all starting values of t. This implies that
the mean and variance are constant for all values of t. A series that exhibits a simple trend is
not stationary because the values of the series depend on
• t. A stationary stochastic process is completely defined by its mean, variance, and
autocorrelation function. One of the steps in the Box - Jenkins method is to transform a non-
stationary series into a stationary one.

12/21/2024 SOVERS SINGH BISHT UNIT 01 54


THE CONCEPT LEARNING TASK
Box-Jenkins

• Autocorrelation Function
• The stationary assumption allows us to make simple statements about the
correlation between two successive values, Xt and Xt  k . This correlation is
called the autocorrelation of lag k of the series. The autocorrelation function
displays the autocorrelation on the vertical axis for successive values of k on the
horizontal axis. The following figure shows the autocorrelation function of the
sunspot data.

Since a stationary series is completely specified by its mean, variance, and


autocorrelation function, one of the major (and most subjective) tasks in Box-Jenkins
analysis is to identify an appropriate model from the sample autocorrelation function.
Although the sample autocorrelations contains random fluctuations, for moderate
sample sizes they are fairly accurate in signaling the order of the ARIMA model.
12/21/2024 SOVERS SINGH BISHT UNIT 01 55
THE CONCEPT LEARNING TASK
Holt-winters

Objective:
 In this topic we learn about the Holt-Winters method uses
exponential smoothing to encode lots of values from the past and
use them to predict “typical” values for the present and future.
Exponential smoothing refers to the use of an exponentially
weighted moving average (EWMA) to “smooth” a time series.

Recap:
 Revision of basic statistical approaches.

12/21/2024 SOVERS SINGH BISHT UNIT 01 56


THE CONCEPT LEARNING TASK
Holt-winters

• Holt-Winters’ seasonal method


• Holt (1957) and Winters (1960) extended Holt’s method to capture seasonality. The
Holt-Winters seasonal method comprises the forecast equation and three smoothing
equations — one for the level ℓtℓt, one for the trend btbt, and one for the seasonal
component stst, with corresponding smoothing parameters αα, β ∗β ∗ and γγ. We
use mm to denote the frequency of the seasonality, i.e., the number of seasons in a
year. For example, for quarterly data m=4m=4, and for monthly data m=12m=12.
• There are two variations to this method that differ in the nature of the seasonal
component. The additive method is preferred when the seasonal variations are
roughly constant through the series, while the multiplicative method is preferred
when the seasonal variations are changing proportional to the level of the series.
With the additive method, the seasonal component is expressed in absolute terms in
the scale of the observed series, and in the level equation the series is seasonally
adjusted by subtracting the seasonal component. Within each year, the seasonal
component will add up to approximately zero. With the multiplicative method, the
seasonal component is expressed in relative terms (percentages), and the series is
seasonally adjusted by dividing through by the seasonal component. Within each
year, the seasonal component will sum up to approximately mm.

12/21/2024 SOVERS SINGH BISHT UNIT 01 57


THE CONCEPT LEARNING TASK
Holt-winters

• What Is the Holt-Winters Method?


• Holt-Winters is a model of time series behavior. Forecasting always requires a model, and Holt-
Winters is a way to model three aspects of the time series: a typical value (average), a slope (trend)
over time, and a cyclical repeating pattern (seasonality).

• Time series anomaly detection is a complicated problem with plenty of practical methods. It’s easy
to get lost in all of the topics it encompasses. Learning them is certainly an issue, but implementing
them is often more complicated. A key element of anomaly detection is forecasting—taking what
you know about a time series, either based on a model or its history, and making decisions about
values that arrive later.

• You know how to do this already. Imagine someone asked you to forecast the prices for a certain
stock, or the local temperature over the next few days. You could draw out your prediction, and
chances are it’s a pretty good one. Your brain works amazingly well for problems like this, and our
challenge is to try to get computers to do the same.

• If you take an introductory course on time series, you’ll learn how to forecast by fitting a model to
some sample data, and then using the model to predict future values. In practice, especially when
monitoring systems, this approach doesn’t work well, if at all! Real systems rarely fit mathematical
models. There’s an alternative. You can do something a lot simpler with exponential smoothing.

12/21/2024 SOVERS SINGH BISHT UNIT 01 58


THE CONCEPT LEARNING TASK
Holt-winters
• Holt-Winters Triple Exponential Smoothing Formula Explained
• The Holt-Winters method uses exponential smoothing to encode lots of values from the past
and use them to predict “typical” values for the present and future. Exponential smoothing
refers to the use of an exponentially weighted moving average (EWMA) to “smooth” a time
series. If you have some time series xt, you can define a new time series st that’s a smoothed
version of xt.

• st=αxt+(1−α)st−1

• In the late 1950s, Charles Holt recognized the issue with the simple EWMA model with time
series with trend. He modified the simple exponential smoothing model to account for a linear
trend. This is known as Holt’s exponential smoothing. This model is a little more complicated. It
consists of two EWMAs: one for the smoothed values of xt, and another for its slope. The terms
level and trend are also used.

• st=αxt+(1−α)(st−1+bt−1)

• bt=β(st−st−1)+(1−β)bt−1
12/21/2024 SOVERS SINGH BISHT UNIT 01 59
THE CONCEPT LEARNING TASK
Holt-winters

• Notice how the smoothed values are much better at following


the original time series with double exponential smoothing.
This means you’ll get much better forecasts.

12/21/2024 SOVERS SINGH BISHT UNIT 01 60


THE CONCEPT LEARNING TASK
Holt-winters

• To forecast with this model, you have to make a slight adjustment. Because
there’s another term for the slope, you’ll have to consider that in the forecast.
Suppose you’re trying to forecast the value in m time steps in the future. The
formula for the m-step-ahead forecast, Ft+m, is:

• Ft+m=st+mbt

• Notice how it’s essentially the formula for a line. What if your time series
doesn’t have a linear trend, but rather some sort of seasonality? For this, you’ll
need yet another EWMA.

• Holt’s student, Peter Winters, extended his teacher’s model by introducing an


additional term to factor in seasonality. Notice how there’s another variable L,
which depends on the period of the seasonality and has to be known in
advance.
12/21/2024 SOVERS SINGH BISHT UNIT 01 61
THE CONCEPT LEARNING TASK
Holt-winters

The three aspects of the time series behavior—value, trend, and seasonality—are
expressed as three types of exponential smoothing, so Holt-Winters is called
triple exponential smoothing. The model predicts a current or future value by
computing the combined effects of these three influences. The model requires
several parameters: one for each smoothing (ɑ, β, γ), the length of a season, and
the number of periods in a season.

12/21/2024 SOVERS SINGH BISHT UNIT 01 62


THE CONCEPT LEARNING TASK
Autocorrelation

Objective:
 In this topic we learn about Autocorrelation which represents the
degree of similarity between a given time series and a lagged version
of itself over successive time intervals. Autocorrelation measures the
relationship between a variable's current value and its past values.
 Recap:

 Revision of basic statistical approaches.

12/21/2024 SOVERS SINGH BISHT UNIT 01 63


THE CONCEPT LEARNING TASK
Autocorrelation

• Autocorrelation
• What Is Autocorrelation?
• Autocorrelation is a mathematical representation of the degree of
similarity between a given time series and a lagged version of itself
over successive time intervals. It's conceptually similar to the
correlation between two different time series, but autocorrelation
uses the same time series twice: once in its original form and once
lagged one or more time periods.
• For example, if it's rainy today, the data suggests that it's more likely
to rain tomorrow than if it's clear today. When it comes to investing,
a stock might have a strong positive autocorrelation of returns,
suggesting that if it's "up" today, it's more likely to be up tomorrow,
too.
• Naturally, autocorrelation can be a useful tool for traders to utilize;
particularly for technical analysts.
12/21/2024 SOVERS SINGH BISHT UNIT 01 64
THE CONCEPT LEARNING TASK
Autocorrelation

• KEY TAKEAWAYS
• • Autocorrelation represents the degree of similarity between a given time
series and a lagged version of itself over successive time intervals.
• • Autocorrelation measures the relationship between a variable's current
value and its past values.
• • An autocorrelation of +1 represents a perfect positive correlation, while
an autocorrelation of negative 1 represents a perfect negative correlation.
• • Technical analysts can use autocorrelation to measure how much
influence past prices for a security have on its future price.
• Autocorrelation
• Understanding Autocorrelation
• Autocorrelation can also be referred to as lagged correlation or serial correlation,
as it measures the relationship between a variable's current value and its past
values.
• As a very simple example, take a look at the five percentage values in the chart
below. We are comparing them to the column on the right, which contains the
same set of values, just moved up one row.
12/21/2024 SOVERS SINGH BISHT UNIT 01 65
THE CONCEPT LEARNING TASK
Autocorrelation

Day % Gain or Loss Next Day's % Gain or Loss

Monday 10% 5%

Tuesday 5% -2%

Wednesday -2% -8%

Thursday -8% -5%

Friday -5%

When calculating autocorrelation, the result can range from -1 to +1.


An autocorrelation of +1 represents a perfect positive correlation (an increase seen in one
time series leads to a proportionate increase in the other time series).

On the other hand, an autocorrelation of -1 represents a perfect negative correlation (an


increase seen in one time series results in a proportionate decrease in the other time
series).

Autocorrelation measures linear relationships. Even if the autocorrelation is minuscule,


there can still be a nonlinear relationship between a time series and a lagged version of
itself.
12/21/2024 SOVERS SINGH BISHT UNIT 01 66
THE CONCEPT LEARNING TASK
Autocorrelation

• Testing for Autocorrelation


• The most common method of test autocorrelation is the Durbin-Watson test. Without
getting too technical, the Durbin-Watson is a statistic that detects autocorrelation from
a regression analysis.
• The Durbin-Watson always produces a test number range from 0 to 4. Values closer to 0
indicate a greater degree of positive correlation, values closer to 4 indicate a greater
degree of negative autocorrelation, while values closer to the middle suggest less
autocorrelation.
• So why is autocorrelation important in financial markets? Simple. Autocorrelation can
be applied to thoroughly analyze historical price movements, which investors can then
use to predict future price movements. Specifically, autocorrelation can be used to
determine if a momentum trading strategy makes sense.

12/21/2024 SOVERS SINGH BISHT UNIT 01 67


THE CONCEPT LEARNING TASK
Autocorrelation
• Autocorrelation in Technical Analysis
• Autocorrelation can be useful for technical analysis, That's because technical analysis is most
concerned with the trends of, and relationships between, security prices using charting techniques.
This is in contrast with fundamental analysis, which focuses instead on a company's financial health
or management.
• Technical analysts can use autocorrelation to figure out how much of an impact past prices for a
security have on its future price.
• Autocorrelation can help determine if there is a momentum factor at play with a given stock. If a
stock with a high positive autocorrelation posts two straight days of big gains, for example, it might
be reasonable to expect the stock to rise over the next two days, as well.
• Example of Autocorrelation
• Let’s assume Rain is looking to determine if a stock's returns in their portfolio exhibit
autocorrelation; that is, the stock's returns relate to its returns in previous trading sessions.
• If the returns exhibit autocorrelation, Rain could characterize it as a momentum stock because past
returns seem to influence future returns. Rain runs a regression with the prior trading session's
return as the independent variable and the current return as the dependent variable. They find that
returns one day prior have a positive autocorrelation of 0.8.
• Since 0.8 is close to +1, past returns seem to be a very good positive predictor of future returns for
this particular stock.
• Therefore, Rain can adjust their portfolio to take advantage of the autocorrelation, or momentum,
by continuing to hold their position or accumulating more shares.
12/21/2024 SOVERS SINGH BISHT UNIT 01 68
THE CONCEPT LEARNING TASK
ARIMA

Objective:
 In this topic we learn about an autoregressive integrated moving
average, or ARIMA, is a statistical analysis model that uses time
series data to either better understand the data set or to predict
future trends. A statistical model is autoregressive if it predicts
future values based on past values.
 Recap:

 Revision of basic statistical approaches.

12/21/2024 SOVERS SINGH BISHT UNIT 01 69


THE CONCEPT LEARNING TASK
ARIMA

• What Is an Autoregressive Integrated Moving Average (ARIMA)?


• An autoregressive integrated moving average, or ARIMA, is a statistical analysis
model that uses time series data to either better understand the data set or to
predict future trends.
• A statistical model is autoregressive if it predicts future values based on past values.
For example, an ARIMA model might seek to predict a stock's future prices based on
its past performance or forecast a company's earnings based on past periods.
• KEY TAKEAWAYS
• • Autoregressive integrated moving average (ARIMA) models predict future
values based on past values.
• • ARIMA makes use of lagged moving averages to smooth time series data.
• • They are widely used in technical analysis to forecast future security prices.
• • Autoregressive models implicitly assume that the future will resemble the
past.
• • Therefore, they can prove inaccurate under certain market conditions, such
as financial crises or periods of rapid technological change.

12/21/2024 SOVERS SINGH BISHT UNIT 01 70


THE CONCEPT LEARNING TASK
ARIMA

• Understanding Autoregressive Integrated Moving Average (ARIMA)


• An autoregressive integrated moving average model is a form of regression
analysis that gauges the strength of one dependent variable relative to other
changing variables. The model's goal is to predict future securities or
financial market moves by examining the differences between values in the
series instead of through actual values.
• An ARIMA model can be understood by outlining each of its components as
follows:
• • Autoregression (AR): refers to a model that shows a changing variable
that regresses on its own lagged, or prior, values.
• • Integrated (I): represents the differencing of raw observations to allow
for the time series to become stationary (i.e., data values are replaced by the
difference between the data values and the previous values).
• • Moving average (MA): incorporates the dependency between an
observation and a residual error from a moving average model applied to
lagged observations.

12/21/2024 SOVERS SINGH BISHT UNIT 01 71


THE CONCEPT LEARNING TASK
ARIMA

• ARIMA Parameters
• Each component in ARIMA functions as a parameter with a standard
notation. For ARIMA models, a standard notation would be ARIMA with p,
d, and q, where integer values substitute for the parameters to indicate the
type of ARIMA model used. The parameters can be defined as:
• • p: the number of lag observations in the model; also known as the lag
order.
• • d: the number of times that the raw observations are differenced; also
known as the degree of differencing.
• • q: the size of the moving average window; also known as the order of
the moving average.
• In a linear regression model, for example, the number and type of terms
are included. A 0 value, which can be used as a parameter, would mean that
particular component should not be used in the model. This way, the
ARIMA model can be constructed to perform the function of an ARMA
model, or even simple AR, I, or MA models.
12/21/2024 SOVERS SINGH BISHT UNIT 01 72
THE CONCEPT LEARNING TASK
ARIMA

• Because ARIMA models are complicated and work best on very large data sets,
computer algorithms and machine learning techniques are used to compute
them.
• Autoregressive Integrated Moving Average (ARIMA) and Stationarity
• In an autoregressive integrated moving average model, the data are differenced
in order to make it stationary. A model that shows stationarity is one that shows
there is constancy to the data over time. Most economic and market data show
trends, so the purpose of differencing is to remove any trends or seasonal
structures.
• Seasonality, or when data show regular and predictable patterns that repeat
over a calendar year, could negatively affect the regression model. If a trend
appears and stationarity is not evident, many of the computations throughout
the process cannot be made with great efficacy.

• A one-time shock will affect subsequent values of an ARIMA model infinitely
into the future. Therefore, the legacy of the financial crisis lives on in today’s
autoregressive models.
12/21/2024 SOVERS SINGH BISHT UNIT 01 73
THE CONCEPT LEARNING TASK
ARIMA

• Special Considerations
• ARIMA models are based on the assumption that past values have some residual effect
on current or future values. For example, an investor using an ARIMA model to
forecast stock prices would assume that new buyers and sellers of that stock are
influenced by recent market transactions when deciding how much to offer or accept
for the security.
• Although this assumption will hold under many circumstances, this is not always the
case. For example, in the years prior to the 2008 Financial Crisis, most investors were
not aware of the risks posed by the large portfolios of mortgage-backed securities
(MBS) held by many financial firms.
• During those times, an investor using an autoregressive model to predict the
performance of U.S. financial stocks would have had good reason to predict an
ongoing trend of stable or rising stock prices in that sector. However, once it became
public knowledge that many financial institutions were at risk of imminent collapse,
investors suddenly became less concerned with these stocks' recent prices and far
more concerned with their underlying risk exposure. Therefore, the market rapidly
revalued financial stocks to a much lower level, a move that would have utterly
confounded an autoregressive model.
12/21/2024 SOVERS SINGH BISHT UNIT 01 74
THE CONCEPT
Examples: Applications LEARNING
of Time TASK markets
Series in financial

Objective:
 In this topic we learn about some application areas of time series in
financial market.

Recap:
 Revision of basic statistical approaches.

12/21/2024 SOVERS SINGH BISHT UNIT 01 75


THE CONCEPT
Examples: Applications LEARNING
of Time TASK markets
Series in financial

• APPLICATION OF TIME SERIES ANALYSIS IN FINANCIAL ECONOMICS


• In this blog, I will explain to you a few applications of Time Series Analysis
in financial economics. But, before that let us understand what exactly a
time series analysis and Data Analysis
• Time Series Analysis
• A time series is actually a sequence of data points recorded at regular
intervals of time (yearly, quarterly, monthly, daily). Time series includes
two types:
• 1. Univariate — involves a single variable
• 2. Multivariate — involves two or more variables
• Let me present you with a list of examples of time series:
• Monthly or daily precipitation of a region
• Daily stock prices (opening, closing) over a period of years/days.
• Monthly bike sales over a period of 3 years
• Annual unemployment rate over a period of 10 years
12/21/2024 SOVERS SINGH BISHT UNIT 01 76
THE CONCEPT
Examples: Applications LEARNING
of Time TASK markets
Series in financial

• Forecasting Time Series Data


• The main objective of a Time Series Analysis is to develop a suitable model to describe the
pattern or trend in data with more accuracy. However, forecasting a time series data
predicts future outcomes based on the immediate past. Forecasting can be done for
closing/opening the rate of stock on a daily basis, quarterly revenues of a company, etc.,
There are various models available in the literature to forecast the time series data. Some of
them are:
• • Autoregressive Integration Moving Average (ARIMA)
• • Simple Moving Average (SMA)
• • Exponential Smoothing (SES)
• • Neural Network (NN)
• • Linear Regression Models
• • Logistic Regression
• • Support Vector Machine
• • Naive Bayes
• • Hidden Markov
• • VAR
• • Gaussian Processes
12/21/2024 SOVERS SINGH BISHT UNIT 01 77
THE CONCEPT
Examples: Applications LEARNING
of Time TASK markets
Series in financial
• Well, many complex models or techniques may be useful in certain cases to forecast time series data. They are:
• · Neural Networks Autoregression (NNAR)
• · RNN (Recurrent Neural Network)
• · Bayesian-based models
• · Generalized Autoregressive Conditional Heteroskedasticity (GARCH)

12/21/2024 SOVERS SINGH BISHT UNIT 01 78


THE CONCEPT
Examples: Applications LEARNING
of Time TASK markets
Series in financial

• Time Series Analysis


• The performance of the time series models can be interpreted based on its
error terms such as AIC, BIC, Mean Squared Error, etc. and it can be
emphasized for forecasting.
• The principle interest for every time series analysis is to split the original
series into independent components. The decomposition of time series is
much easy to forecast the individual regular patterns produced than from
the actual series. Typically, time series are further split into three main
components:
• · Trend
• · Seasonality
• · Cycle
• Applications of Time Series Forecasting:
• Time series models usually used to forecast the stock’s performance,
interest rate, weather, etc. In this post, we will look at a few situations
where time series can be useful to forecast future outcomes.
12/21/2024 SOVERS SINGH BISHT UNIT 01 79
THE CONCEPT
Daily LEARNING
Quiz TASK
 How the IQR (Interquartile Range) is used in Time Series Forecasting?
 What are some common Data Preparation Operations you would use for Time Series
Data?
 What are somWhat is the Sliding Window method for Time Series Forecasting?
 What are examples of Time-Series Data which can be Mined?
 Why does a Time Series have to be Stationary?
 What is an ARIMA model? Why might ARIMA models be considered particularly useful
for financial time series?
 Describe the steps that Box and Jenkins (1970) suggested should be involved in
constructing an ARMA model.
 ‘Given that the objective of any econometric modeling exercise is to find the model
that most closely “fits” the data, then adding more lags to an ARMA model will almost
invariably lead to a better fit. Therefore, a large model is best because it will fit the
data more
12/21/2024 closely.’ Comment on SINGH
SOVERS the validity
BISHT (or otherwise)
UNIT 01 of this statement. 80
THE CONCEPT LEARNING TASK

12/21/2024 SOVERS SINGH BISHT UNIT 01 81


THE CONCEPT LEARNING
Weekly/monthly/Unit TASK
Wise Assignment.

Assignment
1. What is meant by the term stationary, as applied to a time series model? Explain
how the notation I (0) and I (1) is related to the concept of stationarity. Give one
example of a stationary model and one of a non-stationary model.
2. What are unit root tests and why are they important?
3. What stylized features of financial data cannot be explained using linear
models? Which of these features could be modeled using an ARCH/GARCH
process?
4. How do we use machine leaning models for univariate time series data? (other
than AR and MA terms)?
5. Explain Box-Jenkins in detail?
6. What do you understand by autocorrelation? How is it useful?
7. Explain the concept of smoothing time series in detail?
8. List all applications of time series in financial markets?
9. Can Non-Sequential Deep Learning Models outperform Sequential Models in
Time-Series Forecasting?
10. Compare some Forecasting Techniques for Stationary and Non-stationary Time-
Series?
12/21/2024 SOVERS SINGH BISHT UNIT 01 82
Faculty VideoTHE
Links, You tube &LEARNING
CONCEPT NPTEL VideoTASK
Links and Online
Courses Details

You Tube video

(1) Predictive Analytics Tutorial | Linear Regression in Python | Logi


stic Regression | Great Learning - YouTube
(2) Multiple Regression Analysis: Hypothesis Tests - YouTube
(3) Mod-06 Lec-28 Goodness of Fit - YouTube

12/21/2024 SOVERS SINGH BISHT UNIT 01 83


THE CONCEPT LEARNING TASK
MCQ unit wise/weekly

1) Smoothing parameter close to one gives more weight or influence to recent


observations over the forecast.
A) TRUE
B) FALSE

2) Sum of weights in exponential smoothing is _____.


A) <1
B) 1
C) >1
D) None of the above

3) The last period’s forecast was 70 and demand was 60. What is the simple exponential
smoothing forecast with alpha of 0.4 for the next period.
A) 63.8
B) 65
C) 62
D) 66

12/21/2024 SOVERS SINGH BISHT UNIT 01 84


THE CONCEPT LEARNING TASK
MCQ unit wise/weekly

4) What does autocovariance measure?


• A) Linear dependence between multiple points on the different series observed at
different times
• B)Quadratic dependence between two points on the same series observed at
different times
• C) Linear dependence between two points on different series observed at same
time
• D) Linear dependence between two points on the same series observed at different
times

5) Which of the following is not a necessary condition for weakly stationary time series?
• A) Mean is constant and does not depend on time
• B) Autocovariance function depends on s and t only through their difference |s-t|
(where t and s are moments in time)
• C) The time series under considerations is a finite variance process
• D) Time series is Gaussian

12/21/2024 SOVERS SINGH BISHT UNIT 01 85


THE CONCEPT LEARNING TASK
MCQ unit wise/weekly
12) Which of the following is not a technique used in smoothing time series?
• A) Nearest Neighbour Regression
• B) Locally weighted scatter plot smoothing
• C) Tree based models like (CART)
• D) Smoothing Splines

13) If the demand is 100 during October 2016, 200 in November 2016, 300 in December 2016, 400 in
January 2017. What is the 3-month simple moving average for February 2017?
A) 300
B) 350
C) 400
D) Need more information

15) Suppose, you are a data scientist at Analytics Vidhya. And you observed the views on the articles
increases during the month of Jan-Mar. Whereas the views during Nov-Dec decreases.
Does the above statement represent seasonality?
A) TRUE
B) FALSE
C) Can’t Say
12/21/2024 SOVERS SINGH BISHT UNIT 01 86
THE CONCEPT
GlossaryLEARNING
Questions TASK

1) Which of the following is an example of time series problem?

1. Estimating number of hotel rooms booking in next 6 months.


2. Estimating the total sales in next 3 years of an insurance company.
3. Estimating the number of calls for the next one week.

A) Only 3
B) 1 and 2
C) 2 and 3
D) 1 and 3

2) Which of the following is not an example of a time series model?

A) Naive approach
B) Exponential smoothing
C) Moving Average
D)None of the above

12/21/2024 Dr. Priyanka Chandani UNIT 01 87


THE CONCEPT
GlossaryLEARNING
Questions TASK

3) Which of the following can’t be a component for a time series plot?

A) Seasonality
B) Trend
C) Cyclical
D) Noise
E) None of the above

4) Which of the following is relatively easier to estimate in time series modeling?

A) Seasonality
B) Cyclical
C) No difference between Seasonality and Cyclical

5) Adjacent observations in time series data (excluding white noise) are independent
and identically distributed (IID).

A) TRUE
B) FALSE
12/21/2024 Dr. Priyanka Chandani UNIT 01 88
THE CONCEPT LEARNING
Semester Paper TASK

12/21/2024 SOVERS SINGH BISHT 89


THE CONCEPT LEARNING
Semester Paper TASK

12/21/2024 SOVERS SINGH BISHT 90


THE CONCEPT LEARNING
Semester Paper TASK

12/21/2024 SOVERS SINGH BISHT 91


THE CONCEPT
Expected Questions LEARNING
for University TASK
Exam

12/21/2024 SOVERS SINGH BISHT UNIT 01 92


THE CONCEPT
Expected Questions LEARNING
for University TASK
Exam

12/21/2024 SOVERS SINGH BISHT UNIT 01 93


THE CONCEPT LEARNING TASK
References
Text books
1. Dean Abbott ,“Applied Predictive Analytics Principles and Techniques for the Professional DataAnalyst” ,
Wiley.

2. “Fundamentals of Machine Learning for Predictive Data Analytics” By John D. Kelleher,


Brian Mac Namee and Aoife D'Arcy

3. Predictive & Advanced Analytics (IBM ICE Publication)


Reference Books
1. “An Introduction to Statistical Learning: with Applications in R” by James, Witten, Hastie and
Tibshirani, Springer, 1st. Edition, 2013.

2.“R for Everyone: Advanced Analytics and Graphics” by Lander, J., Addison-Wesley Data & Analytics
Series, 1 edition, 2013.

3.Sandeep Rakshit, R for Beginners, McGraw Hill (2017).

December 21, 2024 94


THE CONCEPT LEARNING TASK
Recap

 This unit provide us fundamentals domain of Data Science and its


latest trends in industry.
 In this unit we are also benefitted with the knowledge of different
types of data and very important is the implementation of machine
learning and also through the concept model building which is used in
industry prospects.
 The main advantage of ARIMA forecasting is that it requires data on
the time series in question only. First, this feature is advantageous if
one is forecasting a large number of time series.
 Second, this avoids a problem that occurs sometimes with multivariate

12/21/2024 SOVERS SINGH BISHT UNIT 01 95


CONTENT
CONTENTS

Thank You

12/21/2024 SOVERS SINGH BISHT UNIT 01 96

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy