RPubs will retire in June 2027.
Your existing documents will stay accessible through December 31, 2031
and
Connect Cloud
is the recommended home for new publishing.
Read the blog post
Read the price data of the assets
Calculate the mean returns for the time period
Assign random weights to the assets and then use those to build an efficient frontier