Using neural networks with jumps in stock returns












1












$begingroup$


I am using an LSTM network to analyse stock return patterns. A problem is that, there is usually huge jumps in stock returns but if you are only using the trading data, the jumps would seem pretty random. (For example, the jumps from SEC ruling against or in favor of a company.)



Thus, if the neural network learns too much from the jumps, the results would not generalize well. One might cap the returns or use auto encoders. What are some other methods to regularize such jumps and limit the changes the jumps cause to the network?










share|improve this question











$endgroup$




bumped to the homepage by Community 13 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$


    I am using an LSTM network to analyse stock return patterns. A problem is that, there is usually huge jumps in stock returns but if you are only using the trading data, the jumps would seem pretty random. (For example, the jumps from SEC ruling against or in favor of a company.)



    Thus, if the neural network learns too much from the jumps, the results would not generalize well. One might cap the returns or use auto encoders. What are some other methods to regularize such jumps and limit the changes the jumps cause to the network?










    share|improve this question











    $endgroup$




    bumped to the homepage by Community 13 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$


      I am using an LSTM network to analyse stock return patterns. A problem is that, there is usually huge jumps in stock returns but if you are only using the trading data, the jumps would seem pretty random. (For example, the jumps from SEC ruling against or in favor of a company.)



      Thus, if the neural network learns too much from the jumps, the results would not generalize well. One might cap the returns or use auto encoders. What are some other methods to regularize such jumps and limit the changes the jumps cause to the network?










      share|improve this question











      $endgroup$




      I am using an LSTM network to analyse stock return patterns. A problem is that, there is usually huge jumps in stock returns but if you are only using the trading data, the jumps would seem pretty random. (For example, the jumps from SEC ruling against or in favor of a company.)



      Thus, if the neural network learns too much from the jumps, the results would not generalize well. One might cap the returns or use auto encoders. What are some other methods to regularize such jumps and limit the changes the jumps cause to the network?







      machine-learning neural-network






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 17 '18 at 17:12







      toga

















      asked Oct 17 '18 at 17:07









      togatoga

      112




      112





      bumped to the homepage by Community 13 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 13 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


















          1












          $begingroup$

          In standard models that try to characterise jumps, such as the Jump Diffusion model from Mertons (a short introduction), the model consists of two main parts:




          1. Brownian motion; a random walk to account for the random path, perhaps with some drift - when the values head upwards or downwards in a consisten manner. And

          2. An additive Possion process, which with some probability add a jump in a time-step, with a given probability.


          Drawing from this approach, you could also consider using two models that work independently (or separately) to model the overall market and trend, along with a model that introduces jumps at certain timesteps and itnervals.



          You could try using different input data for the second model, such as signals taken from text, such as news feeds or newpapers that discuss current market dynamics/politics, possible decisions from SEC and the like. The first (stable) part could be modelled by your current neural network.





          This is just a high level idea, and I haven't actually seen any research that already tried it, so unfortunately cannot provide any links to literature.






          share|improve this answer









          $endgroup$













          • $begingroup$
            Thanks for the reply. The problem about the tradition research is that they can not predict anything. The jumps are random like you said. In a sense tho almost nobody could predict the jumps. Not long ago TSLA went down 20% during the after hours when SEC sued Elon but then immediately went back up the second day when Elon and SEC agreed to settle. The neural network should not learn too much from the jump (a 15% - 20% of daily swing) but in a vanilla neural network it definitely would put a lot of weight on that. Maybe I will use wavelet transform etc.
            $endgroup$
            – toga
            Oct 18 '18 at 9:55










          • $begingroup$
            I understand, and that is exactly why I suggested two models. Obviously the model predicting/filtering jumps will need input from external sources (such as embeddings from news articles and twitter), not just prices from previous days, as the news is not factored into the actual market price before it is too late. The model for the general drift of the price path could take in daily prices along with some smoothed variant to make it a little more robust to spikes. You should really be looking at included realized volatility in such a model. Prices alone (even logs of returns) will not suffice.
            $endgroup$
            – n1k31t4
            Oct 18 '18 at 9:59












          Your Answer








          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%2f39833%2fusing-neural-networks-with-jumps-in-stock-returns%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









          1












          $begingroup$

          In standard models that try to characterise jumps, such as the Jump Diffusion model from Mertons (a short introduction), the model consists of two main parts:




          1. Brownian motion; a random walk to account for the random path, perhaps with some drift - when the values head upwards or downwards in a consisten manner. And

          2. An additive Possion process, which with some probability add a jump in a time-step, with a given probability.


          Drawing from this approach, you could also consider using two models that work independently (or separately) to model the overall market and trend, along with a model that introduces jumps at certain timesteps and itnervals.



          You could try using different input data for the second model, such as signals taken from text, such as news feeds or newpapers that discuss current market dynamics/politics, possible decisions from SEC and the like. The first (stable) part could be modelled by your current neural network.





          This is just a high level idea, and I haven't actually seen any research that already tried it, so unfortunately cannot provide any links to literature.






          share|improve this answer









          $endgroup$













          • $begingroup$
            Thanks for the reply. The problem about the tradition research is that they can not predict anything. The jumps are random like you said. In a sense tho almost nobody could predict the jumps. Not long ago TSLA went down 20% during the after hours when SEC sued Elon but then immediately went back up the second day when Elon and SEC agreed to settle. The neural network should not learn too much from the jump (a 15% - 20% of daily swing) but in a vanilla neural network it definitely would put a lot of weight on that. Maybe I will use wavelet transform etc.
            $endgroup$
            – toga
            Oct 18 '18 at 9:55










          • $begingroup$
            I understand, and that is exactly why I suggested two models. Obviously the model predicting/filtering jumps will need input from external sources (such as embeddings from news articles and twitter), not just prices from previous days, as the news is not factored into the actual market price before it is too late. The model for the general drift of the price path could take in daily prices along with some smoothed variant to make it a little more robust to spikes. You should really be looking at included realized volatility in such a model. Prices alone (even logs of returns) will not suffice.
            $endgroup$
            – n1k31t4
            Oct 18 '18 at 9:59
















          1












          $begingroup$

          In standard models that try to characterise jumps, such as the Jump Diffusion model from Mertons (a short introduction), the model consists of two main parts:




          1. Brownian motion; a random walk to account for the random path, perhaps with some drift - when the values head upwards or downwards in a consisten manner. And

          2. An additive Possion process, which with some probability add a jump in a time-step, with a given probability.


          Drawing from this approach, you could also consider using two models that work independently (or separately) to model the overall market and trend, along with a model that introduces jumps at certain timesteps and itnervals.



          You could try using different input data for the second model, such as signals taken from text, such as news feeds or newpapers that discuss current market dynamics/politics, possible decisions from SEC and the like. The first (stable) part could be modelled by your current neural network.





          This is just a high level idea, and I haven't actually seen any research that already tried it, so unfortunately cannot provide any links to literature.






          share|improve this answer









          $endgroup$













          • $begingroup$
            Thanks for the reply. The problem about the tradition research is that they can not predict anything. The jumps are random like you said. In a sense tho almost nobody could predict the jumps. Not long ago TSLA went down 20% during the after hours when SEC sued Elon but then immediately went back up the second day when Elon and SEC agreed to settle. The neural network should not learn too much from the jump (a 15% - 20% of daily swing) but in a vanilla neural network it definitely would put a lot of weight on that. Maybe I will use wavelet transform etc.
            $endgroup$
            – toga
            Oct 18 '18 at 9:55










          • $begingroup$
            I understand, and that is exactly why I suggested two models. Obviously the model predicting/filtering jumps will need input from external sources (such as embeddings from news articles and twitter), not just prices from previous days, as the news is not factored into the actual market price before it is too late. The model for the general drift of the price path could take in daily prices along with some smoothed variant to make it a little more robust to spikes. You should really be looking at included realized volatility in such a model. Prices alone (even logs of returns) will not suffice.
            $endgroup$
            – n1k31t4
            Oct 18 '18 at 9:59














          1












          1








          1





          $begingroup$

          In standard models that try to characterise jumps, such as the Jump Diffusion model from Mertons (a short introduction), the model consists of two main parts:




          1. Brownian motion; a random walk to account for the random path, perhaps with some drift - when the values head upwards or downwards in a consisten manner. And

          2. An additive Possion process, which with some probability add a jump in a time-step, with a given probability.


          Drawing from this approach, you could also consider using two models that work independently (or separately) to model the overall market and trend, along with a model that introduces jumps at certain timesteps and itnervals.



          You could try using different input data for the second model, such as signals taken from text, such as news feeds or newpapers that discuss current market dynamics/politics, possible decisions from SEC and the like. The first (stable) part could be modelled by your current neural network.





          This is just a high level idea, and I haven't actually seen any research that already tried it, so unfortunately cannot provide any links to literature.






          share|improve this answer









          $endgroup$



          In standard models that try to characterise jumps, such as the Jump Diffusion model from Mertons (a short introduction), the model consists of two main parts:




          1. Brownian motion; a random walk to account for the random path, perhaps with some drift - when the values head upwards or downwards in a consisten manner. And

          2. An additive Possion process, which with some probability add a jump in a time-step, with a given probability.


          Drawing from this approach, you could also consider using two models that work independently (or separately) to model the overall market and trend, along with a model that introduces jumps at certain timesteps and itnervals.



          You could try using different input data for the second model, such as signals taken from text, such as news feeds or newpapers that discuss current market dynamics/politics, possible decisions from SEC and the like. The first (stable) part could be modelled by your current neural network.





          This is just a high level idea, and I haven't actually seen any research that already tried it, so unfortunately cannot provide any links to literature.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 18 '18 at 5:51









          n1k31t4n1k31t4

          6,5612421




          6,5612421












          • $begingroup$
            Thanks for the reply. The problem about the tradition research is that they can not predict anything. The jumps are random like you said. In a sense tho almost nobody could predict the jumps. Not long ago TSLA went down 20% during the after hours when SEC sued Elon but then immediately went back up the second day when Elon and SEC agreed to settle. The neural network should not learn too much from the jump (a 15% - 20% of daily swing) but in a vanilla neural network it definitely would put a lot of weight on that. Maybe I will use wavelet transform etc.
            $endgroup$
            – toga
            Oct 18 '18 at 9:55










          • $begingroup$
            I understand, and that is exactly why I suggested two models. Obviously the model predicting/filtering jumps will need input from external sources (such as embeddings from news articles and twitter), not just prices from previous days, as the news is not factored into the actual market price before it is too late. The model for the general drift of the price path could take in daily prices along with some smoothed variant to make it a little more robust to spikes. You should really be looking at included realized volatility in such a model. Prices alone (even logs of returns) will not suffice.
            $endgroup$
            – n1k31t4
            Oct 18 '18 at 9:59


















          • $begingroup$
            Thanks for the reply. The problem about the tradition research is that they can not predict anything. The jumps are random like you said. In a sense tho almost nobody could predict the jumps. Not long ago TSLA went down 20% during the after hours when SEC sued Elon but then immediately went back up the second day when Elon and SEC agreed to settle. The neural network should not learn too much from the jump (a 15% - 20% of daily swing) but in a vanilla neural network it definitely would put a lot of weight on that. Maybe I will use wavelet transform etc.
            $endgroup$
            – toga
            Oct 18 '18 at 9:55










          • $begingroup$
            I understand, and that is exactly why I suggested two models. Obviously the model predicting/filtering jumps will need input from external sources (such as embeddings from news articles and twitter), not just prices from previous days, as the news is not factored into the actual market price before it is too late. The model for the general drift of the price path could take in daily prices along with some smoothed variant to make it a little more robust to spikes. You should really be looking at included realized volatility in such a model. Prices alone (even logs of returns) will not suffice.
            $endgroup$
            – n1k31t4
            Oct 18 '18 at 9:59
















          $begingroup$
          Thanks for the reply. The problem about the tradition research is that they can not predict anything. The jumps are random like you said. In a sense tho almost nobody could predict the jumps. Not long ago TSLA went down 20% during the after hours when SEC sued Elon but then immediately went back up the second day when Elon and SEC agreed to settle. The neural network should not learn too much from the jump (a 15% - 20% of daily swing) but in a vanilla neural network it definitely would put a lot of weight on that. Maybe I will use wavelet transform etc.
          $endgroup$
          – toga
          Oct 18 '18 at 9:55




          $begingroup$
          Thanks for the reply. The problem about the tradition research is that they can not predict anything. The jumps are random like you said. In a sense tho almost nobody could predict the jumps. Not long ago TSLA went down 20% during the after hours when SEC sued Elon but then immediately went back up the second day when Elon and SEC agreed to settle. The neural network should not learn too much from the jump (a 15% - 20% of daily swing) but in a vanilla neural network it definitely would put a lot of weight on that. Maybe I will use wavelet transform etc.
          $endgroup$
          – toga
          Oct 18 '18 at 9:55












          $begingroup$
          I understand, and that is exactly why I suggested two models. Obviously the model predicting/filtering jumps will need input from external sources (such as embeddings from news articles and twitter), not just prices from previous days, as the news is not factored into the actual market price before it is too late. The model for the general drift of the price path could take in daily prices along with some smoothed variant to make it a little more robust to spikes. You should really be looking at included realized volatility in such a model. Prices alone (even logs of returns) will not suffice.
          $endgroup$
          – n1k31t4
          Oct 18 '18 at 9:59




          $begingroup$
          I understand, and that is exactly why I suggested two models. Obviously the model predicting/filtering jumps will need input from external sources (such as embeddings from news articles and twitter), not just prices from previous days, as the news is not factored into the actual market price before it is too late. The model for the general drift of the price path could take in daily prices along with some smoothed variant to make it a little more robust to spikes. You should really be looking at included realized volatility in such a model. Prices alone (even logs of returns) will not suffice.
          $endgroup$
          – n1k31t4
          Oct 18 '18 at 9:59


















          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%2f39833%2fusing-neural-networks-with-jumps-in-stock-returns%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

          How to label and detect the document text images

          Vallis Paradisi

          Tabula Rosettana