π Portfolio Analysis β Python Project
A practical financial analytics project focused on portfolio evaluation, asset return analysis, and risk measurements using Python.
π Project Overview
This project applies essential analytical techniques for investment portfolios, including:
β Time series processing β Daily returns calculation β Correlation analysis β Portfolio performance evaluation β Risk metrics β Asset allocation visualization
It is structured into three exercises, each focusing on a key concept in financial data analysis.
π Datasets Used
The project uses three CSV files:
File - Description asset_price_data.csv - Daily prices of financial assets portfolio_weights.csv - Daily allocation weights for each asset asset_information_data.csv - Asset categories (family/group)
β Exercise 1 β Data Loading & Normalization
Load asset prices
Plot price evolution
Normalize all assets to start at the same value (baseline = 1)
Purpose: Enables comparison across different assets regardless of original price scale.
β Exercise 2 β Daily Returns & Correlation Analysis
Compute percentage daily returns
Generate the correlation matrix
Create scatter plots comparing asset behaviors
Purpose: Helps identify relationships, diversification potential, and co-movement between assets.
β Exercise 3 β Portfolio Performance Analysis
Load and visualize portfolio weights
Compute cumulative portfolio returns
Calculate annualized return
Calculate annualized volatility (based on 261 trading days)
Visualize allocation by asset family/category
Purpose: Understand portfolio structure, long-term behavior, and risk-adjusted consistency.
π Key Visualizations
The notebook includes:
π Price time series π Normalized price chart π Correlation matrix β« Scatter plot between two assets π Portfolio cumulative returns π© Asset weight area plot π¦ Asset weight distribution grouped by category
These plots help build a comprehensive understanding of portfolio dynamics and asset interactions.
π Metrics Calculated β Daily Returns
Percentage change between consecutive days.
β Cumulative Returns
Full growth of the portfolio across the entire period.
β Annualized Return
Performance normalized to yearly equivalence.
β Annualized Volatility
Risk measurement scaled to yearly frequency.