Analysis of Time Series data The Next CEO of Stack Overflow2019 Community Moderator ElectionTime series prediction using ARIMA vs LSTMTime Series Analysis in RForecasting non-negative sparse time-series dataForecasting one time series with missing data with help of other time seriesWhat are the prerequisites before running Holt Winters Model?Continuously predicting eventsTime series forecasting using multiple time series as training datademand forecast for B2BForecasting energy consumption with no historical data when there is a trendAre RNN or LSTM appropriate Neural Networks approaches for multivariate time-series regression?
Unreliable Magic - Is it worth it?
Make solar eclipses exceedingly rare, but still have new moons
Can I equip Skullclamp on a creature I am sacrificing?
How to place nodes around a circle from some initial angle?
What connection does MS Office have to Netscape Navigator?
Should I tutor a student who I know has cheated on their homework?
Is there a way to save my career from absolute disaster?
In excess I'm lethal
Inappropriate reference requests from Journal reviewers
Decomposition of product of two Plucker coordinates
Is it professional to write unrelated content in an almost-empty email?
Why do professional authors make "consistency" mistakes? And how to avoid them?
Customer Requests (Sometimes) Drive Me Bonkers!
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Why do we use the plural of movies in this phrase "We went to the movies last night."?
Won the lottery - how do I keep the money?
Why didn't Khan get resurrected in the Genesis Explosion?
If the heap is zero-initialized for security, then why is the stack merely uninitialized?
Why this way of making earth uninhabitable in Interstellar?
How to invert MapIndexed on a ragged structure? How to construct a tree from rules?
Are police here, aren't itthey?
WOW air has ceased operation, can I get my tickets refunded?
Combine columns from several files into one
Where do students learn to solve polynomial equations these days?
Analysis of Time Series data
The Next CEO of Stack Overflow2019 Community Moderator ElectionTime series prediction using ARIMA vs LSTMTime Series Analysis in RForecasting non-negative sparse time-series dataForecasting one time series with missing data with help of other time seriesWhat are the prerequisites before running Holt Winters Model?Continuously predicting eventsTime series forecasting using multiple time series as training datademand forecast for B2BForecasting energy consumption with no historical data when there is a trendAre RNN or LSTM appropriate Neural Networks approaches for multivariate time-series regression?
$begingroup$
The below graph is a scatterplot of daily stock price. My aim is to predict future stock price of the company.
From the scatterplot it seems that it is a multiplicative model, so I tried to "decompose" it in R. However it says that "time series has no or less than 2 periods". I also obtained a periodogram, which has only one peak at frequency close to 0.

However, my teacher told me that this time series cannot have a trend therefore to eliminate the seasonality I have to consider its period as 7 and then eliminate it choosing an appropriate model.
Can anyone tell me what could be an appropriate model along with a proper justification? Also is it true that the series cannot have a trend?
r time-series forecast data-analysis
$endgroup$
add a comment |
$begingroup$
The below graph is a scatterplot of daily stock price. My aim is to predict future stock price of the company.
From the scatterplot it seems that it is a multiplicative model, so I tried to "decompose" it in R. However it says that "time series has no or less than 2 periods". I also obtained a periodogram, which has only one peak at frequency close to 0.

However, my teacher told me that this time series cannot have a trend therefore to eliminate the seasonality I have to consider its period as 7 and then eliminate it choosing an appropriate model.
Can anyone tell me what could be an appropriate model along with a proper justification? Also is it true that the series cannot have a trend?
r time-series forecast data-analysis
$endgroup$
add a comment |
$begingroup$
The below graph is a scatterplot of daily stock price. My aim is to predict future stock price of the company.
From the scatterplot it seems that it is a multiplicative model, so I tried to "decompose" it in R. However it says that "time series has no or less than 2 periods". I also obtained a periodogram, which has only one peak at frequency close to 0.

However, my teacher told me that this time series cannot have a trend therefore to eliminate the seasonality I have to consider its period as 7 and then eliminate it choosing an appropriate model.
Can anyone tell me what could be an appropriate model along with a proper justification? Also is it true that the series cannot have a trend?
r time-series forecast data-analysis
$endgroup$
The below graph is a scatterplot of daily stock price. My aim is to predict future stock price of the company.
From the scatterplot it seems that it is a multiplicative model, so I tried to "decompose" it in R. However it says that "time series has no or less than 2 periods". I also obtained a periodogram, which has only one peak at frequency close to 0.

