US · interviewqs.com

Simulating random portfolios to illustrate the 'efficient frontier' of returns

Python, Pandas, Data Analysis, External Dataset, Simulation, Data Visualization, Efficient Frontier,


This email was sent

Is this your brand on Milled? Claim it.

InterviewQs

Simulating random portfolios to illustrate the 'efficient frontier' of returns

Python Pandas Data Analysis External Dataset Simulation Data Visualization Efficient Frontier

Forward this email to a friend or colleague and challenge them to solve it.

Hi, 

Suppose you're given an array of equities and asked to simulate random portfolios to visualize the 'efficient frontier'.

The efficient frontier shows the set of 'optimal' portfolios that offer the highest expected return for a defined level of risk, where standard deviation is used as a proxy for risk.

In order to build the simulation and illustrate the efficient frontier, you can follow the steps below:

  1. Calculate periodic returns of the stocks in your portfolio
  2. Write function(s) to simulate randomized runs of your portfolio (randomly assigning weights).
    • You'll probably want to calculate a covariance matrix for the equities as well as the mean historical returns as general inputs
  3. Plot the output of the annualized portfolio returns generated from your simulation function(s), as well as the portfolio standard deviation (volatility) in a scatter plot -- the left outer curve on this plot will illustrate the 'efficient frontier' where maximum expected returns for a given risk level exist

To help get you started, you can reference this Google Colab notebook with the historical returns for a portfolio of the following equities:

['AAPL','FB', 'C', 'DIS']

Full solution will be provided in Python to premium users.


 

You’ve accumulated 256 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe
Are you sure?

Lists help you organize the brands that you care about. Your lists are private to you.