###
### generate short only portfolio of 30 investments with 30 non-zero positions
###
x <- random.shortonly( 30 )
###
### generate short only portfolio of 30 investments with 10 non-zero positions
###
y <- random.shortonly( 30, 10 )
Run the code above in your browser using DataLab