Advances in Computing
p-ISSN: 2163-2944 e-ISSN: 2163-2979
2012; 2(1): 6-11
doi:10.5923/j.ac.20120201.02
Majid Vafaei Jahan
Department of Software Engineering, Mashhad Branch - Islamic Azad University, Mashhad, Iran
Correspondence to: Majid Vafaei Jahan, Department of Software Engineering, Mashhad Branch - Islamic Azad University, Mashhad, Iran.
| Email: | ![]() |
Copyright © 2012 Scientific & Academic Publishing. All Rights Reserved.
One of the techniques to resolve the problem more quickly is using the multi-scale spatial dimension reduction. In classical theory, system analysis based on multi-scaling is extremely difficult, because it is dependent on the behavior of every component analysis and understanding the relationship between them. The new achievements in this field show that most systems cannot be scaled at any condition. Regardless to this property of the system, Kadanoff's theory shows a necessary condition of scaling. Based on this theory, the best condition of scaling occurs in the phase transition condition at the critical temperatures of material. In this condition, upper-scale system behavior is approximately similar to the main-scale system behavior. This article is benefited from this theory and is presented the new algorithm that is named Simulated Annealing Multi-Scaling (SAMS). This algorithm is based on the spin glass paradigm to solve the NP-complete portfolio selection problem as a case study. Due to many relationships between stocks, the problem scaling, is equivalent to loss of part of the data, hence the possibility to achieve the ground state decline so much. By using this theory, it is shown that the best time to change the scale of the problem with minimum error occurs during its phase transition. Tests on five major stock exchange data show, this algorithm, in addition to confirming Kadanoff's theory in application, has more convergence speed than traditional methods such as SA and also, provides the possibility of using parallel processing in optimization problems.
Keywords: Ising Spin Glass Model, Portfolio Selection Problem, Multi-Scaling, Kadanoff's Scaling Picture Theory, Parallel Processing
Cite this paper: Majid Vafaei Jahan, Multi Scale Spin Glass Based Portfolio Selection, Advances in Computing, Vol. 2 No. 1, 2012, pp. 6-11. doi: 10.5923/j.ac.20120201.02.
become represented into the algorithms and formulas in scale
[8].
shows the scale factor and its numerical value is smaller than or equal to 1 and is greater than zero. Value 1, represents the main glass and, smaller than 1, indicates the glass in upper-scale. In renormalization group theory, first, the glass is clustered. It is assumed that each cluster of spins is a new spin in upper-scale glass. In new glass, with less spins, it is assumed the energy equations remain constant during the scaling and it can be used for upper-scale without any changes. It should be mentioned that there are various clustering algorithms and can be studied as sample in[9,11]. This article, dose not talks about the glass clustering; the desired clustering is more like making mesh. In other words, kind of division and regional position on the glass is performed. After clustering, for each smaller glass and upper- scale glass, ground state is calculated using heuristic algorithm. This operation can be performed in several stages as much as scaling allows.![]() | Figure 1. Glass with scale factor, in this glass, there are twenty spin |
![]() | Figure 2. Glass with scale factor, a glass with twenty spin renormalized to a glass with 2 spin that each one has ten spin |
![]() | (1) |
is the energy of the glass and
is total number of spins in the glass. The sum
runs over all pairs of nearest neighbors (in this paper, glass is long range spin glass, and each spin is nearest neighbor of all other spins),
denotes the strength of the bond connecting spins
and
.
describes a ferromagnetic interaction, while
describes an anti-ferromagnetic interaction. The quantity
is the external field acting on spin
and describes the energy due to the spin's orientation. Also, the factor
corrects for double counting of the interaction between every two neighboring spins. Here the task is to find a spin configuration
that minimizes the energy of the spin glass, given
For calculating the energy of upper-scale glass, the strength of the bond between spins
and external field
energy must first be calculated. For this purpose, formula (2) is used for calculating the energy between spins and formula (3) is used for calculating the external field energy per spin[9].![]() | (2) |
![]() | (3) |
is the total spin of each cluster and
is the total spin in glass in upper-scale. So, the total number of spins of main scale glass is equal to
.Considering the above definitions and regarding to the renormalization theory the energy per glass in upper-scale is calculated as follows:![]() | (4) |
![]() | Figure 3. Algorithm SAMS, based on Kadanoff's theory. Row 5, can be executed after renormalization for finding glass ground state; it is not part of SAMS algorithm |
![]() | (2) |
![]() | (3) |
![]() | (4) |
![]() | (5) |
is the number of different assets,
is the mean return of asset
, and
is the covariance between returns of assets
and
. The decision variable
represents the fraction of capital to be invested in asset
. Eqs. (2)-(3) are two cost functions that should be solved with constraints (4) and (5).
is the mean return of asset
in
intervals of time, i.e.
, where
is the
asset value at the beginning and
is the
asset value at the end of each interval.In this paper we change the multiobjective problem into a multimodal problem with single objective function as follows,![]() | (6) |
![]() | (7) |
![]() | (8) |
be the risk aversion parameter. If
then Eq. (6) represents maximum portfolio mean return (without considering the variance) and the optimal solution will be formed only by the asset with the greatest mean return. The case with
represents minimizing the total variance associated with the portfolio (regardless of the mean returns) and the optimal solution will typically consist of several assets. Any value of
inside the interval (0,1) represents a tradeoff between mean return and variance, generating a solution between the two extremes,
and 1.![]() | (9) |
![]() | (10) |
represents the proportion of capital to be invested in asset i; and in spin glass, we can define
to be the state of spin i. So the problem of portfolio selection can be solved by minimizing the mapped function as in Eq. (6).For finding the minimum of optimization function Eq. (6) with regard to constraints (7)-(8), we first randomly place the possible assets into a long range glass (Full connection glass). All of the spins in this structure are initialized to random values. Therefore, we can use some heuristic algorithm or methods such as SA to select the best assets by finding the ground state or minimum energy of the glass.According to the SA algorithm, a spin is chosen randomly at every flip and the value of the selected spin is increased by
. Accordingly, the value of neighboring spins changes to meet the constraints (7) and (8).For the heating and cooling schedule, procedures related to SA are used, as in[15,16]. To do so, the temperature of the network is considered to be initially set to
(at high temperatures all states can occur). Each time the changes are applied the temperature gradually decreases until it reaches near zero. Temperature variations can be governed by the following formula, ![]() | (11) |
.![]() | Figure 4. Probability density functions for covariances between assets in 5 major stock markets from 1992 to 1997 from data in [17] |
![]() | Figure 5. Phase Transition Temperature for five stock markets [17], this temperature is the same for all stocks |
) is equal to 1 in low temperatures, where E is the amount of glass energy and
is the actual minimum of the energy function. As temperature rises, glass energy also changes and the probability of reaching ground state is expected to gradually decrease. However, this drop is delayed until phase transition, where a sudden drop occurs. After phase transition temperature (critical temperature), the probability of reaching ground state decreases significantly. As shown in Fig. (8), this temperature is approximately 5.8* 10-5 for all of the five mentioned stocks. At this temperature, system is not in ground state and selecting any state as answer of the problem is unlikely to be a ground state.After the spin glass was placed in phase transition condition, renormalization process is performed. In this case, the glass is divided into several smaller glasses. Also according to formulas (2) and (3), a upper-glass scale is produced. Now, SA algorithm applies for upper-scale glass and all main-scale glasses. The results show that the time to reach to optimal state reduced effectively. So that, if the starting temperature without using renormalization process is
, then temperature, for the case with using renormalization process is approximately
.This means, the SA algorithm needs lower temperature for initializing and is caused increasing convergence speed of the algorithm.Table (1), shows the time of convergence speed to finding spin glass ground state for two SA and SAMS algorithm. As shown, productivity (the ratio of the time of finding ground state that initialize with applying SAMS algorithm to the time of finding ground state with random initializing) is significant. For example, in Hang Seng stock market, productivity is 0.81 percent.In this experiment, the scale factor is 0.5 and glass is divided into two separated glasses.This experiment shows that dividing glasses into two separated glass cause higher convergence speed in finding its ground state but it may not find the ground state of the main glass respectively. However, the upper-scale glass ground state help to provide better initialization condition.Advantages in using this algorithm can be expressed as follows: 1) Initializing glass with one thousandth of original temperature means higher convergence speed and savings in time and energy. 2) Many of inappropriate states that were searched by SA, was not explored by SAMS; because of exploiting in the range of optimal state. 3) Provides possibility of using parallel processing for each glass separately. 4) If the bond energy between spins is weak then the SAMS algorithm gives better response. This is because, loosely interaction between spins, as expressed in [7], increase the local behavior of each spin and causes the local search methods, have greater accuracy to find the optimal states.| [1] | Y. Bar-Yam, "About Enginerring Complex Systems: Multiscale Analysis and Evolutionary Engineering," Spiringer Verlag Berlin Heidelberg, pp: 16-31, (2005). |
| [2] | Y. Bar-Yam, Yaneer, "Dynamics of Complex Systems," Addison Wesley Longman, Inc., pp: 146-180, (1997). |
| [3] | D. Braha, Y. Bar-Yam "Topology of large-scale engineering problem-solving networks," Physical Review E, Vol. 69, 016113 (2004). |
| [4] | D.P. Landau, K. Binder, "A Guide to Monte Carlo Simulations in Statistical Physics," Second Edition, Cambridge University Press, pp: 1-45 (2000). |
| [5] | A. K. Hartmann, H. Rieger, "Optimization Algorithms in Physics," Wiley-VCH Verlag Co, pp: 46-121, (2002). |
| [6] | J.Z. Justin, "Phase Transitions and Renormalization Group," Oxford University Press, pp: 79-92, (2007). |
| [7] | J,Hasty, K. Wiesenfeld, "Renormalization of self-organized critical models," Annals of the New York Academy of Sciences, Issue Long-range correlations in Astrophysical Systems,Vol. 848, pp:9–17, (1998). |
| [8] | M.E. Fisher, "Renormalization group theory: its basis and formulation in statistical physics," Reviews of Modern Physics, Vol. 70, No. 2, (1988). |
| [9] | J. Houdayer and O.C. Martin, "Hierarchical approach for computing spin glass ground states," Physical Review E, Vol. 64, 056704, (2001). |
| [10] | M.Vafaei Jahan, M.R. Akabazadeh-T, "From Local Search to Global Conclusions: Migrating Spin Glass-based Distributed Portfolio Selection," IEEE transaction on Evolutionary Computation, No. 14, Issue 4, pp:591-601, (2010). |
| [11] | N. Kawashima, "Optimizataion Algorithms based on Renormalization Group," Progress of Theoretical Physics Supplement, Vol. 138; pp. 448-453(2000). |
| [12] | E.Bolthausen, A.Bovier, "Spin Glasses," Springer-Verlag Berlin Heidelberg, pp: 17-49, (2007). |
| [13] | H. Markowitz, "Portfolio Selection," Journal of Finance, No 7:77-91, (1952). |
| [14] | Ran El-Yaniv, "Competitive Solutions for Online Financial Problems," ACM computing Surveys, Vol. 30, No. 1, March (1998). |
| [15] | L. Ingber, "Simulated Annealing: Practice versus Theory," Mathematical Computer Modeling, Vol. 18, No. 11, Dec (1993). |
| [16] | Y. Crama, M. Schyns, "Simulated Annealing for Complex Portfolio Selection Problems," European Journal of Operational Research 150, pp: 546-571, (2003). |
| [17] | Portfolio selection benchmark data at "http://people.brunel.ac.uk/~mastjjb/jeb/orlib/portinfo.html" |
| [18] | A. K. Hartmann, M. Weigt, "Phase Transitions in Combinatorial Optimization Problems, Basics, Algorithms and Statistical Mechanics," Wiley-VCH Verlag Co, pp: 1-91 (2005). |
| [19] | D.Coppersmith, D.Gamarnik, M.Hajiaghayi, G.B. Sorkin, "Random max sat, Random max cut, and Their Phase Transitions," Journal of Random Structures and Algorithms, Vol. 24, Issue 4,pp:502-545, (2003). |