The optimal portfolio concept falls under the modern portfolio theory. The theory assumes (among other things) that investors fanatically try to minimize risk while striving for the highest return possible. The theory states that investors will act rationally, always making decisions aimed at maximizing their return for their acceptable level of risk.
The optimal portfolio was used in 1952 by Harry Markowitz, and it shows us that it is possible for different portfolios to have varying levels of risk and return. Each investor must decide how much risk they can handle and than allocate (or diversify) their portfolio according to this decision.
The chart below illustrates how the optimal portfolio works. The optimalrisk portfolio is usually determined to be somewhere in the middle of the curve because as you go higher up the curve, you take on proportionately more risk for a lower incremental return. On the other end, low risk/low return portfolios are pointless because you can achieve a similar return by investing in riskfree assets, like government securities.
You can choose how much volatility you are willing to bear in your portfolio by picking any other point that falls on the efficient frontier. This will give you the maximum return for the amount of risk you wish to accept. Optimizing your portfolio is not something you can calculate in your head. There are computer programs that are dedicated to determining optimal portfolios by estimating hundreds (and sometimes thousands) of different expected returns for each given amount of risk.
Financial Concepts: Capital Asset Pricing Model (CAPM)

Managing Wealth
Modern Portfolio Theory: Why It's Still Hip
See why investors today still follow this old set of principles that reduce risk and increase returns through diversification. 
Investing
Understanding Modern Portfolio Theory
Modern portfolio theory describes ways of diversifying assets in a portfolio in order to maximize the expected return given the ownerâ€™s risk tolerance. 
Managing Wealth
Achieving Optimal Asset Allocation
Minimizing risk while maximizing return with the right mix of securities is the key to achieving your optimal asset allocation. 
Financial Advisor
The Workings Of Equity Portfolio Management
Achieve analytical efficiency by applying your evaluation to a key set of stocks. 
Investing
Explaining The Efficient Frontier
Most investment choices involve a tradeoff between risk and reward. The "Efficient Frontier" is a modern portfolio theory tool that shows investors the best possible return they can expect from ... 
Investing
Modern Portfolio Theory vs. Behavioral Finance
Modern portfolio theory and behavioral finance represent differing schools of thought that attempt to explain investor behavior. Perhaps the easiest way to think about their arguments and positions ... 
Financial Advisor
Risk Tolerance Only Tells Half The Story
Just because you're willing to accept a risk, doesn't mean you always should. 
Financial Advisor
Example of Applying Modern Portfolio Theory (MPS)
Modern Portfolio Theory: brush up on key mathematical framework used in investment portfolio construction. 
Investing
The History Of The Modern Portfolio
Learn how the writings of John Burr Williams and Harry Markowitz led to the creation of the investment portfolio. 
Investing
How to Create a Risk Parity Portfolio
Learn about how risk parity uses leverage to create equal exposure to risk among different asset classes in portfolio construction.