A neural network is developed to mimic a human brain. The neural network consists of units and links that connect between units. Various types of neural networks are categorized into two classes: (1) back-propagation hierarchical neural network and (2) mutual-connected neural network. Generally speaking, it is hard to fix the number of units to build a neural network for solving problems. So the number of units is decided on the basis of experts' experience. In this paper, we explain a learning method how to decide the structure of a neural network for problems. The learning method is named structural learning. Even if we give a sufficient number of units, the optimal structure will be decided in the process of learning. The objective of the paper is to explain the structural learning of both hierarchical and mutual connecting neural networks. Both networks obtained and showed the sufficiently good results. In the stock forecast by a general neural network, the operation and the system cost are very large because a lot of numbers of hidden layer units in the network are used. This research tried the optimization of the network by the structured learning, and evaluated the practicality.