During the past 65 years, there have been tremendous efforts on portfolio selection problem. The standard Markowitz mean–variance model to portfolio selection includes tracing out an efficient frontier, a continuous curve demonstrating the tradeoff between return and risk. This frontier can be often detected via standard quadratic programming, categorized in convex optimization. Traditional Markowitz problem has been recently extended into a new form of mixed integer nonlinear problems by considering various constraints such as cardinality constraints, industry limitation, etc. This paper proposes a mixed integer nonlinear programming to determine optimal asset allocation on Tehran Stock Exchange. The results have indicated that a petrochemical firm named Farabi has gained 44% of the portfolio followed by a drug firm named Kosar Pharmacy gaining 28%. In addition, banking sector was the third winning firm where Eghtesad Novin bank gained nearly 10% of the portfolio. Minerals and mining firms were the next sector in our portfolio where Gol Gohar Iron Ore and Tehran Cement collected 0.73% and 0.57% of the portfolio, respectively. In our survey, auto industry gained only 0.26% of the portfolio, which belonged to Saipa group.