We consider some problems in the stochastic portfolio theory of equity markets. In the first part, we maximize the expected terminal value of a portfolio of equities. The optimal investment problem is then solved by the stochastic control approach. We next consider a portfolio optimization problem in a L\'evy market with stochastic interest rates. Compared with Merton's model, there are two extra terms coming from the jump component of the stock price and the interest rate risk respectively in the optimal portfolio. The implication is that given the jump risk the investor should invest more in the equity when the stock price and the interest rate are positively correlated, and less when the two are negatively correlated. Our other observation is that given the interest rate risk and the same return as the pure diffusion case the investor should reduce her investment in the equity when the jump component presents in the stock price. We consider relative arbitrage for an infinite market in the second part, and extend the relative arbitrage theory of equity markets to a market which consists of a countably infinite number of assets. One of our goals is to incorporate the bond market, because theoretically the zero coupon bond market is an infinite market. Our conclusion is that there exist relative arbitrage opportunities over arbitrary time horizons in this market under the condition that the capitalizations of the market follows the Pareto distribution. By doing so, we also improved the sufficient conditions of the relative arbitrage in the equity market and provided partial answers to an open question proposed by Fernholz and Karatzas \cite{fk}. In the last part, we study a first-order model of equity markets. Here by first-order model we mean the growth rate and the volatility of the stock depend on the rank of the stock in the market. More precisely, we assume that the largest stock has zero growth rate and all the other stocks have positive growth rates; and the volatility of the stocks are the same and constant. Our purpose is to study the size effect of the equity market, which is often observed and means that the larger stocks have relatively smaller return and the small stocks have relatively larger return. We apply the stochastic portfolio theory to study the structure and the properties of this market, for example, the capital distribution, the portfolio performance and the diversity of the market.