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

          Францішак Багушэвіч Змест Сям'я | Біяграфія | Творчасць | Мова Багушэвіча | Ацэнкі дзейнасці | Цікавыя факты | Спадчына | Выбраная бібліяграфія | Ушанаванне памяці | У філатэліі | Зноскі | Літаратура | Спасылкі | НавігацыяЛяхоўскі У. Рупіўся дзеля Бога і людзей: Жыццёвы шлях Лявона Вітан-Дубейкаўскага // Вольскі і Памідораў з песняй пра немца Адвакат, паэт, народны заступнік Ашмянскі веснікВ Минске появится площадь Богушевича и улица Сырокомли, Белорусская деловая газета, 19 июля 2001 г.Айцец беларускай нацыянальнай ідэі паўстаў у бронзе Сяргей Аляксандравіч Адашкевіч (1918, Мінск). 80-я гады. Бюст «Францішак Багушэвіч».Яўген Мікалаевіч Ціхановіч. «Партрэт Францішка Багушэвіча»Мікола Мікалаевіч Купава. «Партрэт зачынальніка новай беларускай літаратуры Францішка Багушэвіча»Уладзімір Іванавіч Мелехаў. На помніку «Змагарам за родную мову» Барэльеф «Францішак Багушэвіч»Памяць пра Багушэвіча на Віленшчыне Страчаная сталіца. Беларускія шыльды на вуліцах Вільні«Krynica». Ideologia i przywódcy białoruskiego katolicyzmuФранцішак БагушэвічТворы на knihi.comТворы Францішка Багушэвіча на bellib.byСодаль Уладзімір. Францішак Багушэвіч на Лідчыне;Луцкевіч Антон. Жыцьцё і творчасьць Фр. Багушэвіча ў успамінах ягоных сучасьнікаў // Запісы Беларускага Навуковага таварыства. Вільня, 1938. Сшытак 1. С. 16-34.Большая российская1188761710000 0000 5537 633Xn9209310021619551927869394п

          Partai Komunis Tiongkok Daftar isi Kepemimpinan | Pranala luar | Referensi | Menu navigasidiperiksa1 perubahan tertundacpc.people.com.cnSitus resmiSurat kabar resmi"Why the Communist Party is alive, well and flourishing in China"0307-1235"Full text of Constitution of Communist Party of China"smengembangkannyas

          ValueError: Expected n_neighbors <= n_samples, but n_samples = 1, n_neighbors = 6 (SMOTE) The 2019 Stack Overflow Developer Survey Results Are InCan SMOTE be applied over sequence of words (sentences)?ValueError when doing validation with random forestsSMOTE and multi class oversamplingLogic behind SMOTE-NC?ValueError: Error when checking target: expected dense_1 to have shape (7,) but got array with shape (1,)SmoteBoost: Should SMOTE be ran individually for each iteration/tree in the boosting?solving multi-class imbalance classification using smote and OSSUsing SMOTE for Synthetic Data generation to improve performance on unbalanced dataproblem of entry format for a simple model in KerasSVM SMOTE fit_resample() function runs forever with no result