###
### 100 portfolios of 30 investments with 30 non-zero positions
###
x.matrix <- rlongshort( 100, 30 )
###
### 100 portfolios of 30 investments with 10 non-zero positions
###
y.matrix <- rlongshort( 100, 30, 20 )
Run the code above in your browser using DataLab