{"id":68886,"date":"2020-12-10T10:30:09","date_gmt":"2020-12-10T15:30:09","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=68886"},"modified":"2022-11-21T09:46:44","modified_gmt":"2022-11-21T14:46:44","slug":"reinforcement-learning-in-trading-part-iv","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/","title":{"rendered":"Reinforcement Learning in Trading \u2013 Part IV"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>See&nbsp;<a href=\"\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading\/\">Part I<\/a>,&nbsp;<a href=\"\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-ii\/\">Part II<\/a>&nbsp;and <a href=\"\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iii\/\">Part III<\/a> to get started.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"q-table-and-q-learning\">Q Table and Q Learning<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Q table and Q learning might sound fancy, but it is a very simple concept.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">At each time step, the RL agent needs to decide which action to take. What if the RL agent had a table which would tell her which action will give the maximum reward. Then simply select that action. This table is Q-table.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the Q-table, the rows are the states (in this case, the days) and the actions are the columns (in this case, hold and sell). The values in this table are called the Q-values.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Date<\/strong><\/td><td><strong>Sell<\/strong><\/td><td><strong>Hold<\/strong><\/td><\/tr><tr><td>23-07-2020<\/td><td>0.954<\/td><td>0.966<\/td><\/tr><tr><td>24-07-2020<\/td><td>0.954<\/td><td>0.985<\/td><\/tr><tr><td>27-07-2020<\/td><td>0.954<\/td><td>1.005<\/td><\/tr><tr><td>28-07-2020<\/td><td>0.954<\/td><td>1.026<\/td><\/tr><tr><td>29-07-2020<\/td><td>0.954<\/td><td>1.047<\/td><\/tr><tr><td>30-07-2020<\/td><td>0.954<\/td><td>1.068<\/td><\/tr><tr><td>31-07-2020<\/td><td>0.954<\/td><td>1.090<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">From the above Q-table, on 23 July, which action would RL agent take? Yes, that\u2019s right. A \u201chold\u201d action would be taken as it has a q-value of 0.966 which is greater than q-value of 0.954 for Sell action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>But how to create the Q-table?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s create a Q-table with the help of an example. For simplicity sake, let us take the same example of price data from July 22 to July 31 2020. We have added the percentage returns and cumulative returns as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Date<\/strong><\/td><td><strong>Closing Price<\/strong><\/td><td><strong>Percentage returns<\/strong><\/td><td><strong>Cumulative Returns<\/strong><\/td><\/tr><tr><td>22-07-2020<\/td><td>97.2<\/td><\/tr><tr><td>23-07-2020<\/td><td>92.8<\/td><td>-4.53%<\/td><td>0.95<\/td><\/tr><tr><td>24-07-2020<\/td><td>92.6<\/td><td>-0.22%<\/td><td>0.95<\/td><\/tr><tr><td>27-07-2020<\/td><td>94.8<\/td><td>2.38%<\/td><td>0.98<\/td><\/tr><tr><td>28-07-2020<\/td><td>93.3<\/td><td>-1.58%<\/td><td>0.96<\/td><\/tr><tr><td>29-07-2020<\/td><td>95<\/td><td>1.82%<\/td><td>0.98<\/td><\/tr><tr><td>30-07-2020<\/td><td>96.2<\/td><td>1.26%<\/td><td>0.99<\/td><\/tr><tr><td>31-07-2020<\/td><td>106.3<\/td><td>10.50%<\/td><td>1.09<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You have bought one stock of Apple a few days back and you have no more capital left. The only two choices for you are \u201chold\u201d or \u201csell\u201d. As a first step, you need to create a simple reward table.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If we decide to hold, then we will get no reward till 31 July and at the end, we get a reward of 1.09. And if we decide to sell on any day then the reward will be cumulative returns up to that day. The reward table (R-table) looks like below. If we let the RL model choose from the reward table, the RL model will sell the stock and gets a reward of 0.95.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>State\/Action<\/strong><\/td><td><strong>Sell<\/strong><\/td><td><strong>Hold<\/strong><\/td><\/tr><tr><td>22-07-2020<\/td><td>0<\/td><td>0<\/td><\/tr><tr><td>23-07-2020<\/td><td>0.95<\/td><td>0<\/td><\/tr><tr><td>24-07-2020<\/td><td>0.95<\/td><td>0<\/td><\/tr><tr><td>27-07-2020<\/td><td>0.98<\/td><td>0<\/td><\/tr><tr><td>28-07-2020<\/td><td>0.96<\/td><td>0<\/td><\/tr><tr><td>29-07-2020<\/td><td>0.98<\/td><td>0<\/td><\/tr><tr><td>30-07-2020<\/td><td>0.99<\/td><td>0<\/td><\/tr><tr><td>31-07-2020<\/td><td>1.09<\/td><td>1.09<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">But the price is expected to increase to $106 on July 31 resulting in a gain of 9%. Therefore, you should hold on to the stock till then. We have to represent this information. So that the RL agent can make better decisions to Hold rather than Sell.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How to go about it? To help us with this, we need to create a Q table. You can start by copying the reward table into the Q table and then calculate the implied reward using the&nbsp;<strong>Bellman equation<\/strong>&nbsp;on each day for Hold action.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Stay tuned for the next installment in which Ishan will demonstrate the Bellman equation.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Visit QuantInsti to download practical code:&nbsp;<a href=\"https:\/\/blog.quantinsti.com\/reinforcement-learning-trading\/\">https:\/\/blog.quantinsti.com\/reinforcement-learning-trading\/<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how Q Table and Q Learning are applied in Reinforcement Learning in Trading. Find out how to integrate percentage returns and cumulative returns.<\/p>\n","protected":false},"author":517,"featured_media":62531,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,349,338,350,341,344],"tags":[8577,8902,2105,8576,4922,1006,852,8575,8579,8578,494,7258],"contributors-categories":[13654],"class_list":["post-68886","post","type-post","status-publish","format-standard","has-post-thumbnail","category-data-science","category-programing-languages","category-python-development","category-ibkr-quant-news","category-quant-asia-pacific","category-quant-development","category-quant-regions","tag-alphazero","tag-bellman-equation","tag-deep-learning","tag-delayed-gratification","tag-econometrics","tag-fintech","tag-machine-learning","tag-mean-reverting-strategy","tag-q-learning","tag-q-table","tag-quant","tag-reinforcement-learning","contributors-categories-quantinsti"],"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 v28.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Reinforcement Learning in Trading \u2013 Part IV | IBKR Quant<\/title>\n<meta name=\"description\" content=\"Learn how Q Table and Q Learning are applied in Reinforcement Learning in Trading. Find out how to integrate percentage returns and cumulative returns.\" \/>\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\/68886\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reinforcement Learning in Trading \u2013 Part IV | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how Q Table and Q Learning are applied in Reinforcement Learning in Trading. Find out how to integrate percentage returns and cumulative returns.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-10T15:30:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:46:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/10\/tech-grid-nodes.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ishan Shah\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ishan Shah\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 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\\\/reinforcement-learning-in-trading-part-iv\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/reinforcement-learning-in-trading-part-iv\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Ishan Shah\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/0fd7dbae1e070042c10b53e8bdc551c5\"\n\t            },\n\t            \"headline\": \"Reinforcement Learning in Trading \u2013 Part IV\",\n\t            \"datePublished\": \"2020-12-10T15:30:09+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:46:44+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/reinforcement-learning-in-trading-part-iv\\\/\"\n\t            },\n\t            \"wordCount\": 491,\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\\\/reinforcement-learning-in-trading-part-iv\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/10\\\/tech-grid-nodes.jpg\",\n\t            \"keywords\": [\n\t                \"AlphaZero\",\n\t                \"Bellman Equation\",\n\t                \"Deep Learning\",\n\t                \"delayed gratification\",\n\t                \"Econometrics\",\n\t                \"fintech\",\n\t                \"Machine Learning\",\n\t                \"mean-reverting strategy\",\n\t                \"Q Learning\",\n\t                \"Q Table\",\n\t                \"Quant\",\n\t                \"Reinforcement Learning\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Asia Pacific\",\n\t                \"Quant Development\",\n\t                \"Quant Regions\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/reinforcement-learning-in-trading-part-iv\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/reinforcement-learning-in-trading-part-iv\\\/\",\n\t            \"name\": \"Reinforcement Learning in Trading \u2013 Part IV | IBKR Quant Blog\",\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\\\/reinforcement-learning-in-trading-part-iv\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/reinforcement-learning-in-trading-part-iv\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/10\\\/tech-grid-nodes.jpg\",\n\t            \"datePublished\": \"2020-12-10T15:30:09+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:46:44+00:00\",\n\t            \"description\": \"Learn how Q Table and Q Learning are applied in Reinforcement Learning in Trading. Find out how to integrate percentage returns and cumulative returns.\",\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\\\/reinforcement-learning-in-trading-part-iv\\\/\"\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\\\/reinforcement-learning-in-trading-part-iv\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/10\\\/tech-grid-nodes.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/10\\\/tech-grid-nodes.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 550,\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\\\/0fd7dbae1e070042c10b53e8bdc551c5\",\n\t            \"name\": \"Ishan Shah\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/ishanshah\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Reinforcement Learning in Trading \u2013 Part IV | IBKR Quant","description":"Learn how Q Table and Q Learning are applied in Reinforcement Learning in Trading. Find out how to integrate percentage returns and cumulative returns.","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\/68886\/","og_locale":"en_US","og_type":"article","og_title":"Reinforcement Learning in Trading \u2013 Part IV | IBKR Quant Blog","og_description":"Learn how Q Table and Q Learning are applied in Reinforcement Learning in Trading. Find out how to integrate percentage returns and cumulative returns.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/","og_site_name":"IBKR Campus US","article_published_time":"2020-12-10T15:30:09+00:00","article_modified_time":"2022-11-21T14:46:44+00:00","og_image":[{"width":900,"height":550,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/10\/tech-grid-nodes.jpg","type":"image\/jpeg"}],"author":"Ishan Shah","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ishan Shah","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/"},"author":{"name":"Ishan Shah","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0fd7dbae1e070042c10b53e8bdc551c5"},"headline":"Reinforcement Learning in Trading \u2013 Part IV","datePublished":"2020-12-10T15:30:09+00:00","dateModified":"2022-11-21T14:46:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/"},"wordCount":491,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/10\/tech-grid-nodes.jpg","keywords":["AlphaZero","Bellman Equation","Deep Learning","delayed gratification","Econometrics","fintech","Machine Learning","mean-reverting strategy","Q Learning","Q Table","Quant","Reinforcement Learning"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Asia Pacific","Quant Development","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/","name":"Reinforcement Learning in Trading \u2013 Part IV | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/10\/tech-grid-nodes.jpg","datePublished":"2020-12-10T15:30:09+00:00","dateModified":"2022-11-21T14:46:44+00:00","description":"Learn how Q Table and Q Learning are applied in Reinforcement Learning in Trading. Find out how to integrate percentage returns and cumulative returns.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/reinforcement-learning-in-trading-part-iv\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/10\/tech-grid-nodes.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/10\/tech-grid-nodes.jpg","width":900,"height":550,"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\/0fd7dbae1e070042c10b53e8bdc551c5","name":"Ishan Shah","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/ishanshah\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/10\/tech-grid-nodes.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/68886","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\/517"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=68886"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/68886\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/62531"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=68886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=68886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=68886"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=68886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}