Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

This project contains python notebooks

Rolling returns in 5 years, ref. currency and distributions

Rolling_returns_in_5_years_with_distribution_summary.ipynb performs financial data analysis focusing on rolling returns over 5-year periods for various market indices and ETFs. Here is a summary of the key content and steps in the notebook:

1. Setup and Imports

  • Installs the yfinance library for downloading financial data.
  • Imports required libraries:
    • yfinance for fetching historical market data.
    • pandas for data manipulation and analysis.

2. Data Acquisition

  • Downloads historical closing price data for various equity indices and ETFs.
  • Tickers included: EWI, EWJ, EWW, ISF.L, MCHI, SMICHA.SW, SPY, VEA, VNM, VT, VWO.
  • Data covers a long historical range, from early 1990s to 2025.
  • Prices are stored in a DataFrame with dates as the index.
  • Allow to use a reference_price for the analysis

3. Data Exploration

  • Displays the head (first few rows) of the closing prices DataFrame.
  • Data shows NaNs for dates before the instruments had prices and values for later dates.

4. Calculation of Rolling Returns

  • Computes 5-year rolling returns for each ticker.
  • This involves calculating the percentage change in prices over every rolling 5-year window in the dataset.

5. Distribution Summary of Returns

  • Summarizes the 5-year rolling returns by computing statistical percentiles:
    • 2nd percentile
    • 5th percentile
    • Median return
    • 95th percentile
    • 98th percentile
  • Also records the first and last available dates for each ticker's data.

6. Output Results

  • Displays tables showing:
    • Summary statistics of rolling returns distributions for each ticker.
    • Date ranges covered by the data.
  • These statistics help understand the risk and return characteristics of each instrument over 5-year investment horizons.

This notebook analyzes the historical performance of global indices and ETFs by examining their 5-year rolling returns and the distribution of those returns, useful for evaluating long-term investment risk and potential gains.

About

Rolling returns in 5 years, using reference currency and distributions

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages