*! version 1.0.0 03may2013

Title

simport -- Simulates and makes a graph of random portfolios with non-negative weights given a set of stock returns.

Syntax

simport varlist [if] [in]
, nport(#) [CASEwise]

nport(#) number of portfolios inside the efficient frontier to be computed

casewise specifies casewise deletion of observations. Expected returns and var-cov matrix are to be computed for the sample that is not missing for any of the variables in varlist.
The default is to use all the nonmissing values for each variable.

Description

simport generates and graph random portfolios formed with the stock/bond returns specified in the
varlist. The varlist must be a list of continuously compounded returns of financial instruments to be considered for the portfolio.
It is recommended to use this command with no more than 8 stock returns and no more than 6,000 portfolios. If more returns or portoflios are specified,
the command will take considerable time to generate all portfolios.
The option nport specifies the the number of different portfolios to be generated inside the efficient frontier. The option nport must be specified.

Remarks

This command needs the installation of the following commands: meanrets and varrets. Check the "Also See" Menu.
The return variables must be continuously compounded returns, not simple returns.

Examples

Collects online monthly stock data (adjusted prices) from Yahoo Finance with the user command returnsyh. This command also calculates simple and continuous compounded returns:

. returnsyh AAPL MSFT GE GM WMT, fm(1) fd(1) fy(2012) lm(12) ld(31) ly(2015) frequency(m) price(adjclose)

Generates 6,000 random portfolios inside the efficient frontier using 4 continuously compounded returns:

. simport r_AAPL r_MSFT r_GE r_GM, nport(6000)

Generates 4,000 random portfolios inside the efficient frontier using the 5 continuously componded returns of the dataset, and excluding observations if a missing value is found:

. simport r_*, nport(4000) casewise

Stored results

simport dos not store results in r()

Author

Carlos Alberto Dorantes, Tecnológico de Monterrey, Querétaro Campus, Querétaro, México.
Email: cdorante@itesm.mx