{"id":88238,"date":"2021-05-18T15:36:58","date_gmt":"2021-05-18T19:36:58","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=88238"},"modified":"2022-11-21T09:47:30","modified_gmt":"2022-11-21T14:47:30","slug":"quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/","title":{"rendered":"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn"},"content":{"rendered":"\n<p><em>The article &#8220;<a href=\"https:\/\/www.quantconnect.com\/blog\/idea-streams-2-modeling-unemployment-rates-with-sklearn\/\">Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn<\/a>&#8221; first appeared on QuantConnect. The below is an excerpt.  To watch Jared Broad&#8217;s presentation on this topic visit <a href=\"https:\/\/www.quantconnect.com\/blog\/idea-streams-2-modeling-unemployment-rates-with-sklearn\/\">QuantConnect<\/a>.<\/em><\/p>\n\n\n\n<p>Before the coronavirus hit, the US unemployment rate was at a 50-year low of 3.5%. Then in April 2020,&nbsp;<a href=\"https:\/\/www.reuters.com\/article\/us-health-coronavirus-usa-economy-idUSKCN2280J1\">Reuters reported<\/a>&nbsp;that the US unemployment rate would likely rise to 16% in the next jobs report, a rate approaching the levels seen in the 1930s. In addition to these figures,&nbsp;<a href=\"https:\/\/www.marketwatch.com\/story\/jobless-claims-soar-66-million-in-early-april-as-coronavirus-layoffs-swell-above-15-million-2020-04-09\">MarketWatch reported<\/a>&nbsp;an unprecedented spike in unemployment insurance claims. They noted that \u201cjust a month ago, new claims were in the low 200,000s and sat near a half-century low,\u201d but new claims quickly jumped to 6-7 million per week.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"576\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/unemployment-insurance-claims-figures-1024x576-quantconnect.jpg\" alt=\"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn\" class=\"wp-image-88244 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/unemployment-insurance-claims-figures-1024x576-quantconnect.jpg 1024w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/unemployment-insurance-claims-figures-1024x576-quantconnect-700x394.jpg 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/unemployment-insurance-claims-figures-1024x576-quantconnect-300x169.jpg 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/unemployment-insurance-claims-figures-1024x576-quantconnect-768x432.jpg 768w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; aspect-ratio: 1024\/576;\" \/><\/figure>\n\n\n\n<p>In response to these unusual figures, we wanted to test if there is some sort of factor in these data sets that we could tie to the overall US stock market. So in&nbsp;<a href=\"https:\/\/www.quantconnect.com\/blog\/idea-streams-2-modeling-unemployment-rates-with-sklearn\/\">Idea Streams episode #2<\/a>, we took a look at how the US unemployment rate and the number of unemployment insurance claims influenced the prices of some market indices.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-our-process\">Our Process<\/h3>\n\n\n\n<p>Our analysis started by gathering the&nbsp;<a href=\"https:\/\/fred.stlouisfed.org\/series\/UNRATE\">Unemployment Rate<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/fred.stlouisfed.org\/series\/ICSA\">Initial Claims<\/a>&nbsp;datasets from the Federal Reserve Economic Database. To import these into our research environment, we created two&nbsp;<a href=\"https:\/\/www.quantconnect.com\/docs\/algorithm-reference\/importing-custom-data\">custom data readers<\/a>. We noticed the timestamps in the datasets from FRED were set to the beginning of each period. That is, the unemployment rate for March 2020 wasn\u2019t reported until April 3rd. When it was reported, the data point was timestamped as March 2020. To remove lookahead bias, we designed the custom data readers to move the timestamps forward to approximately the date when the data point would have been reported.<\/p>\n\n\n\n<p>With the data now timestamped to the reporting date, we continued our analysis by training a linear regression model to anticipate the price of SPY using each of the individual data sets from FRED. We trained the models using all of the data points except the last 5. The last 5 data points were saved to test the models out-of-sample. Training and testing the regression models produced the following results. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"817\" height=\"386\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-1.png\" alt=\"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn\" class=\"wp-image-88255 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-1.png 817w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-1-700x331.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-1-300x142.png 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-1-768x363.png 768w\" data-sizes=\"(max-width: 817px) 100vw, 817px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 817px; aspect-ratio: 817\/386;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"811\" height=\"387\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-2.png\" alt=\"\" class=\"wp-image-88256 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-2.png 811w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-2-700x334.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-2-300x143.png 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-2-768x366.png 768w\" data-sizes=\"(max-width: 811px) 100vw, 811px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 811px; aspect-ratio: 811\/387;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"809\" height=\"394\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-3.png\" alt=\"\" class=\"wp-image-88257 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-3.png 809w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-3-700x341.png 700w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-3-300x146.png 300w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/05\/QuantConnect-idea2-3-768x374.png 768w\" data-sizes=\"(max-width: 809px) 100vw, 809px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 809px; aspect-ratio: 809\/394;\" \/><\/figure>\n\n\n\n<p>We saw a higher R-Square on the training data set when using the unemployment rate dataset. The last 5 data points for the employment insurance claims data set were way off the record of what anyone has seen before, so it\u2019s not unexpected that the model produces such a low R-Square value. With the unemployment rate having a higher R-Square value, we select this data set to continue our analysis.<\/p>\n\n\n\n<p>Up until this point, we\u2019ve been using SPY price as the dependent variable in our regression. The articles that inspired this strategy mentioned that the broader market is being held up by AAPL, MSFT, and a few large tech companies. The idea is that larger companies with more cash on their balance sheets would be better handled to weather a recession, so investors might have a \u201cflight to safety\u201d, moving out of stocks that have a relatively worse-off position and into stocks that have a relatively stronger position.<\/p>\n\n\n\n<p>We tested this theory by looking at the latest drawdowns of a large tech company (AAPL), the overall market index (SPY), and a small-cap index (VB). We found the following drawdowns:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>AAPL \u2013 13.8%<\/li><li>SPY \u2013 15.4%<\/li><li>VB \u2013 24.1%<\/li><\/ul>\n\n\n\n<p>In light of this finding, we replaced SPY with VB, retrained the regression model, and found the following R-squared values:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>In-sample: 0.87<\/li><li>Out-of-sample: 0.78<\/li><\/ul>\n\n\n\n<p>We also noticed that the R-square values here were quite sensitive to the adjusted timestamp in the custom data. To get the most realistic results, the actual reporting date of each data point would need to be gathered. Regardless, we deemed our R-square value good enough to continue our experiment with a backtest.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Results<\/h3>\n\n\n\n<p>VB was listed in 2004, so we set the start date of the backtest to January 1, 2005, allowing us to run the strategy through the 2008 crash. The strategy rules are simple: if the unemployment rate is increasing, be invested in VB; otherwise, exit the market until it gets better. Backtesting the strategy resulted in a 44.5% drawdown, a 0.349 Sharpe ratio, and a flat equity curve during the 2008 crash. In contrast, buying and holding VB during the same time period resulted in a 59.6% drawdown and a 0.379 Sharpe ratio. Therefore, in conclusion, using the strategy resulted in a better drawdown but a worse Sharpe ratio.<\/p>\n\n\n\n<p>Visit QuantConnect to read the full article and watch Jared Broad&#8217;s presentation on this topic: <a href=\"https:\/\/www.quantconnect.com\/blog\/idea-streams-2-modeling-unemployment-rates-with-sklearn\/\">https:\/\/www.quantconnect.com\/blog\/idea-streams-2-modeling-unemployment-rates-with-sklearn\/<\/a>.<\/p>\n\n\n\n<p><em>QuantConnect aims to provide an opportunity for a diverse community of brilliant thinkers to learn, show off their skills and do fulfilling work. We nurture a global community of quantitative engineers to build algorithms and contribute to the LEAN code base. The community shapes the technology design and helps bring the project to fruition in our open-source, decentralized, hybrid-cloud environment. <\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>QuantConnect takes a look at how the US unemployment rate and the number of unemployment insurance claims influenced the prices of some market indices. Discover insight on designing custom data readers and learn how they train a linear regression model.<\/p>\n","protected":false},"author":630,"featured_media":38255,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,338,341,352,344],"tags":[851,712,864,4873,9744,9742,5900,9745,8032,9743,9746,5545,6810],"contributors-categories":[13722],"class_list":{"0":"post-88238","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":"category-quant-north-america","11":"category-quant-regions","12":"tag-algo-trading","13":"tag-alpha","14":"tag-api","15":"tag-backtesting","16":"tag-democratizing-finance","17":"tag-lean","18":"tag-open-source","19":"tag-open-source-platform-lean","20":"tag-quantconnect","21":"tag-quantitative-engineers","22":"tag-r-square","23":"tag-sharpe-ratio","24":"tag-sklearn","25":"contributors-categories-quantconnect"},"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>QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn<\/title>\n<meta name=\"description\" content=\"QuantConnect takes a look at how the US unemployment rate and the number of unemployment insurance claims influenced the prices of some market indices....\" \/>\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\/88238\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"QuantConnect takes a look at how the US unemployment rate and the number of unemployment insurance claims influenced the prices of some market indices. Discover insight on designing custom data readers and learn how they train a linear regression model.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-18T19:36:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:47:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/tech-background-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"552\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Derek Melchin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Derek Melchin\" \/>\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\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Derek Melchin\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/14002a99314c9dd3ab1e1ddbb81bc637\"\n\t            },\n\t            \"headline\": \"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn\",\n\t            \"datePublished\": \"2021-05-18T19:36:58+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:47:30+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/\"\n\t            },\n\t            \"wordCount\": 814,\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\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/03\\\/tech-background-1.jpg\",\n\t            \"keywords\": [\n\t                \"Algo Trading\",\n\t                \"alpha\",\n\t                \"API\",\n\t                \"backtesting\",\n\t                \"Democratizing Finance\",\n\t                \"LEAN\",\n\t                \"Open Source\",\n\t                \"open-source platform LEAN\",\n\t                \"QuantConnect\",\n\t                \"Quantitative Engineers\",\n\t                \"R-Square\",\n\t                \"Sharpe Ratio\",\n\t                \"sklearn\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"Quant North America\",\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\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/\",\n\t            \"name\": \"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn | 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\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/03\\\/tech-background-1.jpg\",\n\t            \"datePublished\": \"2021-05-18T19:36:58+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:47:30+00:00\",\n\t            \"description\": \"QuantConnect takes a look at how the US unemployment rate and the number of unemployment insurance claims influenced the prices of some market indices. Discover insight on designing custom data readers and learn how they train a linear regression model.\",\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\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/\"\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\\\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/03\\\/tech-background-1.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/03\\\/tech-background-1.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 552,\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\\\/14002a99314c9dd3ab1e1ddbb81bc637\",\n\t            \"name\": \"Derek Melchin\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/derekmelchin\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn","description":"QuantConnect takes a look at how the US unemployment rate and the number of unemployment insurance claims influenced the prices of some market indices....","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\/88238\/","og_locale":"en_US","og_type":"article","og_title":"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn | IBKR Quant Blog","og_description":"QuantConnect takes a look at how the US unemployment rate and the number of unemployment insurance claims influenced the prices of some market indices. Discover insight on designing custom data readers and learn how they train a linear regression model.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/","og_site_name":"IBKR Campus US","article_published_time":"2021-05-18T19:36:58+00:00","article_modified_time":"2022-11-21T14:47:30+00:00","og_image":[{"width":900,"height":552,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/tech-background-1.jpg","type":"image\/jpeg"}],"author":"Derek Melchin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Derek Melchin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/"},"author":{"name":"Derek Melchin","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/14002a99314c9dd3ab1e1ddbb81bc637"},"headline":"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn","datePublished":"2021-05-18T19:36:58+00:00","dateModified":"2022-11-21T14:47:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/"},"wordCount":814,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/tech-background-1.jpg","keywords":["Algo Trading","alpha","API","backtesting","Democratizing Finance","LEAN","Open Source","open-source platform LEAN","QuantConnect","Quantitative Engineers","R-Square","Sharpe Ratio","sklearn"],"articleSection":["Data Science","Quant","Quant Development","Quant North America","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/","name":"QuantConnect Idea Streams #2 \u2013 Modeling Unemployment Rates with SKLearn | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/tech-background-1.jpg","datePublished":"2021-05-18T19:36:58+00:00","dateModified":"2022-11-21T14:47:30+00:00","description":"QuantConnect takes a look at how the US unemployment rate and the number of unemployment insurance claims influenced the prices of some market indices. Discover insight on designing custom data readers and learn how they train a linear regression model.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/quantconnect-idea-streams-2-modeling-unemployment-rates-with-sklearn\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/tech-background-1.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/tech-background-1.jpg","width":900,"height":552,"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\/14002a99314c9dd3ab1e1ddbb81bc637","name":"Derek Melchin","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/derekmelchin\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/03\/tech-background-1.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/88238","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\/630"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=88238"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/88238\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/38255"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=88238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=88238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=88238"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=88238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}