{"id":97918,"date":"2021-08-05T14:12:00","date_gmt":"2021-08-05T18:12:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=97918"},"modified":"2022-11-21T09:47:50","modified_gmt":"2022-11-21T14:47:50","slug":"stock-market-data-and-analysis-in-python-part-ii","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/","title":{"rendered":"Stock Market Data And Analysis In Python \u2013 Part II"},"content":{"rendered":"\n<p><em>See <a href=\"\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-i\/\">Part I<\/a> for instructions on how to get <code>pandas_datareader<\/code>&nbsp;or&nbsp;<code>yfinance<\/code>&nbsp;module to retrieve the data.&nbsp;<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-get-stock-market-data-for-different-geographies\">How to get Stock Market Data for different geographies?<\/h2>\n\n\n\n<p>To get stock market data for different geographies, search the ticker symbol on Yahoo finance and use that as the ticker<\/p>\n\n\n\n<p><strong>Get stock market data for multiple tickers<\/strong><\/p>\n\n\n\n<p>To get the stock market data of multiple stock tickers, you can create a list of tickers and call the&nbsp;<strong>yfinance download method<\/strong>&nbsp;for each stock ticker.<br><br>For simplicity, I have created a dataframe&nbsp;<code>data<\/code>&nbsp;to store the adjusted close price of the stocks.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Import packages\nimport yfinance as yf\nimport pandas as pd\n\n# Set the start and end date\nstart_date = '1990-01-01'\nend_date = '2021-07-12'\n\n# Define the ticker list\ntickers_list = &#91;'AAPL', 'IBM', 'MSFT', 'WMT']\n\n# Create placeholder for data\ndata = pd.DataFrame(columns=tickers_list)\n\n# Fetch the data\nfor ticker in tickers_list:\n    data&#91;ticker] = yf.download(ticker, \n                               start_date,\n                               end_date)&#91;'Adj Close']\n    \n# Print first 5 rows of the data\ndata.head()\n\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/ebebf9175ea7f3b70eeb62f7200e91a6#file-multiple_tickers_data-py\">multiple_tickers_data.py<\/a> hosted with \u2764 by <a href=\"https:\/\/github.com\/\">GitHub<\/a><\/code><\/pre><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image img-twothird\"><img decoding=\"async\" width=\"448\" height=\"255\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/multiple-data-tickers-quantinsti.png\" alt=\"\" class=\"wp-image-97928 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/multiple-data-tickers-quantinsti.png 448w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/multiple-data-tickers-quantinsti-300x171.png 300w\" data-sizes=\"(max-width: 448px) 100vw, 448px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 448px; aspect-ratio: 448\/255;\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Plot all the close prices\ndata.plot(figsize=(10, 7))\n\n# Show the legend\nplt.legend()\n\n# Define the label for the title of the figure\nplt.title(\"Adjusted Close Price\", fontsize=16)\n\n# Define the labels for x-axis and y-axis\nplt.ylabel('Price', fontsize=14)\nplt.xlabel('Year', fontsize=14)\n\n# Plot the grid lines\nplt.grid(which=\"major\", color='k', linestyle='-.', linewidth=0.5)\nplt.show()\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code><a href=\"https:\/\/gist.github.com\/quantra-go-algo\/b7a834802a177a6626b6d43fa3fe8d93#file-plot_multiple_tickers_data-py\">plot_multiple_tickers_data.py<\/a> hosted with \u2764 by <a href=\"https:\/\/github.com\/\">GitHub<\/a><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"616\" height=\"421\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/multiple-data-tickers-quantinsti-2.png\" alt=\"\" class=\"wp-image-97933 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/multiple-data-tickers-quantinsti-2.png 616w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2021\/08\/multiple-data-tickers-quantinsti-2-300x205.png 300w\" data-sizes=\"(max-width: 616px) 100vw, 616px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 616px; aspect-ratio: 616\/421;\" \/><\/figure>\n\n\n\n<p><em>Stay tuned for next installment in which Ishan Shah will show how to analyze the stock market data for all the stocks which make up S&amp;P 500.<\/em><\/p>\n\n\n\n<p><em>See&nbsp;<a href=\"https:\/\/blog.quantinsti.com\/stock-market-data-analysis-python\/\">https:\/\/blog.quantinsti.com\/stock-market-data-analysis-python\/<\/a>&nbsp;for additional insight on this topic.<\/em><\/p>\n\n\n\n<p><em>Past performance is not indicative of future results.<\/em><\/p>\n\n\n\n<p><em>Any stock, options or futures symbols displayed are for illustrative purposes only and are not intended to portray recommendations.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To get the stock market data of multiple stock tickers, you can create a list of tickers and call the yfinance download method for each stock ticker.<\/p>\n","protected":false},"author":517,"featured_media":36684,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,343,349,338,350,341,344],"tags":[10057,865,10053,6614,4659,10104,1224,10054,10056,10055,10103],"contributors-categories":[13654],"class_list":{"0":"post-97918","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-asia-pacific","12":"category-quant-development","13":"category-quant-regions","14":"tag-amazon_data-py","15":"tag-github","16":"tag-install-yfinance","17":"tag-jupyter-notebook","18":"tag-matplotlib","19":"tag-multiple_tickers_data-py","20":"tag-pandas","21":"tag-pandas_datareader","22":"tag-plot_amazn_data-py","23":"tag-plot_amzn_data_with_grids-py","24":"tag-rawplot_multiple_tickers_data-py","25":"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>Stock Market Data And Analysis In Python \u2013 Part II<\/title>\n<meta name=\"description\" content=\"To get the stock market data of multiple stock tickers, you can create a list of tickers and call the yfinance download method for each stock ticker.\" \/>\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\/97918\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Stock Market Data And Analysis In Python \u2013 Part II | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"To get the stock market data of multiple stock tickers, you can create a list of tickers and call the yfinance download method for each stock ticker.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-05T18:12:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:47:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/digits-numbers-tech.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\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\\\/stock-market-data-and-analysis-in-python-part-ii\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/stock-market-data-and-analysis-in-python-part-ii\\\/\"\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\": \"Stock Market Data And Analysis In Python \u2013 Part II\",\n\t            \"datePublished\": \"2021-08-05T18:12:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:47:50+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/stock-market-data-and-analysis-in-python-part-ii\\\/\"\n\t            },\n\t            \"wordCount\": 181,\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\\\/stock-market-data-and-analysis-in-python-part-ii\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/02\\\/digits-numbers-tech.jpg\",\n\t            \"keywords\": [\n\t                \"amazon_data.py\",\n\t                \"GitHub\",\n\t                \"install yfinance\",\n\t                \"Jupyter Notebook\",\n\t                \"Matplotlib\",\n\t                \"multiple_tickers_data.py\",\n\t                \"Pandas\",\n\t                \"pandas_datareader\",\n\t                \"plot_amazn_data.py\",\n\t                \"plot_amzn_data_with_grids.py\",\n\t                \"rawplot_multiple_tickers_data.py\"\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\\\/stock-market-data-and-analysis-in-python-part-ii\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/stock-market-data-and-analysis-in-python-part-ii\\\/\",\n\t            \"name\": \"Stock Market Data And Analysis In Python \u2013 Part II | 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\\\/stock-market-data-and-analysis-in-python-part-ii\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/stock-market-data-and-analysis-in-python-part-ii\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/02\\\/digits-numbers-tech.jpg\",\n\t            \"datePublished\": \"2021-08-05T18:12:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:47:50+00:00\",\n\t            \"description\": \"To get the stock market data of multiple stock tickers, you can create a list of tickers and call the yfinance download method for each stock ticker.\",\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\\\/stock-market-data-and-analysis-in-python-part-ii\\\/\"\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\\\/stock-market-data-and-analysis-in-python-part-ii\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/02\\\/digits-numbers-tech.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/02\\\/digits-numbers-tech.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 540,\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":"Stock Market Data And Analysis In Python \u2013 Part II","description":"To get the stock market data of multiple stock tickers, you can create a list of tickers and call the yfinance download method for each stock ticker.","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\/97918\/","og_locale":"en_US","og_type":"article","og_title":"Stock Market Data And Analysis In Python \u2013 Part II | IBKR Quant Blog","og_description":"To get the stock market data of multiple stock tickers, you can create a list of tickers and call the yfinance download method for each stock ticker.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/","og_site_name":"IBKR Campus US","article_published_time":"2021-08-05T18:12:00+00:00","article_modified_time":"2022-11-21T14:47:50+00:00","og_image":[{"width":900,"height":540,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/digits-numbers-tech.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\/stock-market-data-and-analysis-in-python-part-ii\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/"},"author":{"name":"Ishan Shah","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/0fd7dbae1e070042c10b53e8bdc551c5"},"headline":"Stock Market Data And Analysis In Python \u2013 Part II","datePublished":"2021-08-05T18:12:00+00:00","dateModified":"2022-11-21T14:47:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/"},"wordCount":181,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/digits-numbers-tech.jpg","keywords":["amazon_data.py","GitHub","install yfinance","Jupyter Notebook","Matplotlib","multiple_tickers_data.py","Pandas","pandas_datareader","plot_amazn_data.py","plot_amzn_data_with_grids.py","rawplot_multiple_tickers_data.py"],"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\/stock-market-data-and-analysis-in-python-part-ii\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/","name":"Stock Market Data And Analysis In Python \u2013 Part II | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/digits-numbers-tech.jpg","datePublished":"2021-08-05T18:12:00+00:00","dateModified":"2022-11-21T14:47:50+00:00","description":"To get the stock market data of multiple stock tickers, you can create a list of tickers and call the yfinance download method for each stock ticker.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/stock-market-data-and-analysis-in-python-part-ii\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/digits-numbers-tech.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/02\/digits-numbers-tech.jpg","width":900,"height":540,"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\/02\/digits-numbers-tech.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/97918","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=97918"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/97918\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/36684"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=97918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=97918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=97918"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=97918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}