During past decades, financial markets have been rapidly developing throughout the world. A large number of new market instruments has appeared. With constantly widening area of existing investment, possibilities, it's becoming increasingly more difficult to manage investment portfolios. Old and trusted methods no longer work as well as they used to, thus a need for new methods and models is ever present. In this paper a problem of optimal portfolio management is approached. A Dew method of portfolio optimization based on statistic modelling is proposed and an attempt is made to solve the problem with respect to both risk and profitability. The presented method is based upon multidimensional conditional optimization and allows usage of a wide variety of optimization criteria: risk, profit, or more complex functions. Using proposed method, a portfolio structure can be derived which corresponds to a given optimization criteria, or a, Pareto optimum curve can be acquired representing various portfolios with best possible risk/profitability figures. It is also worth noting that various functions can be used for risk and profitability calculations, for example VaR for risk and ARIMA model prediction for expected profitability. A sample problem of portfolio optimization is included in the paper. The problem described is a task of finding three portfolio compositions: a maximum-yield portfolio, a minimum-risk portfolio and an optimal portfolio structure with respect to both criteria. The solution is fully described, and the acquired results are explained.