Date: Apr 21,2025

Introduction

In this analysis, we aim to optimize a portfolio of various Exchange Traded Funds (ETFs) using Modern Portfolio Theory (MPT). The goal is to find the optimal allocation for each ETF to maximize returns while minimizing risk. We will calculate the efficient frontier, the Sharpe ratio, and determine the optimal weights for each ETF in the portfolio.

#Data Retrieval We use the yfinance Python library to retrieve historical price data for each ETF in our list. The data includes the adjusted closing prices, which are crucial for accurate return calculations.

Step 1: Read the Data from CSV Files

We read the CSV files saved in the specified directory and convert them to time series data. Each file is assumed to contain dates in the first column and prices in the second column, without headers.

Step 2: Calculate Daily Returns

Calculate the daily returns from the adjusted closing prices.

Step 3. Modern Portfolio Theory

Modern Portfolio Theory (MPT) aims to construct a portfolio that offers the maximum expected return for a given level of risk. Using MPT, we can plot the efficient frontier, which shows the best possible returns for a specific level of risk.

Step 4. Sharpe Ratio Calculation

The Sharpe ratio helps to assess the risk-adjusted return of a portfolio. A higher Sharpe ratio indicates a more favorable risk-return profile.

Step 5. Optimized Portfolio Allocation

The tangency portfolio is the portfolio with the highest Sharpe ratio. Here, we determine the optimal allocation for each ETF in the portfolio.

##       Percentages Tickers
## IVV      13.57137     IVV
## GLD      35.00000     GLD
## BRK-B    14.36620   BRK-B
## FENY      2.00000    FENY
## CHAT      2.00000    CHAT
## TIP      29.06242     TIP
## FTEC      2.00000    FTEC
## SCHD      2.00000    SCHD

Step 6. Visualization of Optimized Portfolio

We visualize the optimized allocation of each ETF in the portfolio using a bar chart.

Step 7. Summary of Optimized Portfolio

Here, we calculate the key metrics for the optimized portfolio, including the annualized return, risk, and Sharpe ratio.

## **Portfolio Average Return:** 20.73 %
## **Portfolio Standard Deviation:** 7.92 %
## **Portfolio Sharpe Ratio:** 2.37

Conclusion

This analysis demonstrates how to optimize a portfolio of ETFs using Modern Portfolio Theory, calculate the efficient frontier, and determine the ideal allocation for each asset to achieve the best risk-adjusted return. The resulting optimized portfolio is designed to balance risk and return according to the specified constraints.