The actual process used for establishing optimal portfolios uses statistical data and programmes which are not described in detail here. This is a brief introductory overview only. Markowitz was among the first to attempt to quantify risk and demonstrate quantitatively why and how portfolio diversification works to reduce risk for investors. History is a better indicator if used over the long term. While this process can be performed on any portfolio with two or more assets, it is most commonly applied to asset classes.
Asset allocation is the process of allocating funds to each asset class.
Much analysis has been performed which indicates this may be by far the most important decision. Each asset class will generally have different levels of return and risk. They also behave differently. At the time one asset is increasing in value, another may be decreasing or, at least, not increasing as much and vice versa. The measure used for this phenomenon is called the correlation coefficient.