Analysis of Time Series dataTime 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?

Open a doc from terminal, but not by its name

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Does the Linux kernel need a file system to run?

Lowest total scrabble score

Hero deduces identity of a killer

What if a revenant (monster) gains fire resistance?

How does the math work for Perception checks?

Why would a new[] expression ever invoke a destructor?

Can I still be respawned if I die by falling off the map?

Why is the "ls" command showing permissions of files in a FAT32 partition?

Using substitution ciphers to generate new alphabets in a novel

On a tidally locked planet, would time be quantized?

What is Cash Advance APR?

Mixing PEX brands

What should you do if you miss a job interview (deliberately)?

How could a planet have erratic days?

What should you do when eye contact makes your subordinate uncomfortable?

How to fade a semiplane defined by line?

Mimic lecturing on blackboard, facing audience

Invalid date error by date command

Plot of a tornado-shaped surface

Angel of Condemnation - Exile creature with second ability

Why does a simple loop result in ASYNC_NETWORK_IO waits?

How to cover method return statement in Apex Class?



Analysis of Time Series data


Time 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?













1












$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.



enter image description here



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?










share|improve this question









$endgroup$




bumped to the homepage by Community 2 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.



















    1












    $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.



    enter image description here



    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?










    share|improve this question









    $endgroup$




    bumped to the homepage by Community 2 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















      1












      1








      1





      $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.



      enter image description here



      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?










      share|improve this question









      $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.



      enter image description here



      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 20 at 17:06









      Jor_ElJor_El

      312




      312





      bumped to the homepage by Community 2 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 2 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















          1 Answer
          1






          active

          oldest

          votes


















          0












          $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.






          share|improve this answer









          $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











          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
          );



          );













          draft saved

          draft discarded


















          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









          0












          $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.






          share|improve this answer









          $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
















          0












          $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.






          share|improve this answer









          $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














          0












          0








          0





          $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.






          share|improve this answer









          $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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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

















          • $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


















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          ValueError: Error when checking input: expected conv2d_13_input to have shape (3, 150, 150) but got array with shape (150, 150, 3)2019 Community Moderator ElectionError when checking : expected dense_1_input to have shape (None, 5) but got array with shape (200, 1)Error 'Expected 2D array, got 1D array instead:'ValueError: Error when checking input: expected lstm_41_input to have 3 dimensions, but got array with shape (40000,100)ValueError: Error when checking target: expected dense_1 to have shape (7,) but got array with shape (1,)ValueError: Error when checking target: expected dense_2 to have shape (1,) but got array with shape (0,)Keras exception: ValueError: Error when checking input: expected conv2d_1_input to have shape (150, 150, 3) but got array with shape (256, 256, 3)Steps taking too long to completewhen checking input: expected dense_1_input to have shape (13328,) but got array with shape (317,)ValueError: Error when checking target: expected dense_3 to have shape (None, 1) but got array with shape (7715, 40000)Keras exception: Error when checking input: expected dense_input to have shape (2,) but got array with shape (1,)

          Ружовы пелікан Змест Знешні выгляд | Пашырэнне | Асаблівасці біялогіі | Літаратура | НавігацыяДагледжаная версіяправерана1 зменаДагледжаная версіяправерана1 змена/ 22697590 Сістэматыкана ВіківідахВыявына Вікісховішчы174693363011049382

          Illegal assignment from SObject to ContactFetching String, Id from Map - Illegal Assignment Id to Field / ObjectError: Compile Error: Illegal assignment from String to BooleanError: List has no rows for assignment to SObjectError on Test Class - System.QueryException: List has no rows for assignment to SObjectRemote action problemDML requires SObject or SObject list type error“Illegal assignment from List to List”Test Class Fail: Batch Class: System.QueryException: List has no rows for assignment to SObjectMapping to a user'List has no rows for assignment to SObject' Mystery