Example: Simulating a Stock Portfolio

The Investment element simulates the growth of an investment or group of investments such as a security or portfolio of securities. You input purchases, sales and the unit value of the investment, and the element outputs the investments current value.

The Portfolio.gsm example model can be found in the can be found in the Financial Examples folder in your GoldSim directory (accessed by selecting File | Open Example... from the main menu). It demonstrates how the GoldSim financial elements can be used to model a portfolio of stocks

A History Generator An element that generates stochastic time histories of variables. A stochastic time history is a random time history that is generated according to a specified set of statistics. element is used to generate vectors of stochastic data which is correlated (in this case, using a Gaussian copula). In this model, the History Generator element outputs data for ten different stocks:

For each stock, a growth rate, volatility, reversion, initial price and median The 50th percentile of a distribution. price have been specified (by entering these as vectors). A sparse correlation matrix A two-dimensional array. and a Gaussian copula have also been specified to further reflect the behavior of the ten stocks.

The History Generator element serves as an input to an Investment element (defined as a vector A one-dimensional array.) that tracks movement in a portfolio with an initial investment of $50,000 in each of the ten stocks:

The ten items of the Investment element's vector output can then be summed to obtain the portfolio value: