{"id":20121,"date":"2019-10-01T10:26:00","date_gmt":"2019-10-01T14:26:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=20121"},"modified":"2022-11-21T09:44:18","modified_gmt":"2022-11-21T14:44:18","slug":"neural-network-python-backpropagation","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/","title":{"rendered":"Neural Network In Python: Introduction, Structure And Trading Strategies \u2013 Part V"},"content":{"rendered":"\n<p><em>In the previous installment, Devang discussed <a href=\"\/campus\/ibkr-quant-news\/neural-network-python-gradient-descent\/\">Gradient Descent<\/a>. Today the author will discuss Backpropagation<\/em>.<\/p>\n\n\n\n<p>Backpropagation is an advanced algorithm which enables us to update all the weights in the neural network simultaneously. This drastically reduces the complexity of the process to adjust weights. If we were not using this algorithm, we would have to adjust each weight individually by figuring out what impact that particular weight has on the error in the estimation. Let us look at the steps involved in training the neural network with Stochastic Gradient Descent:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Initialize the weights to small numbers very close to 0 (but not 0)<\/li><li>Forward propagation &#8211; the neurons are activated from left to right, by using the first data entry in our training dataset, until we arrive at the estimated result y<\/li><li>Measure the error which will be generated<\/li><li>Backpropagation &#8211; the error generated will be backpropagated from right to left, and the weights will be adjusted according to the learning rate<\/li><li>Repeat the previous three steps, forward propagation, error computation and backpropagation on the entire training dataset<\/li><li>This would mark the end of the first epoch, the successive epochs will begin with the weight values of the previous epochs, we can stop this process when the cost function converges within a certain acceptable limit<\/li><\/ul>\n\n\n\n<p><em>Stay tuned for<\/em> t<em>he next installment in which Devang will show us how to code a strategy in a neural network and how to code the Artificial Neural Network in Python, making use of powerful libraries.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Backpropagation is an advanced algorithm which enables us to update all the weights in the neural network simultaneously.<\/p>\n","protected":false},"author":251,"featured_media":20117,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[343,349,338,350,341,344],"tags":[851,4087,2105,2697,4363,4227,852,3866,595,4224],"contributors-categories":[13654],"class_list":{"0":"post-20121","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-programing-languages","8":"category-python-development","9":"category-ibkr-quant-news","10":"category-quant-asia-pacific","11":"category-quant-development","12":"category-quant-regions","13":"tag-algo-trading","14":"tag-backpropagation","15":"tag-deep-learning","16":"tag-deep-neural-networks","17":"tag-forward-propagation","18":"tag-gradient-descent","19":"tag-machine-learning","20":"tag-neuron","21":"tag-python","22":"tag-stochastic-gradient-descent","23":"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 v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Neural Network In Python: Introduction, Structure And Trading Strategies \u2013 Part V<\/title>\n<meta name=\"description\" content=\"Backpropagation is an advanced algorithm which enables us to update all the weights in the neural network simultaneously.\" \/>\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\/20121\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Neural Network In Python - Backpropagation - IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"Backpropagation is an advanced algorithm which enables us to update all the weights in the neural network simultaneously.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-01T14:26:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:44:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/10\/quant-tec-02.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1150\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Devang Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Devang Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\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\\\/neural-network-python-backpropagation\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/neural-network-python-backpropagation\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Devang Singh\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/e3e144de3dc01a5e3d3b01449fb26629\"\n\t            },\n\t            \"headline\": \"Neural Network In Python: Introduction, Structure And Trading Strategies \u2013 Part V\",\n\t            \"datePublished\": \"2019-10-01T14:26:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:44:18+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/neural-network-python-backpropagation\\\/\"\n\t            },\n\t            \"wordCount\": 259,\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\\\/neural-network-python-backpropagation\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/10\\\/quant-tec-02.jpg\",\n\t            \"keywords\": [\n\t                \"Algo Trading\",\n\t                \"Backpropagation\",\n\t                \"Deep Learning\",\n\t                \"Deep Neural Networks\",\n\t                \"Forward propagation\",\n\t                \"Gradient Descent\",\n\t                \"Machine Learning\",\n\t                \"Neuron\",\n\t                \"Python\",\n\t                \"Stochastic Gradient Descent\"\n\t            ],\n\t            \"articleSection\": [\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\\\/neural-network-python-backpropagation\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/neural-network-python-backpropagation\\\/\",\n\t            \"name\": \"Neural Network In Python - Backpropagation - 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\\\/neural-network-python-backpropagation\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/neural-network-python-backpropagation\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/10\\\/quant-tec-02.jpg\",\n\t            \"datePublished\": \"2019-10-01T14:26:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:44:18+00:00\",\n\t            \"description\": \"Backpropagation is an advanced algorithm which enables us to update all the weights in the neural network simultaneously.\",\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\\\/neural-network-python-backpropagation\\\/\"\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\\\/neural-network-python-backpropagation\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/10\\\/quant-tec-02.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/10\\\/quant-tec-02.jpg\",\n\t            \"width\": 1150,\n\t            \"height\": 720,\n\t            \"caption\": \"Neural Networks\"\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\\\/e3e144de3dc01a5e3d3b01449fb26629\",\n\t            \"name\": \"Devang Singh\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/devangsingh\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Neural Network In Python: Introduction, Structure And Trading Strategies \u2013 Part V","description":"Backpropagation is an advanced algorithm which enables us to update all the weights in the neural network simultaneously.","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\/20121\/","og_locale":"en_US","og_type":"article","og_title":"Neural Network In Python - Backpropagation - IBKR Quant Blog","og_description":"Backpropagation is an advanced algorithm which enables us to update all the weights in the neural network simultaneously.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/","og_site_name":"IBKR Campus US","article_published_time":"2019-10-01T14:26:00+00:00","article_modified_time":"2022-11-21T14:44:18+00:00","og_image":[{"width":1150,"height":720,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/10\/quant-tec-02.jpg","type":"image\/jpeg"}],"author":"Devang Singh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Devang Singh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/"},"author":{"name":"Devang Singh","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/e3e144de3dc01a5e3d3b01449fb26629"},"headline":"Neural Network In Python: Introduction, Structure And Trading Strategies \u2013 Part V","datePublished":"2019-10-01T14:26:00+00:00","dateModified":"2022-11-21T14:44:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/"},"wordCount":259,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/10\/quant-tec-02.jpg","keywords":["Algo Trading","Backpropagation","Deep Learning","Deep Neural Networks","Forward propagation","Gradient Descent","Machine Learning","Neuron","Python","Stochastic Gradient Descent"],"articleSection":["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\/neural-network-python-backpropagation\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/","name":"Neural Network In Python - Backpropagation - IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/10\/quant-tec-02.jpg","datePublished":"2019-10-01T14:26:00+00:00","dateModified":"2022-11-21T14:44:18+00:00","description":"Backpropagation is an advanced algorithm which enables us to update all the weights in the neural network simultaneously.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/neural-network-python-backpropagation\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/10\/quant-tec-02.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/10\/quant-tec-02.jpg","width":1150,"height":720,"caption":"Neural Networks"},{"@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\/e3e144de3dc01a5e3d3b01449fb26629","name":"Devang Singh","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/devangsingh\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/10\/quant-tec-02.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/20121","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\/251"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=20121"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/20121\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/20117"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=20121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=20121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=20121"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=20121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}