{"id":18897,"date":"2026-09-27T04:13:21","date_gmt":"2026-09-27T04:13:21","guid":{"rendered":"https:\/\/www.simtrade.fr\/blog_simtrade\/?p=18897"},"modified":"2026-09-27T04:13:22","modified_gmt":"2026-09-27T04:13:22","slug":"how-to-download-and-model-financial-data-with-python","status":"publish","type":"post","link":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/","title":{"rendered":"How to download and model financial data with Python"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.linkedin.com\/in\/hadrienpuche\" target=\"_blank\"><img decoding=\"async\" style=\"padding: 5px\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg\" alt=\"Hadrien Puche\" width=\"133\" align=\"right\"><\/a><\/p>\n<p>Any financial analysis starts with data. Whether you want to analyze a stock, build a portfolio, measure risk, create a valuation model or develop trading strategies, the first step is always the same: obtaining financial data.<\/p>\n<p>You could download data manually from websites such as Yahoo! Finance or Investing.com, but this quickly becomes tedious and time consuming. It also limits the amount of data you can work with.<\/p>\n<p>Python allows us to automate this process and retrieve large amounts of financial information in just a few lines of code.<\/p>\n\n<p>In this article, <a href=\"https:\/\/www.linkedin.com\/in\/hadrienpuche\" target=\"_blank\">Hadrien Puche<\/a> (ESSEC Business School, <i>Grande \u00c9cole<\/i> Program, Master in Management, 2023-2027) will help you understand how to:<\/p>\n<ul>\n  <li>Download historical stock prices with Python<\/li>\n  <li>Explore and visualize market data<\/li>\n  <li>Compute basic statistics and historical distributions<\/li>\n  <li>Compare multiple securities<\/li>\n  <li>Perform a case study to measure market risk (Beta and Epsilon)<\/li>\n  <li>Build the foundation needed for more advanced financial analysis<\/li>\n<\/ul>\n\n<h2>What financial data can we download?<\/h2>\n\n<p>Financial professionals use many different categories of data across individual assets as well as portfolios and funds.<\/p>\n\n<p><strong>Market data<\/strong><\/p>\n<ul>\n  <li>Individual asset prices (e.g., individual stocks, corporate bonds)<\/li>\n  <li>Portfolios and funds (e.g., ETFs, mutual funds)<\/li>\n  <li>Currency exchange rates<\/li>\n  <li>Commodity prices<\/li>\n  <li>Bond yields<\/li>\n<\/ul>\n\n<p><strong>Company fundamentals<\/strong><\/p>\n<ul>\n  <li>Revenue<\/li>\n  <li>Earnings<\/li>\n  <li>Margins<\/li>\n  <li>Cash flows<\/li>\n<\/ul>\n\n<p><strong>Macroeconomic data<\/strong><\/p>\n<ul>\n  <li>Inflation<\/li>\n  <li>Interest rates<\/li>\n  <li>GDP growth<\/li>\n  <li>Unemployment<\/li>\n<\/ul>\n\n<p><strong>Alternative data<\/strong><\/p>\n<ul>\n  <li>News<\/li>\n  <li>Social media sentiment<\/li>\n  <li>Satellite imagery<\/li>\n  <li>Credit card spending<\/li>\n<\/ul>\n\n<p>Not all data sources are freely available. Many professional investors rely on paid platforms such as Bloomberg, FactSet, Capital IQ or Morningstar to access standardized, high-frequency, and point-in-time data.<\/p>\n<p>Fortunately, stock market data specifically can easily be accessed for free using Python for research and learning purposes.<\/p>\n<p>In this article, we will use the open-source YFinance library to download historical market data, that you will then be able to model and use for any financial analysis project you may have.<\/p>\n\n\n<h2>A step-by-step guide<\/h2>\n\n<p>Follow the next steps to download you first financial data with Python \ud83d\ude42<\/p>\n\n<h3>Step 1: Installing the required libraries<\/h3>\n<p>If you have not yet installed Python, refer to the <a href=\"setup_guide.html\">setup guide<\/a> published earlier in this series to configure your execution environment (such as Jupyter Notebook or Anaconda).<\/p>\n<p>Once your environment is ready, install the required packages:<\/p>\n\n<pre><code>pip install yfinance pandas numpy matplotlib<\/code><\/pre>\n\n<p>or inside Jupyter Notebook:<\/p>\n\n<pre><code>!pip install yfinance pandas numpy matplotlib<\/code><\/pre>\n\n<p>We will use:<\/p>\n<ul>\n  <li>yfinance to retrieve market data<\/li>\n  <li>pandas to manipulate data structures<\/li>\n  <li>numpy for financial and mathematical operations<\/li>\n  <li>matplotlib to create charts<\/li>\n<\/ul>\n\n<h3>Step 2: Import our Python packages<\/h3>\n\n<p>Every Python script starts by importing the packages we installed earlier. In Python, packages (or libraries) are reusable modules containing pre-written code and functions that extend Python&#8217;s core capabilities.<\/p>\n\n<pre><code>import yfinance as yf\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt<\/code><\/pre>\n\n<p>The aliases (yf, pd, np, plt) make the code shorter and easier to read.<\/p>\n\n<h3>Step 3: Download our first data<\/h3>\n\n<p>To download financial data, we use a <strong>ticker symbol<\/strong>, a unique combination of letters representing any publicly traded security. For example, <code>AAPL<\/code> represents Apple.<\/p>\n<p>Whenever we use a Python function, we can customize the output by passing variables\/parameters into the function, such as <code>period<\/code> (e.g., <code>\"5y\"<\/code> for 5 years) or specific start and end dates.<\/p>\n\n<p>As an example, let us download daily data for Apple stock price over the last 5 years (Yahoo! Finance ticker: AAPL). The data will be stored in a data frame (df) that we can name df_apple.<\/p>\n\n<pre><code>df_aapl = yf.download(\"AAPL\", period=\"5y\")\n\nprint(df_aapl.head())<\/code><\/pre>\n\n<p>You will obtain this table with the following columns:<\/p>\n\n<ul>\n    <li>Close: closing price at the end of the trading day<\/li>\n  <li>High: highest price during the trading day<\/li>\n  <li>Low: lowest price during the trading day<\/li>\n  <li>Open: opening price at the beginning of the trading day<\/li>\n  <li>Volume: transaction volume during the trading day<\/li>\n<\/ul>\n \n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_first_output_aapl_query.png\" alt=\"An screenshot from VSC showing the output table of this Yfinance query\" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n<p>The data is stored in a Pandas <strong>DataFrame<\/strong>. This is a popular two-dimensional, tabular data structure with labeled axes (rows and columns).<\/p>\n<p>To inspect its structure, type the following code:<\/p>\n<pre><code>df_aapl.info()<\/code><\/pre>\n \n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_aapl_info_output.png\" alt=\"A screenshot from VSC showing the output of df_aapl.info() \" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n\n\n\n<h3>Step 4: Using more precise queries for historical context<\/h3>\n<p>Instead of downloading a rolling period (like &#8220;5y&#8221;), we can isolate specific market events by passing exact <code>start<\/code> and <code>end<\/code> dates to the download function. As financial analysts, we routinely extract specific timeframes to understand how assets behave under macroeconomic stress.<\/p>\n<p>For example, analyzing the COVID-19 market crash in early 2020 offers invaluable insights into extreme volatility, liquidity crunches, and rapid V-shaped recoveries. Let&#8217;s download and plot Apple&#8217;s stock specifically during the height of the pandemic shock (January to June 2020):<\/p>\n <pre><code># Isolate the COVID-19 crash and initial recovery phase\ncovid_crash = yf.download(\"AAPL\", start=\"2020-01-01\", end=\"2020-06-30\")\n\n# Plot the isolated data\nplt.figure(figsize=(10, 5))\nplt.plot(covid_crash.index, covid_crash[\"Close\"], color=\"#d9534f\", linewidth=2)\nplt.title(\"AAPL Stock Price - COVID-19 Crash &amp; Recovery (Early 2020)\")\nplt.xlabel(\"Date\")\nplt.ylabel(\"Price ($)\")\nplt.grid(True, linestyle=\"--\", alpha=0.6)\nplt.show()<\/code><\/pre>\n \n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_VSC_covid_stock_crash.png\" alt=\"The output of the previous code cell\" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n\n<p>We could use this same technique to analyze other pivotal periods, such as:<\/p>\n<ul>\n  <li>A central bank interest rate tightening cycle (e.g., the Fed&#8217;s 2022-2023 rate hikes)<\/li>\n  <li>The 2008 Global Financial Crisis (if analyzing older datasets)<\/li>\n  <li>Specific earnings announcement windows<\/li>\n<\/ul>\n\n\n<h2>Step 5: Downloading multiple stocks at the same time<\/h2>\n<p> Downloading multiple stocks is necessary for financial analysis that often requires comparing securities, building a portfolio, or testing trading strategies like pair trading.<\/p>\n<p>Instead of issuing separate requests for each stock (which risks hitting API rate limits or misaligning dates), it is far more efficient to fetch all tickers at once in a single batch query.<\/p>\n<p>To make this practical, let&#8217;s download the data for the &#8220;Magnificent Seven&#8221;. These seven mega-cap tech companies (Apple, Microsoft, Alphabet, Amazon, Meta, Nvidia, and Tesla) have heavily dominated market capitalization and driven a massive portion of the S&amp;P 500&#8217;s returns in recent years.<\/p>\n<pre><code># Define the Magnificent 7 tickers\nmag7_tickers = [\"AAPL\", \"MSFT\", \"GOOGL\", \"AMZN\", \"META\", \"NVDA\", \"TSLA\"]\n\n# Download the closing prices for all 7 stocks simultaneously\nprices = yf.download(mag7_tickers, period=\"5y\")[\"Close\"]\n \nprint(prices.head())<\/code><\/pre>\n<p>The result is now again a matrix where each column represents a stock, and each row represents a trading day.<\/p>\n \n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_VSC_mag_7_table.png\" alt=\"Screenshot of the output of the previous cell\" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n<p>This table format is ideal for portfolio analysis, benchmarking, and performance comparisons, and can be used to draw any kind of graphs.<\/p>\n<p>Note that the table\u2019s columns are displayed in two groups. It\u2019s a limitation of the Jupyter notebook. If you want to have a more convenient view over your dataframe, you can save it as a .csv file and open it.<\/p>\n<pre><code># save the dataframe as a csv\nprices.to_csv('mag_7_data.csv ')<\/code><\/pre>\n \n\n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_VSC_mag_7_csv\n.png\" alt=\"Screenshot of the output of the previous cell\" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n\n\n<p>Now that you successfully downloaded your financial data, let\u2019s see how you can clean it and then use it.<\/p>\n\n<h2>Inspecting and cleaning the dataset<\/h2>\n<p>Financial datasets are rarely perfect. You will frequently encounter missing values (represented as <code>NaN<\/code>, or &#8220;Not a Number&#8221;) in datasets. These gaps usually occur due to trading halts, early market closures (like the day before Thanksgiving), or simple transmission glitches from the data provider.<\/p>\n<p>If left unaddressed, these missing data points will break your mathematical functions and severely distort your return and volatility calculations. The code below checks how many missing values exist in each column, and then removes (drops) any rows containing them. <i>In some situations you might want to to forward-fill these gaps to preserve the timeline, but dropping them is the safest thing to do for now.<\/i><\/p>\n<pre><code># Check for missing values\nprint(df_aapl.isnull().sum())\n# Clean missing values by dropping rows with NaNs\ndf_aapl = df_aapl.dropna()\n# Print the first rows of the dataframe\ndf_aapl.head()<\/code><\/pre>\n<pre><code>df_aapl.head()<\/code><\/pre>\n \n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_output_missing_values_check.png\" alt=\"A screenshot from VSC showing the output of the cleaning code cell \" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n\n<p>To view the last rows of the dataframe, replace head() by tail():<\/p>\n \n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_output_VSC_tail.png\" alt=\"Output of the VSC cell when we switch to tail() \" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n\n<h2>Visualizing the stock price with graphs or charts<\/h2>\n<p>Let&#8217;s create our first graph to visualize the evolution of Apple stock price.<\/p>\n<pre><code>plt.figure(figsize=(10, 5))\nplt.plot(df_aapl.index, df_aapl[\"Close\"], label=\"AAPL Close Price\")\nplt.title(\"Apple Stock Price\")\nplt.xlabel(\"Date\")\nplt.ylabel(\"Price ($)\")\nplt.legend()\nplt.show()<\/code><\/pre>\n \n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_VSC_stock_price_visualization.png\" alt=\"A screenshot of VSC with the stock price visualization cell output\" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n\n<p>We have now:<\/p>\n<ul>\n  <li>Downloaded market data from Yahoo! Finance<\/li>\n  <li>Stored and cleaned the data in a dataframe<\/li>\n  <li>Created a time-series plot to visualize stock prices<\/li>\n<\/ul>\n\n<p>These core steps form the basis of empirical financial research and quantitative models.<\/p>\n\n\n\n<h2>Computing basic statistics &amp; historical distributions<\/h2>\n<p>To evaluate stock performance and risk, we compute basic descriptive statistics for both prices and financial returns: minimum, maximum, mean, variance, standard deviation, skewness, and kurtosis.<\/p>\n<pre><code># Calculate daily percentage returns\ndf_aapl['Return'] = df_aapl['Close'].pct_change()\n\n# Compute summary statistics for Price and Returns\nstats_df = pd.DataFrame({\n    'Metric': ['Min', 'Max', 'Mean', 'Variance', 'Std Dev', 'Skewness', 'Kurtosis'],\n    'Price ($)': [\n        df_aapl['Close'].min().item(),\n        df_aapl['Close'].max().item(),\n        df_aapl['Close'].mean().item(),\n        df_aapl['Close'].var().item(),\n        df_aapl['Close'].std().item(),\n        df_aapl['Close'].skew().item(),\n        df_aapl['Close'].kurtosis().item()\n    ],\n    'Daily Return': [\n        df_aapl['Return'].min().item(),\n        df_aapl['Return'].max().item(),\n        df_aapl['Return'].mean().item(),\n        df_aapl['Return'].var().item(),\n        df_aapl['Return'].std().item(),\n        df_aapl['Return'].skew().item(),\n        df_aapl['Return'].kurtosis().item()\n    ]\n})\n\nprint(stats_df)<\/code><\/pre>\n\n<h3>Plotting Historical Distributions<\/h3>\n<p>Histograms display the frequency distribution of prices and daily returns, helping us inspect price trends, distribution symmetry, and tail risks.<\/p>\n<pre><code>fig, axes = plt.subplots(1, 2, figsize=(14, 5))\n\n# Price distribution\naxes[0].hist(df_aapl['Close'].dropna(), bins=30, color='skyblue', edgecolor='black')\naxes[0].set_title('Historical Price Distribution')\naxes[0].set_xlabel('Price ($)')\naxes[0].set_ylabel('Frequency')\n\n# Return distribution\naxes[1].hist(df_aapl['Return'].dropna(), bins=50, color='salmon', edgecolor='black')\naxes[1].set_title('Historical Daily Return Distribution')\naxes[1].set_xlabel('Daily Return')\naxes[1].set_ylabel('Frequency')\n\nplt.tight_layout()\nplt.show()<\/code><\/pre>\n\n\n<h2>Harmonizing stock prices and computing returns<\/h2>\n<p>All stocks have different nominal prices. If Tesla trades at $350 and Nvidia at $220, it does not mean that Tesla is worth more than Nvidia or performed better.<\/p>\n<p>To establish an accurate comparison across these assets, we must execute two fundamental computations:<\/p>\n<ol>\n  <li><strong>Price harmonization:<\/strong> we normalize all historical time series to a base index of 100, to ensure a standardized starting point.<\/li>\n  <li><strong>Return calculation:<\/strong> we compute the periodic returns to get the actual performance in % rather than the absolute variation.<\/li>\n<\/ol>\n\n<pre><code>normalized = prices \/ prices.iloc[0] * 100\n\nplt.figure(figsize=(10, 5))\nplt.plot(normalized.index, normalized)\nplt.title(\"Performance Comparison (Base = 100)\")\nplt.xlabel(\"Date\")\nplt.ylabel(\"Growth of $100\")\nplt.legend(prices.columns)\nplt.show()<\/code><\/pre>\n \n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_VSC_normalized_prices.png\" alt=\"the output of the previous cell\" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n\n<p>We can also compute daily returns across all stocks:<\/p>\n\n<pre><code>returns = prices.pct_change().dropna()\nprint(returns.head())<\/code><\/pre>\n \n<p style=\"text-align:center;margin:20px 0\">\n  <img decoding=\"async\" src=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/09\/img_VSC_daily_return_dataframe.png\" alt=\"the output of the previous cell \" width=\"\u00ab1000&quot;\" style=\"margin-top:8px;border-radius:8px;max-width: 100%\">\n  <br>\n<\/p>\n\n<p>The chart now shows how much each investment would have grown from the same starting value.<\/p>\n<p>This is a standard technique used by portfolio managers and equity analysts.<\/p>\n\n\n<h2>Case Study: The Capital Asset Pricing Model (CAPM)<\/h2>\n<p>In empirical finance, evaluating an individual asset requires isolating the return generated by the broader market from the return specific to the company itself. The Capital Asset Pricing Model (CAPM) provides the foundational framework to decompose this risk.<\/p>\n<p>The model decomposes the return of an individual asset over a given time-period in three components: the risk-free rate, a market systematic factor and a firm specific factor. The model is expressed through the following equation:<\/p>\n<p><i>r<sub>t<\/sub><\/i> = <i>r<sub>f<\/sub><\/i> + <i>\u03b2<\/i>(<i>r<sub>m<\/sub><\/i> &#8211; <i>r<sub>f<\/sub><\/i>) + <i>\u03b5<sub>t<\/sub><\/i><\/p>\n<p>Where:<\/p>\n<ul>\n  <li><strong><i>r<sub>t<\/sub><\/i><\/strong> is the return of the stock (e.g., Apple).<\/li>\n  <li><strong><i>r<sub>f<\/sub><\/i><\/strong> is the risk-free interest rate (e.g., the 13-week Treasury Bill, <code>^IRX<\/code>).<\/li>\n  <li><strong><i>\u03b2<\/i> (Beta)<\/strong> represents the stock&#8217;s sensitivity to market movements (systematic risk).<\/li>\n  <li><strong><i>r<sub>m<\/sub><\/i> &#8211; <i>r<sub>f<\/sub><\/i><\/strong> is the excess return of the market index (e.g., the S&amp;P 500, <code>^GSPC<\/code>).<\/li>\n  <li><strong><i>\u03b5<sub>t<\/sub><\/i> (Epsilon)<\/strong> represents the idiosyncratic return associated to firm-specific risk not explained by the market.<\/li>\n<\/ul>\n\n<p>By downloading these three time series simultaneously, we can calculate the stock&#8217;s Beta and isolate its firm-specific residual risk.<\/p>\n<pre><code># Download asset (AAPL), market benchmark (S&amp;P 500), and risk-free rate (13-week T-Bill)\nmarket_data = yf.download([\"AAPL\", \"^GSPC\", \"^IRX\"], start=\"2022-01-01\", end=\"2024-12-31\")[\"Close\"].dropna()\n\n# Compute daily percentage returns for the stock and the market\nreturns_df = market_data[[\"AAPL\", \"^GSPC\"]].pct_change().dropna()\n \n# Convert the annualized risk-free yield (^IRX) to a daily rate\ndaily_rf = (market_data[\"^IRX\"] \/ 100) \/ 252\nreturns_df[\"Rf\"] = daily_rf\n \n# Calculate the excess returns: (r_t - r_f) and (r_m - r_f)\nexcess_aapl = returns_df[\"AAPL\"] - returns_df[\"Rf\"]\nexcess_market = returns_df[\"^GSPC\"] - returns_df[\"Rf\"]\n \n# Compute Market Beta: Covariance(stock, market) \/ Variance(market)\ncov_matrix = np.cov(excess_aapl, excess_market)\nbeta = cov_matrix[0, 1] \/ cov_matrix[1, 1]\n \n# Isolate Epsilon (the firm-specific residual risk)\n# Rearranging the CAPM equation: epsilon = (r_t - r_f) - beta * (r_m - r_f)\nepsilon = excess_aapl - (beta * excess_market)\n \nprint(f\"Calculated Beta: {beta:.4f}\")\nprint(f\"Mean Firm-Specific Return (Epsilon): {epsilon.mean():.6f}\")\nprint(f\"Idiosyncratic Risk (Epsilon Std Dev): {epsilon.std():.4f}\")<\/code><\/pre>\n\n<h2>Common pitfalls<\/h2>\n\n<p>When working with market data, beginners often run into the same issues:<\/p>\n<ul>\n  <li>Using the wrong ticker symbol<\/li>\n  <li>Comparing stocks without normalizing prices<\/li>\n  <li>Forgetting that markets are closed on weekends and holidays<\/li>\n  <li>Failing to clean and handle missing values (<code>NaN<\/code>) in the dataset<\/li>\n  <li>Ignoring stock splits and dividends<\/li>\n<\/ul>\n\n<p>Overall, don\u2019t forget to always inspect and clean your data before starting your analysis.<\/p>\n\n<h2>Exercises<\/h2>\n\n<h3>Exercise 1: Basic data retrieval and price visualization (MSFT)<\/h3>\n<p>Microsoft is a mature mega-cap technology company, and a cornerstone of most global equity portfolios. Retrieving and inspecting its historical data is a perfect starting point to practice basic YFinance commands.<\/p>\n<p>Using the ticker symbol <code>MSFT<\/code>, download the last five years of daily market data.<\/p>\n<p>Your tasks:<\/p>\n<ul>\n  <li>Use the appropriate pandas functions to display the first 5 rows and the last 5 rows of the dataset to verify data integrity (checking for correct start\/end dates).<\/li>\n  <li>Generate a line chart plotting the closing price over the entire 5-year period to visualize its long-term market trend.<\/li>\n<\/ul>\n\n<h3>Exercise 2: time-series extraction and volume analysis on Tesla (TSLA)<\/h3>\n<p>Tesla is renowned for its high historical volatility and massive retail trading interest. The 2022-2024 window was particularly eventful for growth and electric vehicle stocks, marked by shifting supply chains and a rapid rise in interest rates. Isolating this exact timeframe allows us to analyze the stock&#8217;s behavior under changing macroeconomic conditions.<\/p>\n<p>Using the ticker symbol <code>TSLA<\/code>, extract the market data for the precise calendar period from January 1, 2022, to December 31, 2024 (using the <code>start<\/code> and <code>end<\/code> parameters).<\/p>\n<p>Your tasks:<\/p>\n<ul>\n  <li>Identify the peak (highest closing price) and the trough (lowest closing price) over this period to grasp the magnitude of the stock&#8217;s price swings.<\/li>\n  <li>Calculate the average daily trading volume, a fundamental metric used by analysts to assess market liquidity and ongoing investor interest.<\/li>\n<\/ul>\n\n<h3>Exercise 3: Comparative performance and risk profiling on Chinese tech companies<\/h3>\n<p>Chinese technology stocks often experience unique market cycles driven by distinct domestic regulatory environments and macroeconomic factors. Using their US-listed ADRs (American Depositary Receipts), compare the performance and risk characteristics of three major players:<\/p>\n<ul>\n  <li>Alibaba (BABA)<\/li>\n  <li>Baidu (BIDU)<\/li>\n  <li>PDD Holdings (PDD)<\/li>\n<\/ul>\n<p>Questions:<\/p>\n<ol>\n  <li>Which stock achieved the highest total cumulative return?<\/li>\n  <li>Which stock was most volatile (highest standard deviation of daily returns)?<\/li>\n  <li>Which one offered the best risk-adjusted profile (e.g., highest Sharpe ratio) over the period?<\/li>\n<\/ol>\n\n<h2>Download the solutions<\/h2>\n\n<p>To help you check your work and experiment further, you can download the complete Jupyter Notebook containing the full code, charts, and commentary for all exercises.<\/p>\n\n<p>\n  <a href=\"adresse.ipynb\" style=\"display: inline-block;padding: 10px 20px;background-color: #007acc;color: #ffffff;text-decoration: none;border-radius: 4px;font-weight: bold\">\n    Download Solutions (.ipynb)\n  <\/a>\n<\/p>\n\n<h2>What&#8217;s next?<\/h2>\n<p>Now that you know how to download financial data, perform basic computations, and control for market risk, you are ready to delve into advanced quantitative and corporate finance topics.<\/p>\n\n\n<h2>About the Author<\/h2> \n<p>This article was written in September 2026 by <a href=\"https:\/\/www.linkedin.com\/in\/hadrienpuche\" target=\"_blank\">Hadrien PUCHE<\/a> (ESSEC Business School, <i>Grande \u00c9cole<\/i> Program, Master in Management, 2023-2027).<\/p>\n<p>&nbsp;&nbsp;&nbsp;\u25b6 Discover all articles by <a href=\"https:\/\/www.simtrade.fr\/blog_simtrade\/author\/hpuche\/\" target=\"_parent\">Hadrien PUCHE<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Any financial analysis starts with data. Whether you want to analyze a stock, build a portfolio, measure risk, create a valuation model or develop trading strategies, the first step is always the same: obtaining financial data. You could download data manually from websites such as Yahoo! Finance or Investing.com, but this quickly becomes tedious and &#8230; <a title=\"How to download and model financial data with Python\" class=\"read-more\" href=\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/\" aria-label=\"Read more about How to download and model financial data with Python\">Read more<\/a><\/p>\n","protected":false},"author":163,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-18897","post","type-post","status-publish","format-standard","hentry","category-contributors"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.3 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to download and model financial data with Python - SimTrade blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to download and model financial data with Python\" \/>\n<meta property=\"og:description\" content=\"Any financial analysis starts with data. Whether you want to analyze a stock, build a portfolio, measure risk, create a valuation model or develop trading strategies, the first step is always the same: obtaining financial data. You could download data manually from websites such as Yahoo! Finance or Investing.com, but this quickly becomes tedious and ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/\" \/>\n<meta property=\"og:site_name\" content=\"SimTrade blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fr-fr.facebook.com\/simtrade.fr\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-27T04:13:21+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-27T04:13:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg\" \/>\n<meta name=\"author\" content=\"Hadrien PUCHE\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@simtrade\" \/>\n<meta name=\"twitter:site\" content=\"@simtrade\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Hadrien PUCHE\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/\"},\"author\":{\"name\":\"Hadrien PUCHE\",\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/#\/schema\/person\/14022fa2d7219a55a8f44953465115de\"},\"headline\":\"How to download and model financial data with Python\",\"datePublished\":\"2026-09-27T04:13:21+00:00\",\"dateModified\":\"2026-09-27T04:13:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/\"},\"wordCount\":1974,\"publisher\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg\",\"articleSection\":[\"Contributors\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/\",\"url\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/\",\"name\":\"How to download and model financial data with Python - SimTrade blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg\",\"datePublished\":\"2026-09-27T04:13:21+00:00\",\"dateModified\":\"2026-09-27T04:13:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#primaryimage\",\"url\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg\",\"contentUrl\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg\",\"width\":1387,\"height\":1707},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to download and model financial data with Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/#website\",\"url\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/\",\"name\":\"SimTrade blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/#organization\",\"name\":\"SimTrade\",\"url\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2014\/01\/cropped-cropped-Banner_blog_SimTrade2.jpg\",\"contentUrl\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2014\/01\/cropped-cropped-Banner_blog_SimTrade2.jpg\",\"width\":940,\"height\":126,\"caption\":\"SimTrade\"},\"image\":{\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/fr-fr.facebook.com\/simtrade.fr\/\",\"https:\/\/x.com\/simtrade\",\"https:\/\/www.linkedin.com\/company\/sim-trade\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/#\/schema\/person\/14022fa2d7219a55a8f44953465115de\",\"name\":\"Hadrien PUCHE\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/e93cb346a66bbca4b59fc1dcda5ebc6dcb4f584e1e385911c925262a1fbc2976?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e93cb346a66bbca4b59fc1dcda5ebc6dcb4f584e1e385911c925262a1fbc2976?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e93cb346a66bbca4b59fc1dcda5ebc6dcb4f584e1e385911c925262a1fbc2976?s=96&d=mm&r=g\",\"caption\":\"Hadrien PUCHE\"},\"url\":\"https:\/\/www.simtrade.fr\/blog_simtrade\/author\/hpuche\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to download and model financial data with Python - SimTrade blog","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.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/","og_locale":"en_US","og_type":"article","og_title":"How to download and model financial data with Python","og_description":"Any financial analysis starts with data. Whether you want to analyze a stock, build a portfolio, measure risk, create a valuation model or develop trading strategies, the first step is always the same: obtaining financial data. You could download data manually from websites such as Yahoo! Finance or Investing.com, but this quickly becomes tedious and ... Read more","og_url":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/","og_site_name":"SimTrade blog","article_publisher":"https:\/\/fr-fr.facebook.com\/simtrade.fr\/","article_published_time":"2026-09-27T04:13:21+00:00","article_modified_time":"2026-09-27T04:13:22+00:00","og_image":[{"url":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg","type":"","width":"","height":""}],"author":"Hadrien PUCHE","twitter_card":"summary_large_image","twitter_creator":"@simtrade","twitter_site":"@simtrade","twitter_misc":{"Written by":"Hadrien PUCHE"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#article","isPartOf":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/"},"author":{"name":"Hadrien PUCHE","@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/#\/schema\/person\/14022fa2d7219a55a8f44953465115de"},"headline":"How to download and model financial data with Python","datePublished":"2026-09-27T04:13:21+00:00","dateModified":"2026-09-27T04:13:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/"},"wordCount":1974,"publisher":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/#organization"},"image":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg","articleSection":["Contributors"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/","url":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/","name":"How to download and model financial data with Python - SimTrade blog","isPartOf":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#primaryimage"},"image":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg","datePublished":"2026-09-27T04:13:21+00:00","dateModified":"2026-09-27T04:13:22+00:00","breadcrumb":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#primaryimage","url":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg","contentUrl":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2026\/06\/img_Hadrien_Puche_bis-scaled-e1781527786395.jpeg","width":1387,"height":1707},{"@type":"BreadcrumbList","@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/how-to-download-and-model-financial-data-with-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.simtrade.fr\/blog_simtrade\/"},{"@type":"ListItem","position":2,"name":"How to download and model financial data with Python"}]},{"@type":"WebSite","@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/#website","url":"https:\/\/www.simtrade.fr\/blog_simtrade\/","name":"SimTrade blog","description":"","publisher":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.simtrade.fr\/blog_simtrade\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/#organization","name":"SimTrade","url":"https:\/\/www.simtrade.fr\/blog_simtrade\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/#\/schema\/logo\/image\/","url":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2014\/01\/cropped-cropped-Banner_blog_SimTrade2.jpg","contentUrl":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-content\/uploads\/2014\/01\/cropped-cropped-Banner_blog_SimTrade2.jpg","width":940,"height":126,"caption":"SimTrade"},"image":{"@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/fr-fr.facebook.com\/simtrade.fr\/","https:\/\/x.com\/simtrade","https:\/\/www.linkedin.com\/company\/sim-trade"]},{"@type":"Person","@id":"https:\/\/www.simtrade.fr\/blog_simtrade\/#\/schema\/person\/14022fa2d7219a55a8f44953465115de","name":"Hadrien PUCHE","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e93cb346a66bbca4b59fc1dcda5ebc6dcb4f584e1e385911c925262a1fbc2976?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e93cb346a66bbca4b59fc1dcda5ebc6dcb4f584e1e385911c925262a1fbc2976?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e93cb346a66bbca4b59fc1dcda5ebc6dcb4f584e1e385911c925262a1fbc2976?s=96&d=mm&r=g","caption":"Hadrien PUCHE"},"url":"https:\/\/www.simtrade.fr\/blog_simtrade\/author\/hpuche\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/posts\/18897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/users\/163"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/comments?post=18897"}],"version-history":[{"count":18,"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/posts\/18897\/revisions"}],"predecessor-version":[{"id":19189,"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/posts\/18897\/revisions\/19189"}],"wp:attachment":[{"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/media?parent=18897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/categories?post=18897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.simtrade.fr\/blog_simtrade\/wp-json\/wp\/v2\/tags?post=18897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}