The project measures both the individual securities and the portfolio's performance by calculating their Beta and Expected Return using the Capital Asset Pricing Model(CAPM). Furthermore, it plots the Security Market Line(SML) which serves as a graphical representation of the CAPM model, then it determines whether the securities in the portfolio performed well or not.
Importing required libraries:

Calculating annualized risk, returns, beta, and expected return using the CAPM model:

Determining whether the securities are Undervalued or Overvalued based on their beta and expected return:

Defining the function that will return the summary table and the chart:

The summary table where the portfolio performance is measured:
Tickers, timeframe, and weights could be changed as desired.

Final output where the SML and securities are plotted:
