10170

# Random Simulation of a Financial Portfolio

This Demonstration uses random number generation to create a portfolio with up to 30 elements (represented by red points) taken from the Dow Jones Industrial Average using data from 2003 to 2010. The yellow point shows a portfolio with weight 1/30 for each asset. The program finds the efficient frontier according to modern portfolio theory and shows the capital market line (CML) from the 1500 generated points. The CML consists of the risk-free asset's return and market portfolio lying on the efficient frontier. The combination of the two companies shows possible trajectories of the portfolio according to the correlation.

### DETAILS

A random simulation is faster than an analytical solution, which also takes too much memory. Every blue point is defined by the equations and , where are the contributions of asset , , to a portfolio, is the covariance of assets and , is the expected return of asset . The second control, "CML & efficient frontier", finds the efficient frontier, which consists of all the points that give the best return at the same level of volatility and the curve is nondecreasing. The more points we use for the simulation, the smoother the efficient frontier. The efficient frontier is necessary for finding the CML. A CML is defined by equation . Here is the expected return, is the risk-free return, is the slope of the line, and is the volatility. The only unknown element is , but we know that CML is tangent to the efficient frontier; the highest possible slope of the line is defined by two points: a risk-free return and a point on the efficient frontier. The third control "two companies combined" shows a trajectory of a portfolio that is composed of two companies. Every point of the trajectory is defined by equations and , where is the contribution of asset 1 to a portfolio, is the contribution of asset 2 to a portfolio, is the expected return of asset 1, is the expected return of asset 2, is the volatility of the portfolio, is the variation of asset 1, is a variation of asset 2, and is the covariance of assets 1 and 2. Here , , with the restriction .

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

#### Related Topics

 RELATED RESOURCES
 The #1 tool for creating Demonstrations and anything technical. Explore anything with the first computational knowledge engine. The web's most extensive mathematics resource. An app for every course—right in the palm of your hand. Read our views on math,science, and technology. The format that makes Demonstrations (and any information) easy to share and interact with. Programs & resources for educators, schools & students. Join the initiative for modernizing math education. Walk through homework problems one step at a time, with hints to help along the way. Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet. Knowledge-based programming for everyone.