Portfolio optimization is frequently used method for the best portfolio selection, according to some objective. Heuristic techniques designed for solving a problem finding an approximate solution when classic methods fail to find any exact solution, have often used in portfolio selection problem. However, almost none of these techniques used a neural network to allocate the proportion of stocks. The main goal of portfolio optimization problem is minimizing the risk of portfolio while maximizing the expected return of the portfolio. This study tackles a neural network in order to solve the portfolio optimization problem. The data set is the daily price of Istanbul Stock Exchange-30 (ISE30) from May 2015 to May 2017. This study uses Markowitz's Mean-Variance model. Indeed, the portfolio optimization model is quadratic programming (QP) problem. Therefore, many heuristic methods were used to solve portfolio optimization method such as particle swarm optimization, ant colony optimization etc. In fact, these methods do not satisfy stock markets demands in the financial world. This study proposed a nonlinear neural network to solve the portfolio optimization problem. In the implementation phase, the proposed method for portfolio optimization problem has more effective results than present methods.