Skip to content

Portfolio analysis is a systematic way to evaluate investment portfolios to optimize asset allocation and management. It involves a variety of financial metrics and visualizations to assess the performance and risk of different financial assets.

Notifications You must be signed in to change notification settings

RCabral91/portfolio_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š 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.

About

Portfolio analysis is a systematic way to evaluate investment portfolios to optimize asset allocation and management. It involves a variety of financial metrics and visualizations to assess the performance and risk of different financial assets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published