In the stock market the price changes are subject to the law of demand and supply, that the price rises when there is excess demand, and the price falls when there is excess supply. It seems natural to assume that the price raises if the number of the buyer exceeds the number of the seller because there may be excess demand, and the price falls if the number of seller exceeds the number of the seller because there may be excess supply. Thus a trader, who expects a certain exchange profit through trading, will predict every other traders’ behaviour, and will choose the same behaviour as the other traders’ behaviour as thoroughly as possible he could. The decision-making of traders will be also influenced by changes of the firm’s fundamental value, which can be derived from analysis of present conditions and future prospects of the firm, and the return on the alternative asset (e.g. bonds). For simplicity’s sake of an empirical analysis, lets use the ratio of ordinary profits to total capital that is a typical measure of investment, as a proxy for changes of the fundamental value, and the long-term interest rate as a proxy for changes of the return on the alternative asset.

An investment environment is defined as

**investment environment = ratio of ordinary profits to total capital – long- term interest rate**

When the investment environment increases (decreases) a trader may think that now is the time for him to buy (sell) the stock. Formally let us assume that the investment attitude of trader i is determined by minimisation of the following disagreement function e_{i}(x),

*e _{i}(x) = -1/2 ∑_{j=1}^{N}a_{ij}x_{i}x_{j} – b_{i}sx_{i}* —– (1)

where a_{ij} denotes the strength of trader j’s influence on trader i, and b_{i} denotes the strength of the reaction of trader i upon the change of the investment environment s which may be interpreted as an external field, and x denotes the vector of investment attitude x = (x_{1}, x_{2}, ……x_{N}). The optimisation problem that should be solved for every trader to achieve minimisation of their disagreement functions e_{i}(x) at the same time is formalised by

*min E(x) = -1/2 ∑ _{i=1}^{N}∑_{j=1}^{N}a_{ij}x_{i}x_{j} – ∑_{i=1}^{N}b_{i}sx_{i}* —– (2)

Now let us assume that trader’s decision making is subject to a probabilistic rule. The summation over all possible configurations of agents’ investment attitude x = (x_{1},…..,x_{N}) is computationally explosive with size of the number of trader N. Therefore under the circumstance that a large number of traders participates into trading, a probabilistic setting may be one of best means to analyse the collective behaviour of the many interacting traders. Let us introduce a random variable x^{k} =(x^{k}_{1},x^{k}_{2},……,x^{k}_{N}), k=1,2,…..,K. The state of the agents’ investment attitude xk occur with probability P(x^{k}) = Prob(x^{k}) with the requirement 0 < P(x^{k}) < 1 and ∑_{k=1}^{K}P(x^{k}) = 1. Defining the amount of uncertainty before the occurrence of the state x^{k} with probability P(x^{k}) as the logarithmic function: I(x^{k}) = −logP(x^{k}). Under these assumptions the above optimisation problem is formalised by

*min <E(x)> = ∑ _{k=1}^{N}P(x^{k}) E(x^{k})* —– (3)

subject to *H = − ∑ _{k=1}^{N}P(x^{k})logP(x^{k}), ∑_{k=-N}^{N}P(x^{k}) = 1*

where *E(x ^{k}) = 1/2 ∑_{i=1}^{N}E_{i}(x^{k})*

x^{k} is a state, and H is information entropy. P(x^{k}) is the relative frequency the occurrence of the state x^{k}. The well-known solutions of the above optimisation problem is

*P(x ^{k}) = 1/Z e^{(-μE(xk))}, Z = ∑_{k=1}Ke^{(-E(xk))} k = 1, 2, …., K* —– (4)

where the parameter μ may be interested as a market temperature describing a degree of randomness in the behaviour of traders. The probability distribution P(x^{k}) is called the Boltzmann distribution where P(x^{k}) is the probability that the traders’ investment attitude is in the state k with the function E(x^{k}), and Z is the partition function. We call the optimising behaviour of the traders with interaction among the other traders a relative expectation formation.