{"id":196677,"date":"2023-09-25T11:00:14","date_gmt":"2023-09-25T15:00:14","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=196677"},"modified":"2024-05-20T15:23:27","modified_gmt":"2024-05-20T19:23:27","slug":"machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/","title":{"rendered":"Machine Learning for Algorithmic Trading in Python: A Complete Guide &#8211; Part III"},"content":{"rendered":"\n<p><em>See&nbsp;<a href=\"\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-i\/\">Part I<\/a>&nbsp;for an overview and <a href=\"\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-ii\/\">Part II<\/a> for creating hyperparameters.<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"splitting-the-data-into-test-and-train-sets\">Splitting the data into test and train sets<\/h3>\n\n\n\n<p>First, let us split the data into the input values and the prediction values. Here we pass on the OHLC data with one day lag as the data frame X and the Close values of the current day as y. Note the column names below in lower-case.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">X = df[['open','high','low','close']]\ny = df['Close']<\/pre>\n\n\n\n<p><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/c862197d9b2a1bbe0151961bcf340d21#file-test_traind_data-py\">Test_traind_data.py&nbsp;<\/a>hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n\n\n\n<p>In this example, to keep the machine learning for algorithmic trading with Python tutorial short and relevant, I have chosen not to create any polynomial features but to use only the raw data.<\/p>\n\n\n\n<p>If you are interested in various combinations of the input parameters and with higher degree polynomial features, you are free to transform the data using the PolynomialFeature() function from the preprocessing package of scikit learn.<\/p>\n\n\n\n<p>You can find detailed information in Quantra course on Python for Machine Learning in Finance.<\/p>\n\n\n\n<p>Now, let us also create a dictionary that holds the size of the train data set and its corresponding average prediction error.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">avg_err={}<\/pre>\n\n\n\n<p><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/045f4b559fece8864345110606571fd6#file-average_error-py\">Average_error.py&nbsp;<\/a>hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"getting-the-best-fit-parameters-to-create-a-new-function\">Getting the best-fit parameters to create a new function<\/h3>\n\n\n\n<p>I want to measure the performance of the regression function as compared to the size of the input dataset. In other words, I want to see if, by increasing the input data, we will be able to reduce the error. For this, I used for loop to iterate over the same data set but with different lengths.<\/p>\n\n\n\n<p>At this point, I would like to add that for those of you who are interested, explore the \u2018reset\u2019 function and how it will help us make a more reliable prediction.<\/p>\n\n\n\n<p>(Hint: It is a part of the Python magic commands)<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import numpy as np\nfrom sklearn.linear_model import Lasso\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.impute import SimpleImputer\n\nimp = SimpleImputer()\n\nfor t in np.arange(50, 97, 3):\n    split = int(t * len(X) \/ 100)\n    reg = GridSearchCV(estimator=Lasso(), param_grid={'alpha': [0.1, 0.5, 1.0], 'max_iter': [1000, 2000, 5000]})\n    reg.fit(X[:split], y[:split])\n    best_alpha = reg.best_params_['alpha']\n    best_iter = reg.best_params_['max_iter']\n    reg1 = Lasso(alpha=best_alpha, max_iter=best_iter)\n    X = imp.fit_transform(X, y)\n    reg1.fit(X[:split], y[:split])<\/pre>\n\n\n\n<p><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/3e6f44b54ef855bcf2122018c0ae2cef#file-best_fit_parameters-py\">Best_fit_parameters.py&nbsp;<\/a>hosted with \u2764 by&nbsp;<a href=\"https:\/\/github.com\/\">GitHub<\/a><\/p>\n\n\n\n<p>Let me explain what I did in a few steps.<\/p>\n\n\n\n<p>First, I created a set of periodic numbers \u2018t\u2019 starting from 50 to 97, in steps of 3. The purpose of these numbers is to choose the percentage size of the dataset that will be used as the train data set.<\/p>\n\n\n\n<p>Second, for a given value of \u2018t\u2019, I split the length of the data set to the nearest integer corresponding to this percentage. Then I divided the total data into train data, which includes the data from the beginning till the split, and test data, which includes the data from the split till the end. The reason for adopting this approach and not using the random split is to maintain the continuity of the time series.<\/p>\n\n\n\n<p>After this, we pull the best parameters that generated the lowest cross-validation error and then use these parameters to create a new reg1 function, a simple Lasso regression fit with the best parameters.<\/p>\n\n\n\n<p><em>Stay tuned for the next installment in this series for more details on how test and train the algo.<\/em><\/p>\n\n\n\n<p><em>Originally posted on&nbsp;<a href=\"https:\/\/blog.quantinsti.com\/trading-using-machine-learning-python\/\">QuantInsti<\/a>&nbsp;Blog.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>First, I created a set of periodic numbers \u2018t\u2019 starting from 50 to 97, in steps of 3. The purpose of these numbers is to choose the percentage size of the dataset that will be used as the train data set.<\/p>\n","protected":false},"author":186,"featured_media":168970,"comment_status":"open","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":true,"footnotes":""},"categories":[339,343,349,338,341],"tags":[851,827,852,15989,1225,595,10883,4412,924],"contributors-categories":[13654],"class_list":{"0":"post-196677","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-python-development","10":"category-ibkr-quant-news","11":"category-quant-development","12":"tag-algo-trading","13":"tag-keras","14":"tag-machine-learning","15":"tag-nltk","16":"tag-numpy","17":"tag-python","18":"tag-pytorch","19":"tag-scikit-learn","20":"tag-tensorflow","21":"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.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Machine Learning for Algorithmic Trading in Python: A Complete Guide &#8211; Part III<\/title>\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\/196677\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Machine Learning for Algorithmic Trading in Python: A Complete Guide - Part III | IBKR Campus US\" \/>\n<meta property=\"og:description\" content=\"First, I created a set of periodic numbers \u2018t\u2019 starting from 50 to 97, in steps of 3. The purpose of these numbers is to choose the percentage size of the dataset that will be used as the train data set.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-25T15:00:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-20T19:23:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/11\/machine-learning-1.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=\"Contributor Author\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Contributor Author\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 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\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Contributor Author\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/e823e46b42ca381080387e794318a485\"\n\t            },\n\t            \"headline\": \"Machine Learning for Algorithmic Trading in Python: A Complete Guide &#8211; Part III\",\n\t            \"datePublished\": \"2023-09-25T15:00:14+00:00\",\n\t            \"dateModified\": \"2024-05-20T19:23:27+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/\"\n\t            },\n\t            \"wordCount\": 506,\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\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/11\\\/machine-learning-1.jpg\",\n\t            \"keywords\": [\n\t                \"Algo Trading\",\n\t                \"Keras\",\n\t                \"Machine Learning\",\n\t                \"NLTK\",\n\t                \"NumPy\",\n\t                \"Python\",\n\t                \"PyTorch\",\n\t                \"Scikit-learn\",\n\t                \"TensorFlow\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\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\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/#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\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/\",\n\t            \"name\": \"Machine Learning for Algorithmic Trading in Python: A Complete Guide - Part III | 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\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/11\\\/machine-learning-1.jpg\",\n\t            \"datePublished\": \"2023-09-25T15:00:14+00:00\",\n\t            \"dateModified\": \"2024-05-20T19:23:27+00:00\",\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\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/\"\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\\\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/11\\\/machine-learning-1.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/11\\\/machine-learning-1.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 550,\n\t            \"caption\": \"Machine learning\"\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\\\/e823e46b42ca381080387e794318a485\",\n\t            \"name\": \"Contributor Author\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/contributor-author\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Machine Learning for Algorithmic Trading in Python: A Complete Guide &#8211; Part III","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\/196677\/","og_locale":"en_US","og_type":"article","og_title":"Machine Learning for Algorithmic Trading in Python: A Complete Guide - Part III | IBKR Campus US","og_description":"First, I created a set of periodic numbers \u2018t\u2019 starting from 50 to 97, in steps of 3. The purpose of these numbers is to choose the percentage size of the dataset that will be used as the train data set.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/","og_site_name":"IBKR Campus US","article_published_time":"2023-09-25T15:00:14+00:00","article_modified_time":"2024-05-20T19:23:27+00:00","og_image":[{"width":900,"height":550,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/11\/machine-learning-1.jpg","type":"image\/jpeg"}],"author":"Contributor Author","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Contributor Author","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/"},"author":{"name":"Contributor Author","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/e823e46b42ca381080387e794318a485"},"headline":"Machine Learning for Algorithmic Trading in Python: A Complete Guide &#8211; Part III","datePublished":"2023-09-25T15:00:14+00:00","dateModified":"2024-05-20T19:23:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/"},"wordCount":506,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/11\/machine-learning-1.jpg","keywords":["Algo Trading","Keras","Machine Learning","NLTK","NumPy","Python","PyTorch","Scikit-learn","TensorFlow"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/","name":"Machine Learning for Algorithmic Trading in Python: A Complete Guide - Part III | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/11\/machine-learning-1.jpg","datePublished":"2023-09-25T15:00:14+00:00","dateModified":"2024-05-20T19:23:27+00:00","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/machine-learning-for-algorithmic-trading-in-python-a-complete-guide-part-iii\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/11\/machine-learning-1.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/11\/machine-learning-1.jpg","width":900,"height":550,"caption":"Machine learning"},{"@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\/e823e46b42ca381080387e794318a485","name":"Contributor Author","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/contributor-author\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2022\/11\/machine-learning-1.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/196677","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\/186"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=196677"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/196677\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/168970"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=196677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=196677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=196677"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=196677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}