However, my teacher told me that this time series cannot have a trend therefore to eliminate the seasonality I have to consider its period as 7 and then eliminate it choosing an appropriate model.
Can anyone tell me what could be an appropriate model along with a proper justification? Also is it true that the series cannot have a trend?
r time-series forecast data-analysis
r time-series forecast data-analysis
asked Feb 20 at 17:06
Jor_ElJor_El
312
312
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Have you tried taking the first difference? This amounts to taking the first derivative, and is generally a good way to de-trend a time series.
However, if you want to use seasonality, fit a regression model of form
$$
X_t = X_t-k + epsilon
$$
where $k$ is the number of time periods between seasons. For example, if you have monthly observations, using $k=12$ might make sense, as this removes the annual seasonality.
$endgroup$
$begingroup$
Isn't the above formula valid if time series is additive? Also how did you know that the given time series is additive?
$endgroup$
– Jor_El
Feb 21 at 9:29
$begingroup$
The above construct only helps remove the seasonality from $k$ time periods ago. If the time series does not have seasonality, the regression model should have very small coefficients. You can also use regularization to determine if the coefficients should be non-zero.
$endgroup$
– David Atlas
Feb 21 at 12:58
$begingroup$
What model(additive or multiplicative) do you think the above time series follows?Also, how would I check whether seasonality is present or not?
$endgroup$
– Jor_El
Feb 21 at 20:53
$begingroup$
See this link for more information on how to tell if a time series is additive or multiplicative:r-bloggers.com/is-my-time-series-additive-or-multiplicative My answer above shows how to test for seasonality. Simply use the p-values of the regression model to inform if significant seasonality is present.
$endgroup$
– David Atlas
Feb 21 at 21:17
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "557"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f45902%2fanalysis-of-time-series-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Have you tried taking the first difference? This amounts to taking the first derivative, and is generally a good way to de-trend a time series.
However, if you want to use seasonality, fit a regression model of form
$$
X_t = X_t-k + epsilon
$$
where $k$ is the number of time periods between seasons. For example, if you have monthly observations, using $k=12$ might make sense, as this removes the annual seasonality.
$endgroup$
$begingroup$
Isn't the above formula valid if time series is additive? Also how did you know that the given time series is additive?
$endgroup$
– Jor_El
Feb 21 at 9:29
$begingroup$
The above construct only helps remove the seasonality from $k$ time periods ago. If the time series does not have seasonality, the regression model should have very small coefficients. You can also use regularization to determine if the coefficients should be non-zero.
$endgroup$
– David Atlas
Feb 21 at 12:58
$begingroup$
What model(additive or multiplicative) do you think the above time series follows?Also, how would I check whether seasonality is present or not?
$endgroup$
– Jor_El
Feb 21 at 20:53
$begingroup$
See this link for more information on how to tell if a time series is additive or multiplicative:r-bloggers.com/is-my-time-series-additive-or-multiplicative My answer above shows how to test for seasonality. Simply use the p-values of the regression model to inform if significant seasonality is present.
$endgroup$
– David Atlas
Feb 21 at 21:17
add a comment |
$begingroup$
Have you tried taking the first difference? This amounts to taking the first derivative, and is generally a good way to de-trend a time series.
However, if you want to use seasonality, fit a regression model of form
$$
X_t = X_t-k + epsilon
$$
where $k$ is the number of time periods between seasons. For example, if you have monthly observations, using $k=12$ might make sense, as this removes the annual seasonality.
$endgroup$
$begingroup$
Isn't the above formula valid if time series is additive? Also how did you know that the given time series is additive?
$endgroup$
– Jor_El
Feb 21 at 9:29
$begingroup$
The above construct only helps remove the seasonality from $k$ time periods ago. If the time series does not have seasonality, the regression model should have very small coefficients. You can also use regularization to determine if the coefficients should be non-zero.
$endgroup$
– David Atlas
Feb 21 at 12:58
$begingroup$
What model(additive or multiplicative) do you think the above time series follows?Also, how would I check whether seasonality is present or not?
$endgroup$
– Jor_El
Feb 21 at 20:53
$begingroup$
See this link for more information on how to tell if a time series is additive or multiplicative:r-bloggers.com/is-my-time-series-additive-or-multiplicative My answer above shows how to test for seasonality. Simply use the p-values of the regression model to inform if significant seasonality is present.
$endgroup$
– David Atlas
Feb 21 at 21:17
add a comment |
$begingroup$
Have you tried taking the first difference? This amounts to taking the first derivative, and is generally a good way to de-trend a time series.
However, if you want to use seasonality, fit a regression model of form
$$
X_t = X_t-k + epsilon
$$
where $k$ is the number of time periods between seasons. For example, if you have monthly observations, using $k=12$ might make sense, as this removes the annual seasonality.
$endgroup$
Have you tried taking the first difference? This amounts to taking the first derivative, and is generally a good way to de-trend a time series.
However, if you want to use seasonality, fit a regression model of form
$$
X_t = X_t-k + epsilon
$$
where $k$ is the number of time periods between seasons. For example, if you have monthly observations, using $k=12$ might make sense, as this removes the annual seasonality.
answered Feb 21 at 1:18
David AtlasDavid Atlas
312
312
$begingroup$
Isn't the above formula valid if time series is additive? Also how did you know that the given time series is additive?
$endgroup$
– Jor_El
Feb 21 at 9:29
$begingroup$
The above construct only helps remove the seasonality from $k$ time periods ago. If the time series does not have seasonality, the regression model should have very small coefficients. You can also use regularization to determine if the coefficients should be non-zero.
$endgroup$
– David Atlas
Feb 21 at 12:58
$begingroup$
What model(additive or multiplicative) do you think the above time series follows?Also, how would I check whether seasonality is present or not?
$endgroup$
– Jor_El
Feb 21 at 20:53
$begingroup$
See this link for more information on how to tell if a time series is additive or multiplicative:r-bloggers.com/is-my-time-series-additive-or-multiplicative My answer above shows how to test for seasonality. Simply use the p-values of the regression model to inform if significant seasonality is present.
$endgroup$
– David Atlas
Feb 21 at 21:17
add a comment |
$begingroup$
Isn't the above formula valid if time series is additive? Also how did you know that the given time series is additive?
$endgroup$
– Jor_El
Feb 21 at 9:29
$begingroup$
The above construct only helps remove the seasonality from $k$ time periods ago. If the time series does not have seasonality, the regression model should have very small coefficients. You can also use regularization to determine if the coefficients should be non-zero.
$endgroup$
– David Atlas
Feb 21 at 12:58
$begingroup$
What model(additive or multiplicative) do you think the above time series follows?Also, how would I check whether seasonality is present or not?
$endgroup$
– Jor_El
Feb 21 at 20:53
$begingroup$
See this link for more information on how to tell if a time series is additive or multiplicative:r-bloggers.com/is-my-time-series-additive-or-multiplicative My answer above shows how to test for seasonality. Simply use the p-values of the regression model to inform if significant seasonality is present.
$endgroup$
– David Atlas
Feb 21 at 21:17
$begingroup$
Isn't the above formula valid if time series is additive? Also how did you know that the given time series is additive?
$endgroup$
– Jor_El
Feb 21 at 9:29
$begingroup$
Isn't the above formula valid if time series is additive? Also how did you know that the given time series is additive?
$endgroup$
– Jor_El
Feb 21 at 9:29
$begingroup$
The above construct only helps remove the seasonality from $k$ time periods ago. If the time series does not have seasonality, the regression model should have very small coefficients. You can also use regularization to determine if the coefficients should be non-zero.
$endgroup$
– David Atlas
Feb 21 at 12:58
$begingroup$
The above construct only helps remove the seasonality from $k$ time periods ago. If the time series does not have seasonality, the regression model should have very small coefficients. You can also use regularization to determine if the coefficients should be non-zero.
$endgroup$
– David Atlas
Feb 21 at 12:58
$begingroup$
What model(additive or multiplicative) do you think the above time series follows?Also, how would I check whether seasonality is present or not?
$endgroup$
– Jor_El
Feb 21 at 20:53
$begingroup$
What model(additive or multiplicative) do you think the above time series follows?Also, how would I check whether seasonality is present or not?
$endgroup$
– Jor_El
Feb 21 at 20:53
$begingroup$
See this link for more information on how to tell if a time series is additive or multiplicative:r-bloggers.com/is-my-time-series-additive-or-multiplicative My answer above shows how to test for seasonality. Simply use the p-values of the regression model to inform if significant seasonality is present.
$endgroup$
– David Atlas
Feb 21 at 21:17
$begingroup$
See this link for more information on how to tell if a time series is additive or multiplicative:r-bloggers.com/is-my-time-series-additive-or-multiplicative My answer above shows how to test for seasonality. Simply use the p-values of the regression model to inform if significant seasonality is present.
$endgroup$
– David Atlas
Feb 21 at 21:17
add a comment |
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f45902%2fanalysis-of-time-series-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown