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 element is used to generate vectors of stochastic data which is correlated (in this case, using a Gaussian copula). In this model, the HistGenerator element outputs data for ten different stocks:

A screenshot of a map

Description automatically generated

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

The HistGenerator element serves as an input to an Investment element (defined as a vector) that tracks movement in a portfolio with an initial investment of $50,000 in each of the ten stocks:

A close up of a map

Description automatically generated

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

A screenshot of a cell phone

Description automatically generated

Related Topics…

Learn more about: