{"id":4294,"date":"2023-12-18T16:53:59","date_gmt":"2023-12-18T16:53:59","guid":{"rendered":"https:\/\/eodhd.com\/financial-academy\/?p=4294"},"modified":"2025-02-05T14:17:46","modified_gmt":"2025-02-05T14:17:46","slug":"how-to-create-a-stock-market-heatmap-in-python","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python","title":{"rendered":"How to Create a Stock Market Heatmap in Python"},"content":{"rendered":"\n<p>This article will demonstrate how to create a stock market heatmap in Python. The concept is to look for a correlation between stock market tickers that are in a Bullish or Bearish state and their Return. The SMA50\/SMA200 will be used to determine the market state. If the SMA50 is above the SMA200, the market is in a Bullish state, otherwise it&#8217;s Bearish. The Return is calculated by subtracting the previous closing price from the current closing price, then dividing it by the previous closing price, and multiplying it by 100.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-gathering-and-preprocessing-our-data\">Gathering and Preprocessing our data<\/h2>\n\n\n\n<p><a href=\"https:\/\/eodhd.com\/pricing\" target=\"_blank\" rel=\"noreferrer noopener\">EODHD API&#8217;s<\/a> will be able to provide the historical data we need, but which stock market tickers shall we use? The S&amp;P 500 index has slightly over 500 companies in it as some companies have more than one share type. There is a list of these companies on <a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_S%26P_500_companies\" target=\"_blank\" rel=\"noreferrer noopener\">Wikipedia<\/a>. I wrote some Python code to data scrape this page and extract the list of company codes and create a list.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-f658d9652494f060c1eb448fcd1c5e64\"><code lang=\"python\" class=\"language-python\">import requests\nimport pandas as pd\nfrom io import StringIO\n\ndef get_sp500_tickers():\n    url = \"https:\/\/en.wikipedia.org\/wiki\/List_of_S%26P_500_companies\"\n    html = requests.get(url).text\n    data = StringIO(html)\n    df = pd.read_html(data, header=0)[0]\n    tickers = df[\"Symbol\"].tolist()\n    return tickers\n\nsp500_tickers = get_sp500_tickers()\nprint(sp500_tickers)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>With this list of company codes in the S&amp;P 500, we now want to cross check this against the list of US markets on EODHD APIs to make sure all the markets we need are there. We want the output to be a Python list. In the code below, I&#8217;m importing my API_KEY from config.py. <\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-12a051ac48eb9108b3c055fb94ba61eb\"><code lang=\"python\" class=\"language-python\">import config as cfg\nfrom eodhd import APIClient\n\napi = APIClient(cfg.API_KEY)\n\ndf_symbols = api.get_exchange_symbols(\"US\")\neodhd_tickers = df_symbols[\"Code\"].tolist()\nprint(eodhd_tickers)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<p>Now that we have the two lists we want to do a quick check to make sure it all looks fine to proceed.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-e7ea439e2039a3cbedfe39731997ff0d\"><code lang=\"python\" class=\"language-python\">for sp500_ticker in sp500_tickers:\n    if sp500_ticker not in eodhd_tickers:\n        print(\"Missing: \", sp500_ticker)\n    else:\n        print(\"Found: \", sp500_ticker)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>You will notice that there are a couple of tickers that are not found but it&#8217;s unimportant as they are some of the &#8220;B&#8221; shares from some of the companies that are listed more than once in the S&amp;P 500 index. We can ignore those. The most important outcome is to have our list of 500 companies, which we do.<\/p>\n\n\n\n<p>The next step is we want to extend the code for &#8220;<strong>Found<\/strong>&#8221; companies and retrieve the historical data for each company. I have limited this to the last 200 daily candles. I then applied the SMA50\/SMA200 to the market historical data to determine the Bullish or Bearish state. I also calculated the Return as mentioned in the beginning of the article. For each market we retrieve and process we want to append the results to a file called &#8220;<strong>sp500.csv<\/strong>&#8220;.  Create the empty file and manually add the heading, &#8220;<strong>Stock Symbol,Date,Closing Price, Market State, Return<\/strong>&#8220;.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-be0ed119dab724d4de79fd86010c4291\"><code lang=\"python\" class=\"language-python\">def calculate_technical_indicators(df):\n    df_ta = df.copy()\n    df_ta[\"sma50\"] = df_ta[\"close\"].rolling(50, min_periods=0).mean()\n    df_ta[\"sma200\"] = df_ta[\"close\"].rolling(200, min_periods=0).mean()\n    df_ta[\"bull\"] = df_ta.sma50 &gt; df_ta.sma200\n    return df_ta\n\nfor sp500_ticker in sp500_tickers:\n    if sp500_ticker not in eodhd_tickers:\n        print(\"Missing: \", sp500_ticker)\n    else:\n        print(\"Found: \", sp500_ticker)\n\n        df_ticker_history = api.get_historical_data(\n            f\"{sp500_ticker}.US\", \"d\", results=200\n        )\n        df_ticker_history_ta = calculate_technical_indicators(df_ticker_history)\n        df_ticker_history_ta[\"date\"] = df_ticker_history_ta.index\n\n        df_result = df_ticker_history_ta[[\"symbol\", \"date\", \"close\", \"bull\"]].copy()\n        df_result.columns = [\"Stock Symbol\", \"Date\", \"Closing Price\", \"Market State\"]\n\n        df_result.loc[:, \"Return\"] = (\n            (df_result[\"Closing Price\"] - df_result[\"Closing Price\"].shift(1))\n            \/ df_result[\"Closing Price\"].shift(1)\n        ) * 100\n\n        df_result.loc[:, \"Market State\"] = df_result[\"Market State\"].apply(\n            lambda x: \"Bullish\" if x else \"Bearish\"\n        )\n\n        df_result.loc[:, \"Return\"] = df_result[\"Return\"].fillna(0)\n        df_result.loc[:, \"Stock Symbol\"] = df_result[\"Stock Symbol\"].str.replace(\".US\", \"\")\n\n        print(df_result.to_csv(\"sp500.csv\", mode=\"a\", index=False, header=False))<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>When this completes we will be left with a &#8220;<strong>sp500.csv<\/strong>&#8221; file that looks like this&#8230;<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-vivid-cyan-blue-background-color has-text-color has-background has-link-color wp-elements-b0eb149aa75f817be0011d67fe9eca7e\"><code lang=\"python\" class=\"language-python\">Stock Symbol,Date,Closing Price, Market State, Return\nMMM,2023-06-02,102.53,Bearish,0.0\nMMM,2023-06-05,97.98,Bearish,-4.437725543743292\nMMM,2023-06-06,98.29,Bearish,0.3163911002245379\nMMM,2023-06-07,101.0,Bearish,2.7571472174178386\n...<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>My file has 68558 lines, including the header.<\/p>\n\n\n\n<p>High-quality data is essential for generating accurate and insightful visualizations. Poor data quality can lead to misleading results, which can negatively impact decision-making. Ensuring that you use reliable data sources is crucial to the success of your analysis.<\/p>\n\n\n\n<p class=\"has-text-align-center bordered_paragraph has-background\" style=\"background-color:#edf1f2;font-size:16px;font-style:normal;font-weight:500\">Learn more about data reliability in our detailed comparison:<br><a href=\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/reliability-of-free-stock-data\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>Free vs Paid Stock Data: Which One Can You Trust?<\/strong><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-correlation-matrix\">Correlation Matrix<\/h2>\n\n\n\n<p>In order to create our stock market heatmap, we will first need to import our data into a Pandas dataframe and create ourselves a pivot table that will be used to create our correlation matrix.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-03974734f64ae341095220ac68a5795e\"><code lang=\"python\" class=\"language-python\">df = pd.read_csv(\"sp500.csv\")\nprint(df)\n\npivoted_df = df.pivot(index=\"Date\", columns=\"Stock Symbol\", values=\"Closing Price\")\nprint(pivoted_df)\n\ncorr_matrix = pivoted_df.corr()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<h2 class=\"wp-block-heading\" id=\"h-stock-market-heatmaps\">Stock Market Heatmaps<\/h2>\n\n\n\n<p>Before I continue, I just want to warn you that creating a correlation matrix of this size won&#8217;t be pretty. In fact, &#8220;<strong>out the box<\/strong>&#8220;, it will be almost impossible to interpret and read. It will however form our starting point, so I&#8217;ll show you how to create a basic stock market heatmap. You will need to install the Python library &#8220;<strong>seaborn<\/strong>&#8221; if you haven&#8217;t already done so.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-42efe7416e0e544532975380efe14db4\"><code lang=\"python\" class=\"language-python\">import seaborn as sns\n\nplt.figure(figsize=(16, 16))\nsns.heatmap(corr_matrix, annot=True, cmap=\"coolwarm\")\nplt.title(\"Heatmap of Stock Price Correlations\")\nplt.savefig(\"heatmap-full.png\")\nplt.tight_layout()\nplt.show()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1274\" height=\"1374\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/heatmap-full-1.png\" alt=\"\" class=\"wp-image-4300\"\/><figcaption class=\"wp-element-caption\">Image by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>There are a number of ways we can try and improve this. The first method would be to add a threshold for the correlation. For example 0.8, but you can experiment to find the right balance.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-a0630a040dc3c0ca72c19e2b4955eee0\"><code lang=\"python\" class=\"language-python\">threshold = 0.8\nhigh_corr = corr_matrix[(corr_matrix &gt;= threshold) &amp; (corr_matrix &lt; 1)]\n\nplt.figure(figsize=(16, 16))\nsns.heatmap(high_corr, annot=True, cmap=\"coolwarm\")\nplt.title(\"Heatmap of Stock Price Correlations\")\nplt.savefig(\"heatmap-0.8.png\")\nplt.tight_layout()\nplt.show()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1272\" height=\"1360\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/heatmap-0.8-1.png\" alt=\"\" class=\"wp-image-4302\"\/><figcaption class=\"wp-element-caption\">Image by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>It&#8217;s difficult to tell from this image, but there is an improvement. Not enough for it to warrant spending more time on this option. You may be able to get more of an improvement by adjusting the threshold further but it&#8217;s better to take a look at he next option.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-clustermap\">Clustermap<\/h2>\n\n\n\n<p>A cluster map does provide an alternative to the heat map and does look visually a lot better.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-9b35f49df7e8997335a5afa037f9c5e6\"><code lang=\"python\" class=\"language-python\">plt.figure(figsize=(16, 16))\nsns.clustermap(corr_matrix, cmap=\"coolwarm\")\nplt.title(\"Cluster Map of Stock Price Correlations\")\nplt.savefig(\"clustermap.png\")\nplt.tight_layout()\nplt.show()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"1000\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png\" alt=\"\" class=\"wp-image-4303\"\/><figcaption class=\"wp-element-caption\">Image by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>This is showing markets that are highly correlated in a warm red and lower correlated in a cooler blue.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-top-n-stock-market-heatmap\">Top n Stock Market Heatmap<\/h2>\n\n\n\n<p>An alternative headmap approach would be to plot the top 50.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-8a01a7bebe46dcbd2a735a7bfdce338e\"><code lang=\"python\" class=\"language-python\">def get_top_n_correlations(corr_matrix, n):\n    c = corr_matrix.abs().stack()\n    return c[c &lt; 1].sort_values(ascending=False).drop_duplicates().head(n)\n\ntop_n = get_top_n_correlations(corr_matrix, 50)\n\ntop_pairs = pd.DataFrame(list(top_n.index), columns=[\"Stock 1\", \"Stock 2\"])\ntop_pairs[\"Correlation\"] = top_n.values\n\ntop_pairs_pivot = top_pairs.pivot(\n    index=\"Stock 1\", columns=\"Stock 2\", values=\"Correlation\"\n)\n\nplt.figure(figsize=(16, 16))\nsns.heatmap(top_pairs_pivot, annot=True, cmap=\"coolwarm\")\nplt.title(\"Cluster Map of Stock Price Correlations\")\nplt.savefig(\"top_n_heatmap.png\")\nplt.tight_layout()\nplt.show()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1309\" height=\"1385\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/top_n_heatmap-2.png\" alt=\"\" class=\"wp-image-4306\"\/><figcaption class=\"wp-element-caption\">Image by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<p>This representation is by far the easiest to read and interpret.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-stock-market-heatmap-by-industry\">Stock Market Heatmap by Industry<\/h2>\n\n\n\n<p>When we look at finding correlations between a large number of stock market tickers, it can become chaotic quickly. My preferred approach is to group the markets by Sector, and find the correlations by Sector.<\/p>\n\n\n\n<p>On the Wikipedia page I linked earlier, I used &#8220;Symbol&#8221; to generate a list of stock market tickers in the S&amp;P 500. You may have noticed that there were two additional columns of interest, &#8220;<strong>GICS Sector<\/strong>&#8221; and &#8220;<strong>GICS Sub-Industry<\/strong>&#8220;. The following Python code will create a mapping dictionary to map a &#8220;<strong>Symbol<\/strong>&#8221; with an &#8220;<strong>Sector<\/strong>&#8220;.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-acbd8472931fef4c220ddad7dce91cff\"><code lang=\"python\" class=\"language-python\">def sp500_sector_mapping():\n    url = \"https:\/\/en.wikipedia.org\/wiki\/List_of_S%26P_500_companies\"\n    html = requests.get(url).text\n    data = StringIO(html)\n    df = pd.read_html(data, header=0)[0]\n    ticker_meta = df[[\n        \"Symbol\",\n        \"GICS Sector\"\n        # \"GICS Sub-Industry\"\n    ]].to_dict(orient='records')\n\n    mapping_dict = {}\n    for ticker in ticker_meta:\n        mapping_dict[ticker[\"Symbol\"]] = ticker[\"GICS Sector\"]\n\n    return mapping_dict\n\nsector_mapping = sp500_sector_mapping()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Then using this code will now map the correlation between sectors represented as a stock market heatmap.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-4a3711c68981b4d551170ebbbe50d388\"><code lang=\"python\" class=\"language-python\">mapped_sectors = corr_matrix.columns.map(sector_mapping)\nmean_corr_by_sector = (\n    corr_matrix.groupby(mapped_sectors).mean().groupby(mapped_sectors, axis=1).mean()\n)\n\nplt.figure(figsize=(16, 16))\nsns.heatmap(mean_corr_by_sector, annot=True, cmap=\"coolwarm\")\nplt.title(\"Heatmap of Stock Price Sector Correlations\")\nplt.savefig(\"heatmap_sector.png\")\nplt.tight_layout()\nplt.show()<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1367\" height=\"1450\" src=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/heatmap_sector.png\" alt=\"\" class=\"wp-image-4309\"\/><figcaption class=\"wp-element-caption\">Image by Author<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>I have provided a variety of techniques to demonstrate stock market heat maps in Python. I also included an introduction into website data scraping and cluster maps.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Register &amp; Get Data<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article will demonstrate how to create a stock market heatmap in Python. The concept is to look for a correlation between stock market tickers that are in a Bullish or Bearish state and their Return. The SMA50\/SMA200 will be used to determine the market state. If the SMA50 is above the SMA200, the market [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":4303,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"coding-language":[30],"ready-to-go-solution":[56],"qualification":[31],"financial-apis-category":[36],"financial-apis-manuals":[39],"class_list":["post-4294","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fundamental-analysis-examples","coding-language-python","ready-to-go-solution-eodhd-python-financial-library","qualification-experienced","financial-apis-category-stock-market-prices","financial-apis-manuals-end-of-day","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.9 (Yoast SEO v26.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create a Stock Market Heatmap in Python | EODHD APIs Academy<\/title>\n<meta name=\"description\" content=\"Create a stock market heatmap in Python to analyze correlations between tickers, market state, and returns\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Stock Market Heatmap in Python\" \/>\n<meta property=\"og:description\" content=\"Create a stock market heatmap in Python to analyze correlations between tickers, market state, and returns\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python\" \/>\n<meta property=\"og:site_name\" content=\"Financial Academy\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/eodhistoricaldata\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-18T16:53:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-05T14:17:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"1000\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Michael Whittle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:site\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Whittle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python\"},\"author\":{\"name\":\"Michael Whittle\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\"},\"headline\":\"How to Create a Stock Market Heatmap in Python\",\"datePublished\":\"2023-12-18T16:53:59+00:00\",\"dateModified\":\"2025-02-05T14:17:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python\"},\"wordCount\":931,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png\",\"articleSection\":[\"Fundamental Analysis Examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python\",\"name\":\"How to Create a Stock Market Heatmap in Python | EODHD APIs Academy\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png\",\"datePublished\":\"2023-12-18T16:53:59+00:00\",\"dateModified\":\"2025-02-05T14:17:46+00:00\",\"description\":\"Create a stock market heatmap in Python to analyze correlations between tickers, market state, and returns\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#primaryimage\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png\",\"width\":1000,\"height\":1000},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-academy\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a Stock Market Heatmap in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#website\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"name\":\"Financial APIs Academy | EODHD\",\"description\":\"Financial Stock Market Academy\",\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#organization\",\"name\":\"EODHD (EOD Historical Data)\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"width\":159,\"height\":82,\"caption\":\"EODHD (EOD Historical Data)\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/eodhistoricaldata\",\"https:\/\/x.com\/EOD_data\",\"https:\/\/www.reddit.com\/r\/EODHistoricalData\/\",\"https:\/\/eod-historical-data.medium.com\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad\",\"name\":\"Michael Whittle\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g\",\"caption\":\"Michael Whittle\"},\"description\":\"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).\",\"url\":\"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Create a Stock Market Heatmap in Python | EODHD APIs Academy","description":"Create a stock market heatmap in Python to analyze correlations between tickers, market state, and returns","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python","og_locale":"en_US","og_type":"article","og_title":"How to Create a Stock Market Heatmap in Python","og_description":"Create a stock market heatmap in Python to analyze correlations between tickers, market state, and returns","og_url":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python","og_site_name":"Financial Academy","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2023-12-18T16:53:59+00:00","article_modified_time":"2025-02-05T14:17:46+00:00","og_image":[{"width":1000,"height":1000,"url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png","type":"image\/png"}],"author":"Michael Whittle","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"Michael Whittle","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python"},"author":{"name":"Michael Whittle","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad"},"headline":"How to Create a Stock Market Heatmap in Python","datePublished":"2023-12-18T16:53:59+00:00","dateModified":"2025-02-05T14:17:46+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python"},"wordCount":931,"publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png","articleSection":["Fundamental Analysis Examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python","url":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python","name":"How to Create a Stock Market Heatmap in Python | EODHD APIs Academy","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-academy\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png","datePublished":"2023-12-18T16:53:59+00:00","dateModified":"2025-02-05T14:17:46+00:00","description":"Create a stock market heatmap in Python to analyze correlations between tickers, market state, and returns","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#primaryimage","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png","width":1000,"height":1000},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-academy\/fundamental-analysis-examples\/how-to-create-a-stock-market-heatmap-in-python#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-academy\/"},{"@type":"ListItem","position":2,"name":"How to Create a Stock Market Heatmap in Python"}]},{"@type":"WebSite","@id":"https:\/\/eodhd.com\/financial-academy\/#website","url":"https:\/\/eodhd.com\/financial-academy\/","name":"Financial APIs Academy | EODHD","description":"Financial Stock Market Academy","publisher":{"@id":"https:\/\/eodhd.com\/financial-academy\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eodhd.com\/financial-academy\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eodhd.com\/financial-academy\/#organization","name":"EODHD (EOD Historical Data)","url":"https:\/\/eodhd.com\/financial-academy\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/","url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","contentUrl":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","width":159,"height":82,"caption":"EODHD (EOD Historical Data)"},"image":{"@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/eodhistoricaldata","https:\/\/x.com\/EOD_data","https:\/\/www.reddit.com\/r\/EODHistoricalData\/","https:\/\/eod-historical-data.medium.com\/"]},{"@type":"Person","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/50784c270b6267df5969514d80d510ad","name":"Michael Whittle","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-academy\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5076af85c7ee0445454257247cad4970ae8cf5d7d4940d2b32c521f51c0a0f5a?s=96&d=mm&r=g","caption":"Michael Whittle"},"description":"Solution architect, developer, and analyst with over 20+ years experience (TOP author on Medium).","url":"https:\/\/eodhd.com\/financial-academy\/author\/michaelwhittle"}]}},"jetpack_featured_media_url":"https:\/\/eodhd.com\/financial-academy\/wp-content\/uploads\/2023\/12\/clustermap.png","jetpack_shortlink":"https:\/\/wp.me\/pdOdVT-17g","jetpack_sharing_enabled":true,"acf":[],"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/4294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/comments?post=4294"}],"version-history":[{"count":14,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/4294\/revisions"}],"predecessor-version":[{"id":6311,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/posts\/4294\/revisions\/6311"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media\/4303"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/media?parent=4294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/categories?post=4294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/tags?post=4294"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/coding-language?post=4294"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/ready-to-go-solution?post=4294"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/qualification?post=4294"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-category?post=4294"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-academy\/wp-json\/wp\/v2\/financial-apis-manuals?post=4294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}