Portfolio optimization and building of its efficient frontier