Optimal capital allocation to efficient frontier portfolios
[RiskyRisk, RiskyReturn, RiskyWts, RiskyFraction, OverallRisk,
OverallReturn] = portalloc(PortRisk, PortReturn, PortWts,
RisklessRate, BorrowRate, RiskAversion)
 Standard deviation of each risky asset efficient frontier
portfolio. A number of portfolios (  
 Expected return of each risky asset efficient frontier
portfolio. An  
 Weights allocated to each asset. An  
 Riskfree lending rate. A decimal number.  
 (Optional) Borrowing rate. A decimal number. If borrowing
is not desired, or not an option, set to  
 (Optional) Coefficient of investor's degree of risk aversion.
Higher numbers indicate greater risk aversion. Typical coefficients
range from 2.0 through 4.0 (Default =

[RiskyRisk, RiskyReturn, RiskyWts, RiskyFraction, OverallRisk,
OverallReturn] = portalloc(PortRisk, PortReturn, PortWts, RisklessRate,
BorrowRate, RiskAversion)
computes the optimal risky portfolio,
and the optimal allocation of funds between the risky portfolio and
the riskfree asset.
RiskyRisk
is the standard deviation of the
optimal risky portfolio.
RiskyReturn
is the expected return of the
optimal risky portfolio.
RiskyWts
is a 1
byNASSETS
vector
of weights allocated to the optimal risky portfolio. The total of
all weights in the portfolio is 1.
RiskyFraction
is the fraction of the complete
portfolio allocated to the risky portfolio.
OverallRisk
is the standard deviation of
the optimal overall portfolio.
OverallReturn
is the expected rate of return
of the optimal overall portfolio.
portalloc
generates a plot of the optimal
capital allocation if you invoke it without output arguments.
Bodie, Kane, and Marcus, Investments, Second Edition, Chapters 6 and 7.