{"id":207712,"date":"2024-06-07T11:02:53","date_gmt":"2024-06-07T15:02:53","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=207712"},"modified":"2024-08-13T16:19:27","modified_gmt":"2024-08-13T20:19:27","slug":"understanding-the-lstm-model","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/","title":{"rendered":"Understanding the LSTM Model"},"content":{"rendered":"\n<p>This post gives a brief introduction to the basic structure of LSTM (Long-Short Term Memory) model with an intuitive figures and explanations. Let&#8217;s&nbsp;<strong>interpret &#8220;gate&#8221;<\/strong>&nbsp;as&nbsp;<strong>&#8220;rate&#8221;<\/strong>&nbsp;or&nbsp;<strong>&#8220;weight&#8221;<\/strong>&nbsp;for grasping the concept of LSTM faster since we are not engineers but finance-related practitioners.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-understanding-the-lstm-model\">Understanding the LSTM model<\/h2>\n\n\n\n<p>I will explain the LSTM model and then talk about the RNN model by eliminating the LSTM gates one by one. Now let&#8217;s understand the structure of LSTM model.<\/p>\n\n\n\n<p><strong>Activation function : Sigmoid versus Tanh<\/strong><\/p>\n\n\n\n<p>LSTM uses two types of activation functions: sigmoid (S) and hyperbolic tangent or tanh (T). The&nbsp;<strong>sigmoid<\/strong>&nbsp;determines&nbsp;<strong>the ratio or rate of information<\/strong>&nbsp;and&nbsp;<strong>tanh<\/strong>&nbsp;normalizes&nbsp;<strong>information into the range between -1 and 1<\/strong>. These two activation function have the following responses respectively.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"547\" height=\"85\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-1.png\" alt=\"\" class=\"wp-image-207719 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-1.png 547w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-1-300x47.png 300w\" data-sizes=\"(max-width: 547px) 100vw, 547px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 547px; aspect-ratio: 547\/85;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"771\" height=\"497\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-2.png\" alt=\"\" class=\"wp-image-207720 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-2.png 771w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-2-700x451.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-2-300x193.png 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-2-768x495.png 768w\" data-sizes=\"(max-width: 771px) 100vw, 771px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 771px; aspect-ratio: 771\/497;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Input, Output (State) and Memory<\/h3>\n\n\n\n<p>LSTM is a function so that it has input <em>(<strong>x<sub>t\u22121<\/sub><\/strong><\/em>,<strong>&nbsp;<em>h<sub>t\u22121<\/sub><\/em><\/strong>) and output <em>(<strong>h<sub>t<\/sub><\/strong><\/em>). It is a variant of RNN model and has two temporal dependence mechanism: short-term memory (<strong><em>\u210e<sub>????<\/sub><\/em><\/strong>) and long-term memory (<strong><em>C<sub>t<\/sub><\/em><\/strong>).<\/p>\n\n\n\n<p>These variables are summarized as follows.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>C<sub>t<\/sub><\/em><\/strong>&nbsp;: memory cell<\/li>\n\n\n\n<li><strong><em>h<sub>t\u22121<\/sub><\/em><\/strong>&nbsp;: previous output or state<\/li>\n\n\n\n<li><strong><em>x<sub>t<\/sub><\/em><\/strong>&nbsp;: input data or input sequence at time t (i.e.&nbsp;<strong><em>y<sub>t\u22121<\/sub><\/em><\/strong>)<\/li>\n\n\n\n<li><strong><em>h<sub>t<\/sub><\/em><\/strong>&nbsp;: hidden state or output (fitted y value)<\/li>\n\n\n\n<li><strong><em>y<sub>t<\/sub>&nbsp;<\/em><\/strong>: target data<\/li>\n<\/ul>\n\n\n\n<p><strong>The inner structure of LSTM<\/strong><\/p>\n\n\n\n<p>Given&nbsp;<em><strong>x<sub>t<\/sub><\/strong><\/em>&nbsp;(current input) and&nbsp;<strong><em>h<sub>t\u22121<\/sub><\/em><\/strong>&nbsp;(previous state or output), the inner structure of LSTM is defined by a set of equations as follows.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"575\" height=\"294\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-3.png\" alt=\"\" class=\"wp-image-207725 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-3.png 575w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-3-300x153.png 300w\" data-sizes=\"(max-width: 575px) 100vw, 575px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 575px; aspect-ratio: 575\/294;\" \/><\/figure>\n\n\n\n<p>The main component of LSTM is the memory cell (<strong><em>C<sub>t<\/sub><\/em><\/strong>) which penetrates through the whole layers. This is adjusted and added and finally reduced into output combined with the current and previous information.<\/p>\n\n\n\n<p>At time&nbsp;<strong><em>t<sub>????<\/sub><\/em><\/strong>,<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>C<sub>t-1<\/sub><\/em><\/strong>&nbsp;enters into the LSTM layer and some portion of it is deleted by&nbsp;<strong>????<sub>????<\/sub><\/strong>, which is the forget rate.<\/li>\n\n\n\n<li>The current memory cell <img decoding=\"async\" width=\"36\" height=\"26\" class=\"wp-image-207727 lazyload\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-4.png\" alt=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 36px; aspect-ratio: 36\/26;\"> is constructed by the current and previous short-term information (<em><strong>x<sub>t<\/sub><\/strong><\/em>, <strong><em>h<sub>t\u22121<\/sub><\/em><\/strong>) and also some portion of it is selected by&nbsp;<strong><em>i<sub>t<\/sub><\/em><\/strong>, which is the input rate.<\/li>\n\n\n\n<li>The updated memory cell (<strong><em>C<sub>t<\/sub><\/em><\/strong>) is determined by the sum of 1) and 2). This is essentially a weighted average like an updating of the Kalman filter and is transferred into the next LSTM layer.<\/li>\n\n\n\n<li>As&nbsp;<strong><em>C<sub>t<\/sub><\/em><\/strong>&nbsp;contains information of the previous state, current input, and the memory cell, it determines the current output (<em><strong>x<sub>t<\/sub><\/strong><\/em>) which is some portion of the updated memory cell (<strong><em>C<sub>t<\/sub><\/em><\/strong>) by adjusting the output rate (<strong><em>????<sub>????<\/sub><\/em><\/strong>).<\/li>\n<\/ul>\n\n\n\n<p>I use the word &#8220;rate&#8221; rather than &#8220;gate&#8221; since I think that &#8220;rate&#8221; has a bound between 0 and 1 (ratio or weight) and reflects the functionalities of three gates more intuitively.<\/p>\n\n\n\n<p>These set of equations for the LSTM model can be illustrated by the following figure.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"598\" height=\"339\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/final_LSTM_flow2.jpg\" alt=\"\" class=\"wp-image-207749 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/final_LSTM_flow2.jpg 598w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/final_LSTM_flow2-300x170.jpg 300w\" data-sizes=\"(max-width: 598px) 100vw, 598px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 598px; aspect-ratio: 598\/339;\" \/><\/figure>\n\n\n\n<p>It is worth to note that the current information (<em><strong>x<sub>t<\/sub><\/strong><\/em>) and the previous state (<strong><em>h<sub>t\u22121<\/sub><\/em><\/strong>) are fed into the LSTM layer and convey short-term information and the memory cell governs the relatively long-term information.<\/p>\n\n\n\n<p><strong>RNN (Recurrent Neutral Network)<\/strong><\/p>\n\n\n\n<p>If the memory cell is absent,&nbsp;<strong><em>C<sub>t-1<\/sub><\/em><\/strong>,&nbsp;<strong><em>C<sub>t<\/sub><\/em><\/strong>&nbsp;and&nbsp;????<sub>????<\/sub>&nbsp;can be deleted. This also leads to&nbsp;<strong><em>i<sub>t<\/sub><\/em><\/strong>&nbsp;being one (full weight) since&nbsp;<img decoding=\"async\" width=\"36\" height=\"26\" class=\"wp-image-207727 lazyload\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-4.png\" alt=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 36px; aspect-ratio: 36\/26;\">&nbsp;is not calculated. This reasoning leads to the following simple RNN equation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"583\" height=\"49\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-6.png\" alt=\"\" class=\"wp-image-207732 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-6.png 583w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/06\/lstm-model-shfintech-6-300x25.png 300w\" data-sizes=\"(max-width: 583px) 100vw, 583px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 583px; aspect-ratio: 583\/49;\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Concluding Remarks<\/h3>\n\n\n\n<p>This post gives short introduction to the basic structure of LSTM model with an intuitive figures and explanations. The remaining job is to know how to implement LSTM or RNN model using Keras or Tensorflow.&nbsp;<\/p>\n\n\n\n<p><em>Originally posted on <a href=\"https:\/\/shleeai.blogspot.com\/2022\/10\/understanding-lstm-model.html\">SHLee AI Financial Model<\/a> blog.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post gives a brief introduction to the basic structure of LSTM (Long-Short Term Memory) model with an intuitive figures and explanations. <\/p>\n","protected":false},"author":662,"featured_media":135180,"comment_status":"open","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,338,341],"tags":[806,17224,17225,17226],"contributors-categories":[13728],"class_list":{"0":"post-207712","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-ibkr-quant-news","9":"category-quant-development","10":"tag-data-science","11":"tag-lstm-model","12":"tag-sigmoid","13":"tag-tanh","14":"contributors-categories-sh-fintech-modeling"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Understanding the LSTM Model | IBKR Quant<\/title>\n<meta name=\"description\" content=\"This post gives a brief introduction to the basic structure of LSTM (Long-Short Term Memory) model with an intuitive figures and explanations.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/207712\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding the LSTM Model\" \/>\n<meta property=\"og:description\" content=\"This post gives a brief introduction to the basic structure of LSTM (Long-Short Term Memory) model with an intuitive figures and explanations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-07T15:02:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-13T20:19:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-green-abstract.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sang-Heon Lee\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sang-Heon Lee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Sang-Heon Lee\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\"\n\t            },\n\t            \"headline\": \"Understanding the LSTM Model\",\n\t            \"datePublished\": \"2024-06-07T15:02:53+00:00\",\n\t            \"dateModified\": \"2024-08-13T20:19:27+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/\"\n\t            },\n\t            \"wordCount\": 590,\n\t            \"commentCount\": 0,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/quant-green-abstract.png\",\n\t            \"keywords\": [\n\t                \"Data Science\",\n\t                \"LSTM model\",\n\t                \"Sigmoid\",\n\t                \"Tanh\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Quant\",\n\t                \"Quant Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"CommentAction\",\n\t                    \"name\": \"Comment\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/\",\n\t            \"name\": \"Understanding the LSTM Model | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/quant-green-abstract.png\",\n\t            \"datePublished\": \"2024-06-07T15:02:53+00:00\",\n\t            \"dateModified\": \"2024-08-13T20:19:27+00:00\",\n\t            \"description\": \"This post gives a brief introduction to the basic structure of LSTM (Long-Short Term Memory) model with an intuitive figures and explanations.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/understanding-the-lstm-model\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/quant-green-abstract.png\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/quant-green-abstract.png\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"Quant\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0a959ff9de7f0465a07baa1fe1ae0200\",\n\t            \"name\": \"Sang-Heon Lee\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/sang-heonlee\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Understanding the LSTM Model | IBKR Quant","description":"This post gives a brief introduction to the basic structure of LSTM (Long-Short Term Memory) model with an intuitive figures and explanations.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/207712\/","og_locale":"en_US","og_type":"article","og_title":"Understanding the LSTM Model","og_description":"This post gives a brief introduction to the basic structure of LSTM (Long-Short Term Memory) model with an intuitive figures and explanations.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/","og_site_name":"IBKR Campus US","article_published_time":"2024-06-07T15:02:53+00:00","article_modified_time":"2024-08-13T20:19:27+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-green-abstract.png","type":"image\/png"}],"author":"Sang-Heon Lee","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sang-Heon Lee","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/"},"author":{"name":"Sang-Heon Lee","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200"},"headline":"Understanding the LSTM Model","datePublished":"2024-06-07T15:02:53+00:00","dateModified":"2024-08-13T20:19:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/"},"wordCount":590,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-green-abstract.png","keywords":["Data Science","LSTM model","Sigmoid","Tanh"],"articleSection":["Data Science","Quant","Quant Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/","name":"Understanding the LSTM Model | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-green-abstract.png","datePublished":"2024-06-07T15:02:53+00:00","dateModified":"2024-08-13T20:19:27+00:00","description":"This post gives a brief introduction to the basic structure of LSTM (Long-Short Term Memory) model with an intuitive figures and explanations.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/understanding-the-lstm-model\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-green-abstract.png","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-green-abstract.png","width":1000,"height":563,"caption":"Quant"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0a959ff9de7f0465a07baa1fe1ae0200","name":"Sang-Heon Lee","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/sang-heonlee\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/04\/quant-green-abstract.png","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/207712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/662"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=207712"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/207712\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/135180"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=207712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=207712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=207712"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=207712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}