You are on page 1of 8

JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617

HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 99

Forecasting Gold prices using Fuzzy C


means
Pushpa Rani Suri † and Neetu Sardana ††,

Abstract- Gold is a precious metal since past and consequently its price forecast has been a subject of interest among
people. The demand for this commodity is on the rise. Due to increase in its demand, it is necessary to develop a model
that reflects the structure and pattern of gold market and forecast movement of gold price.
For this reason, we make an attempt to develop a forecasting model for predicting gold prices. We use Fuzzy C Mean
(FCM) based on the Takagi-Sugeno Model, to forecast gold price. The results obtained are satisfactory.

Index Terms- Gold price, forecasting, Fuzzy C Means, forecast, Time series, Takagi Sugeno, weighted least square.

——————————  ——————————

1 INTRODUCTION: methodology   that   has   been   widely   and 


successfully applied in various areas like 
Time series forecasting is a task of predicting 
the   next   value   of   an   equity,   interest   rate, 
pattern   recognition,   machine   learning, 
currency price, etc. from the history of the time 
forecasting,   share   marketing,   risk   analysis, 
series. One of the problems in this approach is 
image analysis and bioinformatics [1­4].
that there is limited knowledge available about 
Gold   plays   an   important   role   in   maintaining 
the time series movements due to uncertainties 
value,   investment   and   national   economic 
in   the   real   data.   Moreover,   real   data   are 
stability. Moreover international trade, foreign 
generally   non­linear   in   nature.   Existing 
currency   policy   and   fiscal   deficit,   the   stock 
conventional   techniques   are   not   capable   of 
market, international political turmoil and war 
handling   the   uncertainties,   and   hence,   some 
have   a   significant   impact   to   the   gold   price 
new techniques are required. 
directly or indirectly. Therefore, it is necessary 
Data   mining   techniques   has   been   used 
to   carry   out   the   prediction   research   on   gold 
extensively   to   handle   the   uncertainties.   The 
price. [5­7]
field   of   data   mining   is   used   to   discover 
In   view   of   the   forgoing   discussion,   we 
patterns or concepts that are not evident. The 
implemented   fuzzy   clustering   for   forecasting 
process   usually   consists   of   the   method   that 
gold prices. It may be noted that to the best of 
transforms the data to a suitable format, cleans 
our   knowledge   no   work   has   been   done   for 
it, and infers or makes conclusions related to 
gold   price   forecasting   based   on   Fuzzy 
data. Fuzzy system provides an interesting tool 
clustering. In forecasting, the basic objective is 
for such tasks, mainly because of its capability 
to   identify   the   behavior   of   the   system.   Our 
to   represent   imperfect   information.   Fuzzy 
objective is to implement fuzzy clustering for 
system has very strong functional capabilities 
short­term forecasting considering uncertainty 
to fit or map a function to a finite number of 
present in the Gold price. 
input­output   data.   If   Fuzzy   Inference   System 
(FIS)   is   properly   constructed,   then   it   can 
Clustering   is   a   method   of   unsupervised 
perform very complex operations, even more 
learning,   in   which   observations   are   known, 
complex   than   those   performed   by   a   linear 
with which homogeneous clusters are formed. 
mapping.   In   the   last   decade   a   great   deal   of 
The division is based upon attribute values of 
attention   has   been   paid   to   the   statistical 
observations.   The   goal   is   to   divide   the 
analysis of data based on fuzzy clustering and 
observation   in   such   a   way   that   observation 
it   has   been   shown   that   clustering   based 
assigned   to   the   same   cluster   should   be   as 
function approximation is indeed the optimum 
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 100

similar as possible. Clustering methods can be 
heuristic,   hierarchical   or   objective   function  Equation   (2)   states   a   function   approximation 
based.   Here,   we   use   fuzzy   clustering  problem.   It   is   known   to   be   good 
methodology   based   on   objective   function   for  approximation   if   f   approximates   g   over   the 
calculation of fuzzy membership function for  whole   space   of   inputs   X=   (x1,   x2,…,   xn).   In 
each observation and center of each cluster [8].  other   words,   we   wish   to   tune   fuzzy   system 
With the known membership function for each  f(x/θ) so that e(x) is small.
input   variable   (inputs   gold   prices   of   two 
consecutive   months   and   output   is   the   gold  A fuzzy model of the MISO system is a set of n 
price   of   next   successive   month),   we   can  rules that can be built using the input­output 
perform   weighted   least   square   computations  training   data.   The   general   rule   structure   If 
for   determining   the   parameters   of   the   linear  ­Then   rules   for   a   MISO   system   can   be 
consequent functions. represented in the form.
The rest of the paper is organized as follows. In  A1j and x2 is  A2j  then p1 is  g j ( x)
1

section 2, we present modeling of Fuzzy Logic  R1: If x1 is 
Control   System.   Section   3,   describes   how       
membership   function   is   calculated   using    Also…also
clustering.   Section   4,   performs   least   square             
methodology   for   calculating   fuzzy   rule  Aj Aj g nj ( x)
consequents.   In   Section   5,   we   present   a   Rn: If x1 is  1 and x2 is  2 then pn is  , 
numerical   illustration   to   describe   the  where i = (1, R) and R is number of rules.
methodology. Finally the paper is concluded in 
section 6. (3)
In MISO fuzzy system, in order to form If­then 
rule   we   are   using   fuzzy   clustering   for 
optimization to pick the clusters and hence the 
2: MODELING OF FUZZY LOGIC CONTROL premise membership function parameters. The 
SYSTEM consequent parameters are chosen using least 
We   consider   a   Multiple   Input   Single   Output  square   method.   Takagi­Sugeno   method   is 
(MISO)   system.   The   task   is   to   use   past   gold  forming the consequent portion of the If­Then 
prices upto time t to predict the price of gold at  rule, which is a function of crisp inputs. 
time t+δt in the future. The input for this type  The Takagi­Sugeno fuzzy system is defined by 
of   prediction   is   N   number   of   prices   equally  the following equation.                
spaced S i.e. monthly, yearly etc. Hence, if x1, 
x2     have gold prices at t, t+1 and p is a gold 
price   at   t+2   where   t   is   point   of   time   that   is 
R
spaced monthly w.r.t each year.
The fuzzy system for the gold price forecasting  ∑g
j =1
j ( x )µ Hj ( x )
is defined as  p = f (x / θ ) = R

                     
f :x→ p  ∑µ j
H ( x)
                               (1) j =1
(4)
Here we wish to identify g(x) that denotes the         
whole physical system of time series consisting     where
gold   prices.   We   choose   finite   set   of   input      R is the number of rules in rule base.
output data pairs G (training data set) where G 
is a subset of g. This training dataset G is used  µ Hj ( x ) is the membership function associated with H j
to construct a fuzzy system f by manipulating 
θ  so that f(x/θ) approximates g as closely as 
possible. So that H j represents the premise certainty for rule j

g ( x) = f ( x / θ ) + e( x )            
                                            (2)
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 101

g j ( x) = aTj x
        and     where 
 u11 u12 ... u1n 
a j =  a j ,0 , a j ,1 , a j ,2 , a j ,3 ,..., a j ,n  u u ... u2 n 
    and 
U =  21 22 where i = 1, 2, …, M and k = 1,
x = 1, x  T
 ... 
 
            uc1 uc 2 ... uMR 
Here,   we   use   fuzzy   clustering   coupled   with  (5)
least   squares   to   train   Takagi­Sugeno   fuzzy  j
system   to   determine   the   parameters  Center of clusters v ,can be arrayed in Matrix V as
j
a j , µ Hj ( x) g j ( x) V = v , j =1, 2... R.
 and .
(6)
FCM is use to find the membership function 
3 CALCULATIONS OF MEMBERSHIP FUNCTION and   cluster   centers   to   minimize   objective 
USING CLUSTER ANALYSIS function.
Clustering of numerical data forms the basis of  R M m

j = ∑∑ ( µij ) x i − v j
2
many   classification   and   system­modeling 
algorithm.   The   purpose   of   clustering   is   to  i =1 j =1
 
distill natural grouping of data from a data set, 
producing   a   concise   representation   of   a  (7)
system’s   behavior.   [9]   The   FCM   algorithm   is  where,   R   is   number   of   clusters   (rules),   M 
one   of   the   most   widely   used   clustering  µ
algorithms.   Professor   Jim   Bezdek   originally  number   of   input   output   data   pairs, ij     is 
introduced this technique in 1991[10].  membership function of the i­th data pair in j­
j
FCM starts with an initial guess for the cluster  th cluster,  v  is cluster center of j­th cluster.
centers, which are intended to mark the mean  Minimization   of   J   results   in   cluster   center 
location   of   each   cluster.   The   initial   guess   for  being   placed   forming   groups   of   data.   Here, 
these   cluster   centers   is   most   likely   incorrect.  “fuzziness   factor”   is   a   parameter   that 
Additionally, FCM assigns every data point a  determines the amount of overlapping of the 
membership grade for each cluster. Iteratively,  clusters   and   e(x)   determines   the   error 
updating   the   cluster   centers   and   the  tolerance.  
membership grades for each data point, FCM  We begin the process by initializing the cluster 
iteratively   moves   the   cluster   centers   to   the 
right location within a data set so that error is  v0j )   via   random   number   generator 
centers   (
minimized
vj
In   fuzzy   clustering,   data   are   bound   to   each  such that each component   0   should lie with 
cluster   by   means   of   a   membership   function,  the training dataset. Consequently, for the next 
which   represents   the   fuzzy   behaviour   of   the  iterations cluster center is calculated as
fuzzy   system.   We   find   the   optimum 
M
membership   values   of   all   data   points   in   all 
clusters whose factors are numbers between 0  ∑ x (µ i new m
ij )
and   1   represents   the   degree   of   membership  v j
new = i =1
M
between   data   and   centers   of   clusters. 
Membership   values   of   all   data   points   in   all 
∑ (µ
i =1
new m
ij )
 
clusters   uik,   can   be   combined   in   a       M×R  (8)
matrix represented as We compute the membership values for each 
                                        cluster center as 
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 102

 
The   consequent   parameters   in   each   rule   are 
−1 estimated   separately   using   WLS   method   by 
 1
 minimizing the following criterion
 R  x i − vold 
2 m −1
j
 2
= ∑   M
µijnew  j j = ∑ ( µij ) 2 ( y i − ( xi )T a j )
 k =1  x i − vold 
2
k
  i =1 For j=1,2, …, 
     R. (11)
(9) T
        x i = 1, ( xi )T 
where   ,   is   a  unitary   column 
where   i=   1,2,…,M   and   j=1,…,R.   such   that 
R µ
extend   the   regression   matrix. ij   is 
∑µ new
ij =1 membership function for i­th data pair and j­th 
summation j =1 .                                    cluster that resulted from clustering algorithm. 
We   will   compare   the   distance   between   the 
aj
vj   , defines the output associated to j­th rule 
current   cluster   centers   new   and   the   initial 
j j for   i­th   training   data   pair,  
y i   is   the   output 
v v
cluster   centers   =     at   the   end   of   first 
old 0
portion of the i­th data pair d(i) = 
( xi , yi ) .
iteration and will proceed based on following 
criteria     Rule consequent can be computed as 
j
vnew − vold
j
< e( x ) g j ( x) = aTj x
If     (for j = 1,2,…,R)   where 
        Calculate the final membership functions  a j =  a j ,0 , a j ,1 , a j ,2 , a j ,3 ,..., a j ,n 
w.r.t each clusters and stop     and 
       Else x = 1, x  T

        Continue with iterations, that is compute  , for j=1, …, R.
membership   grades   and   cluster   centers   and 
check for the condition.                
(10) (12)

The statement (10) states that cluster centers ( Here, the weighted least squares estimated of 
j the consequent parameter is calculated as
v )   accurately   represents   the   input   data. 
new

With   respect   to   each   cluster   centers   and   we  a j = [( X T D j2 X ) −1 X T D2j X ]


µ new (13)
have   resultant   membership   grades   ij  
where   i=   1,…,M   and   j=1,…,R.   this   forms   the  Where
T
premise membership functions. 1 1 1 1 ... 1 
X = 1
4 DESIGN OF FUZZY RULE CONSEQUENT x x2 x3 x4 ... x M 
For rule consequent least square methodology 
is applied as least square method which is a 
     
Y = [ y1 , y 2 ,..., y M ]T
very   popular   technique   used   to   compute 
estimation   of   parameters   and   to   fit   data.   It 
( ( ))
2
exists in various variations. Its simpler version  D = diag  µ1 j , µ2 j ,..., µMj 
is   ordinary   least   square   (OLS),   a   more 
sophisticated   version   is   called   weighted   least      
square   (WLS),   which   often   performs   better  5 NUMERICAL ILLUSTRATION
than   OLS   because   it   can   modulate   the  In   this   section   we   present   a   numerical 
importance   of   each   observation   in   the   final  illustration   to   describe   the   methodology.   We 
solution[11].   So   we   use   WLS   for   computing  use data consist of 224 monthly observed gold 
rule consequent. price (Gram/US dollars) from January 1991 to 
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 103

December 2009 [12]. A MISO model based on  cluster   centers.   We   will   continue   this 


fuzzy   logic   is   being   developed   to   obtain   a  procedure till this condition (10) is satisfied.
reliable prediction of the gold price based on 
fuzzy clustering method. Here,   condition   justified   at   iteration   63   so, 
We   implement   this   algorithm   for   forecasting  FCM   algorithm   terminated   at   63   iterations. 
Gold price problem and analysis the results for  After   63   iterations,   resultant   membership 
this problem.  grades   forms   the   premise   for   Takagi   sugeno 
Here,   we   take   fuzziness   factor   m=2,   e   (x)  function.   We   have   matrix   U   of   (224*4) 
=0.001 and M =224. Also we take R=4, and are  dimension can be represented as
randomly chosen to be 
TABLE 4: MEMBERSHIP GRADES (224*4)
TABLE 1: CLUSTER CENTERS UMR 1 2 3 4
1 0.027590935 0.969059892 0.002664428 0.000684745

v01 v02 v03 v04 2


3
0.068214715
0.094352675
0.925924063 0.004629334 0.001231887
0.898269759 0.005814974 0.001562592
4 0.129422199 0.861591565 0.007066364 0.001919872
250.03 338.46 600.86 888.12 5 0.087179582 0.905749965 0.005577225 0.001493229
6 0.04206441 0.953849398 0.003236131 0.000850061
273.44 467.45 729.37 996.46 7 0.088313996 0.904474127 0.005688302 0.001523574
8 0.203038899 0.785325005 0.009115518 0.002520578
9 0.184381985 0.804492451 0.008724497 0.002401067
With   respect   to   initial   centers,   membership  10 0.108018002 0.883963875 0.006313681 0.001704442
11 0.095476099 0.89712966 0.005827459 0.001566783
values   are   being   calculated.   As   we   have   4  12 0.129498298 0.861442212 0.007124267 0.001935223
cluster   centers   and   224   inputs   so   we   have  13
14
0.17526476
0.260199042
0.81404492 0.008385537 0.002304783
0.726741824 0.010205361 0.002853774
(4*224=896) membership grades. With respect  15 0.409422503 0.575951344 0.011368821 0.003257332
16 0.485355122 0.500076471 0.011296595 0.003271812
to   each   cluster   center   we   will   have   224  17 0.460197629 0.525165025 0.011359488 0.003277857
membership grades calculated using equation  18
19
0.295965991
0.276668955
0.690256377 0.010753547 0.003024085
0.709926345 0.010468596 0.002936104
(9). New cluster centers are compute using (8)  20 0.349972841 0.635841842 0.011048964 0.003136352
21 0.335878476 0.65008322 0.010939592 0.003098712
during iteration 1 and 2 are 22 0.437393516 0.547848869 0.01146018 0.003297435
23 0.540232493 0.445510287 0.011036082 0.003221139
24 0.613068901 0.373424343 0.010430175 0.003076581
TABLE 2: CLUSTER CENTERS DURING ITERATION 1 25 0.669022014 0.318448261 0.009658472 0.002871254
26 0.658291175 0.328981477 0.009814381 0.002912967

v1new 2
vnew 3
vnew 4
vnew 27
28
0.512074284
0.178786969
0.473211254 0.01140021 0.003314252
0.809491037 0.009200616 0.002521377
29 0.029682667 0.967200617 0.002472734 0.000643982
30 0.011427255 0.986788978 0.001428753 0.000355014
298.78683962 388.2553923 646.743709680 900.456608058 31 0.006468743 0.992424863 0.000888401 0.000217993
981938 9515228 35691 16692 32 0.06499012 0.928591473 0.005079924 0.001338483
298.67637230 390.4146410 659.596276549 913.295833458 33 0.107138085 0.88478855 0.006358755 0.00171461
34 0.034692706 0.961715847 0.002848272 0.000743175
965627 2851739 65277 86525
35 0.005009345 0.994291361 0.000558655 0.000140639
36 0.000724496 0.999153389 0.0000981 0.0000241
37 0.001243759 0.998550907 0.000164762 0.0000406
38 0.0000526 0.999938999 0.0000067 0.00000166
TABLE 3: CLUSTER CENTERS DURING ITERATION 2 39 0.002567062 0.997052189 0.000304628 0.0000761
40 0.002121147 0.997577434 0.000240921 0.0000605
v1new 2
vnew 3
vnew 4
vnew 41
42
0.000388164
0.00079582
0.999549447 0.00005 0.0000124
0.999068365 0.000109087 0.0000267
43 0.001103859 0.998721501 0.000139971 0.0000347
44 0.004001849 0.99530467 0.000557209 0.000136272
295.73772065 385.9424821 639.610092719 895.049730689 45 0.006232446 0.992540155 0.000989827 0.000237572
631 36 553 370 46 0.002943143 0.996532331 0.000421771 0.000102754
295.70988111 387.0276010 649.482028813 905.160417527 47 0.001275617 0.998528828 0.000156602 0.000039
48 0.002267398 0.99741395 0.000254617 0.000064
270 73 850 164
49 0.004211959 0.995219258 0.000454012 0.00011477
50 0.00237717 0.997283694 0.000271094 0.000068
At each iteration cluster center are calculated  51
52
0.003222715
0.004052342
0.996209831 0.000456167 0.000111287
0.995204888 0.000597726 0.000145044
based   on   values   of   the   immediate   previous  53 0.001335072 0.998431931 0.000187263 0.0000457
54 0.00183962 0.997834359 0.000262131 0.0000639
vj vj 55 0.000800545 0.999064945 0.00010799 0.0000265
iteration   i.e.   as   old =   0 .   We   compare   the  56 0.000106202 0.999876748 0.0000137 0.00000338
57 0.0000199 0.999976938 0.00000254 0.000000628
distances   between   the   current   cluster   centers  58 0.048332265 0.94629937 0.004259974 0.001108391
j
vj
59 0.043664404 0.951110771 0.00415424 0.001070584
vnew 60 0.01448673 0.98239335 0.002522499 0.000597421
 and the previous cluster centers old  that  61 0.030360413 0.961435673 0.0066803 0.001523615
is  we   check   for condition  (10)  and  we found  62 0.02705667 0.966003336 0.00564071 0.001299283
63 0.012960365 0.984203784 0.002293994 0.000541856
that condition was not satisfied so we proceed  64 0.008880765 0.989282813 0.001483099 0.000353323
65 0.005032608 0.994029148 0.000755376 0.000182868
with   next   iterations   that   is,   calculating   the  66 0.000441081 0.999486179 0.0000584 0.0000144
membership   grades   w.r.t.   clusters   and   then  67 0.000979996 0.998853121 0.000134035 0.0000328
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 104

68 0.001400969 0.998361695 0.000190578 0.0000468 155 0.026909118 0.966459212 0.005383198 0.001248472


69 0.00031821 0.999632526 0.0000395 0.0000098 156 0.051559724 0.931267654 0.014080025 0.003092597
70 0.002376008 0.997285281 0.000270734 0.000068 157 0.049576376 0.934380579 0.013138551 0.002904494
71 0.017285176 0.98066797 0.001628265 0.00041859 158 0.038776008 0.949780938 0.009344412 0.002098642
72 0.089876425 0.902737632 0.005825706 0.001560236 159 0.036216237 0.953407289 0.008464736 0.001911738
73 0.230064324 0.757567964 0.009677104 0.002690608 160 0.019834332 0.975948418 0.003406461 0.000810789
74 0.256128073 0.731027984 0.010039346 0.002804597 161 0.004022798 0.995245783 0.000588508 0.000142911
75 0.276700212 0.709999666 0.010386831 0.00291329 162 0.01409488 0.982775606 0.002532808 0.000596706
76 0.350787238 0.635026967 0.011048803 0.003136991 163 0.022520979 0.971887834 0.004540629 0.001050559
77 0.389283859 0.596225644 0.011271145 0.003219352 164 0.031236237 0.960247366 0.006936732 0.001579665
78 0.599223051 0.386694262 0.01087671 0.003205978 165 0.059282184 0.919869615 0.01712337 0.003724831
79 0.764367751 0.225306433 0.007932296 0.00239352 166 0.101163881 0.845364781 0.044569225 0.008902113
80 0.775196186 0.214780136 0.007696849 0.002326829 167 0.120193636 0.799059586 0.067951222 0.012795557
81 0.76776963 0.221994888 0.007861919 0.002373563 168 0.108523727 0.829509536 0.051788373 0.010178364
82 0.873764856 0.119260993 0.005325868 0.001648283 169 0.085406895 0.875259215 0.03262159 0.0067123
83 0.985146947 0.01369685 0.000872936 0.000283268 170 0.096810843 0.853480833 0.041394131 0.008314193
84 0.998790149 0.001103327 0.00008 0.0000265 171 0.102505442 0.841472797 0.046759064 0.009262696
85 0.997425974 0.002361615 0.00016001 0.0000524 172 0.088704553 0.86932299 0.034841034 0.007131423
86 0.996771771 0.002976422 0.000190075 0.0000617 173 0.090685625 0.865448372 0.036447865 0.007418138
87 0.977680054 0.020726572 0.001206848 0.000386527 174 0.093432903 0.860160587 0.038592227 0.007814283
88 0.973962794 0.024235437 0.001365912 0.000435857 175 0.10240456 0.842074688 0.046328404 0.009192348
89 0.996411173 0.003304025 0.000214843 0.00007 176 0.132396263 0.764486152 0.087285778 0.015831807
90 0.99995122 0.0000447 0.00000306 0.000001 177 0.150306133 0.682796944 0.143417577 0.023479345
91 0.996110543 0.003544021 0.000259425 0.000086 178 0.155807469 0.627007088 0.188504706 0.028680737
92 0.995709469 0.003899222 0.000293564 0.0000977 179 0.154741954 0.507906549 0.298478555 0.038872943
93 0.998205381 0.001644919 0.00011272 0.000037 180 0.113871827 0.295408873 0.542390991 0.048328309
94 0.998258916 0.001602536 0.000104504 0.000034 181 0.07590252 0.179190639 0.701248352 0.043658488
95 0.999496697 0.000461745 0.0000313 0.0000103 182 0.062009164 0.141427141 0.756494131 0.040069565
96 0.998439945 0.001423425 0.000102669 0.000034 183 0.027239868 0.056309047 0.890906986 0.025544099
97 0.99711248 0.002626541 0.000195855 0.0000651 184 0.006387107 0.011543797 0.969698985 0.012370111
98 0.996421031 0.003252901 0.000244618 0.0000814 185 0.015670368 0.028593599 0.928588494 0.027147539
99 0.992894676 0.006436637 0.000500954 0.000167733 186 0.006774589 0.013087849 0.971169276 0.008968286
100 0.983629312 0.014733038 0.001223534 0.000414116 187 0.000454931 0.000845607 0.997931949 0.000767512
101 0.951679496 0.042807441 0.004093093 0.00141997 188 0.009155098 0.017666962 0.961043309 0.012134631
102 0.923433018 0.066848474 0.007173932 0.002544576 189 0.022664414 0.046643287 0.908617724 0.022074576
103 0.916366796 0.072775904 0.008004473 0.002852827 190 0.01184813 0.023335684 0.950737261 0.014078925
104 0.931549972 0.060007009 0.006243017 0.002200002 191 0.000881344 0.001653796 0.996062527 0.001402333
105 0.94456011 0.05031335 0.003849322 0.001277218 192 0.00064881 0.001213025 0.997082436 0.001055729
106 0.972508358 0.025511294 0.001499402 0.000480946 193 0.001884032 0.003393335 0.990835795 0.003886838
107 0.9953192 0.004263483 0.000313361 0.000103956 194 0.004111576 0.007254038 0.978659286 0.0099751
108 0.992413802 0.006867929 0.000537967 0.000180302 195 0.006177384 0.010755665 0.966436932 0.016630019
109 0.992020575 0.007305713 0.000507133 0.000166578 196 0.008837567 0.015239932 0.950091957 0.025830544
110 0.993732034 0.005747663 0.000391838 0.000128466 197 0.004613557 0.008119744 0.975864107 0.011402592
111 0.990079731 0.008971021 0.000710624 0.000238624 198 0.003605714 0.006355843 0.981205026 0.008833416
112 0.978921691 0.01891127 0.001617012 0.000550026 199 0.005348743 0.009347451 0.971268427 0.014035379
113 0.983346309 0.015002101 0.001234602 0.000416989 200 0.016684438 0.028008369 0.894051073 0.06125612
114 0.991648623 0.007558273 0.000593928 0.000199177 201 0.032516791 0.051504871 0.676501143 0.239477195
115 0.979246115 0.018630367 0.001584894 0.000538624 202 0.031767005 0.047901756 0.366891276 0.553439963
116 0.970334215 0.026482755 0.002370336 0.000812695 203 0.022996122 0.033978915 0.21728524 0.725739722
117 0.963857164 0.032159959 0.002962063 0.001020813 204 0.011253931 0.016063935 0.077527919 0.895154215
118 0.952568036 0.0419716 0.004051918 0.001408446 205 0.000609394 0.000839513 0.003196552 0.995354541
119 0.954459397 0.040339333 0.00386145 0.00133982 206 0.006239044 0.008416223 0.028134092 0.957210641
120 0.953599766 0.041084586 0.003945511 0.001370137 207 0.006953363 0.009405214 0.031783571 0.951857851
121 0.939300696 0.053376732 0.005420441 0.00190213 208 0.000689571 0.000953718 0.003716166 0.994640545
122 0.935619264 0.056514849 0.005818759 0.002047128 209 0.000185872 0.000258651 0.00105115 0.998504327
123 0.933367974 0.058432133 0.006063347 0.002136546 210 0.001926061 0.002639745 0.009723353 0.985710842
124 0.945471966 0.048128452 0.004744814 0.001654768 211 0.008123808 0.011269387 0.044088799 0.936518006
125 0.962465969 0.03337198 0.003094369 0.001067682 212 0.011554793 0.016675943 0.087930424 0.88383884
126 0.955349387 0.039561157 0.003778612 0.001310843 213 0.018174398 0.026551514 0.153753463 0.801520626
127 0.958209169 0.037084136 0.003496738 0.001209957 214 0.031545479 0.047423696 0.347574736 0.573456089
128 0.977269535 0.02039885 0.00174025 0.000591365 215 0.029626708 0.044339789 0.316437931 0.609595572
129 0.991420696 0.007760447 0.000613085 0.000205772 216 0.010978005 0.015801183 0.08173632 0.891484492
130 0.982960382 0.015331457 0.001276094 0.000432067 217 0.003669187 0.00506183 0.019387858 0.971881126
131 0.975445844 0.021980731 0.001918538 0.000654887 218 0.003904128 0.005298954 0.01835069 0.972446228
132 0.981343403 0.016766331 0.001411537 0.000478729 219 0.001621598 0.002232027 0.008421003 0.987725372
133 0.992664842 0.006682947 0.000489893 0.000162318 220 0.001005729 0.001382688 0.005196091 0.992415491
134 0.998902005 0.001009599 0.0000666 0.0000218 221 0.004031379 0.005462428 0.018754367 0.971751826
135 0.991261819 0.008073887 0.000501973 0.000162321 222 0.004770347 0.006454521 0.021946779 0.966828353
136 0.944214092 0.052263589 0.002678802 0.000843516 223 0.004869765 0.006583026 0.022284819 0.96626239
137 0.856557352 0.136068317 0.005641956 0.001732376 224 0.012494445 0.016636153 0.051544983 0.919324419
138 0.863744779 0.12913747 0.00544289 0.001674861
139 0.924390657 0.071160141 0.003390437 0.001058765
140 0.892424971 0.10162127 0.004545838 0.00140792 For   consequent   optimal   output 
141 0.857840839 0.134865812 0.005579788 0.001713562
142 0.857831802 0.134875938 0.005579152 0.001713108 predefuzzification   is   applied   using   weighted 
143 0.728382746 0.260140714 0.00882676 0.002649781 least   square   method.   The   weighted   least 
144 0.350143431 0.634652162 0.011845008 0.003359399
145 0.125453942 0.865732563 0.006932326 0.001881168 squares   estimator   parameters   of   the   linear 
146 0.256110962 0.730465093 0.010493174 0.00293077
147 0.560303018 0.425361292 0.0110877 0.00324799 g ( x) = aT x
148 0.39465026 0.589457556 0.012360827 0.003531357 function   j j
  where   j=1,   2….R 
149 0.141779006 0.848736223 0.007453068 0.002031703
150 0.18244661 0.806575636 0.008608034 0.00236972 where   Jj   in   equation   11   is   minimized   were 
151 0.159847613 0.82988342 0.008062557 0.002206409 found to be
152 0.042264875 0.953259418 0.003550323 0.000925384
153 0.002382865 0.997283605 0.000266479 0.0000671 a1 = [163.7825, 0.241966, 0.293323]
154 0.003341937 0.99610634 0.000442715 0.000109008
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 105

a2 = [163.7825, 0.241966, 0.293323]
Figure a1 Figure b1
a3 = [163.7825, 0.241966, 0.293323]
900
1200
800

a4 = [163.7825, 0.241966, 0.293323]
1000
700

600 800

those are equivalent to one other.
500 2007 Actual 2009 Actual
600
400 2007 Model 2009 Model

300 400

200
200
100
0

Testing   the   accuracy   of   Fuzzy   based   gold 


0
J an Feb Mar Apr May J un J ul Aug Sep Oct Nov Dec J an Feb Mar Apr May J un J ul Aug Sep Oct Nov Dec

Y ear 2007 Y ear 2009

forecasting system:
In   the   present   section   we   present   some   test 
Figure c1 Figure d1
cases   to   investigate   the   accuracy   of   the 
proposed fuzzy based gold forecasting system.  Figure 2: Unfavorable results (a1, b1, c1, d1)
In literature it is a well­established fact that the 
forecasting accuracy is inversely related to the 
fluctuation   of   the   data   set.   Our   results   also 
strengthen   the   well­established   fact.   The 
6 CONCLUSION:
accuracy of the forecasted results for the years  In   this   paper,   we   have   developed   a   simple, 
1997, 1999, 2003, 2007 is very high (See Figures  systematic   and   iterative   methodology   for 
a, b, c, d) but at the same time the proposed  forecasting   gold   price.   The   developed 
model is not providing that much  promising  methodology   relies   on   fuzzy   clustering   and 
accuracy for the years 1994,1998, 2007, 2009(See  weighted   least   square.   Integration   of   the 
Figure a1,b1,c1,d1 ). The reason for the varying  cluster estimation methodology with the linear 
results is due to the level of fluctuation in gold  weighted   least   square   estimation   procedure 
price. It is evident from the actual data that for  helped   in   developing   a   fast   and   robust 
the   years   for   which   the   gold   prices   are   less  algorithm   for   identifying   fuzzy   models   from 
fluctuated   the   forecasting   results   are   more  numerical data. Robustness in respect to noisy 
promising but the same time for the year for  data   is   achieved   by   averaging   the   data   that 
which   gold   prices   are   highly   fluctuated   the  takes place in both the cluster estimation and 
forecasting results are not that much accurate.   least square procedure.
The   forecasting   results   obtained   using   the 
400

350
350

300
proposed   methodologies   are   very 
300

250
250
encouraging.   They   are   inline   with   the   well­
established fact in the literature of forecasting 
1997 Actual 200
200
1999 Actual
1997 Model
1999 Model
150
150

100

50
100

50
that   the   forecasting   accuracy   is   inversely 
0
0
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
related to the fluctuation of the data set. Here 
Year 1997 Year 1999
it is worthy to point out that the fluctuation in 
Figure a Figure b gold  prices   depends   on   lots   of   external   facts 
like War, Gasoline price, etc. So the proposed 
450
6 methodology is perfect in a scenario where the 
0
dependence   on   these   external   factors   is 
400

350
5
0
0
300
4
0
250

200
2003 A c tual

2003 M odel
0
3
0
2005
Actu
2005
minimal.
150
0
2 al
Mod
100
0
50 0 el
0 1
0
J an Fe b M ar A pr M ay J un J ul A ug Se p Oct N ov Dec 0
Y e ar 2 003 0
0J F MA M J J A S ON D
a e a p aYea
u u u e c o e
n b r r yr n l g p t v c
REFERENCE:
200
5
[1] Amine   Trabelsi,   Frederic   Lafont,   Mohamed 
Figure c Figure d Kamoun, Gilles   Enea  (2007),  Fuzzy identification 
Figure 1: Favorable results (a, b, c, d) of a greenhouse, Applied  Soft Computing, 1092–
1101.
395
330
[2] Jian­Qin   Chen,   Yu­Geng   Xi,   Zhong­Jun 
390

385
320
Zhang   (1998),   A   clustering   algorithm   for   fuzzy 
310
380
model identification, Fuzzy Sets and Systems, 319­
Gold Prices

300
375 1998 A ctual
1994Actual

329.
1994Model 1998 Model
370 290

365
280
360
270
355

350 260
J an Feb Mar Apr May J un J ul Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul A ug Sep Oc t Nov Dec
Year 1994 Ye ar 1998
JOURNAL OF COMPUTING, VOLUME 3, ISSUE 3, MARCH 2011, ISSN 2151-9617
HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/
WWW.JOURNALOFCOMPUTING.ORG 106

[3] Meysar  Zeinali and Leila   Notash  (2005),  “A  [10] J. C. Bezdek (1981), Pattern Recognition with 


Systematic   Method   of       adaptive   Fuzzy   Logic  Fuzzy Objective Function Algorithms. New York, 
Modeling,   Using   an   Improved   Fuzzy   c­Means  Plenum.
Clustering   Algorithm   for   Rule   Generation”,  [11] Herve abdi (2003), least square, Encyclopedia 
Proceedings   of   the   2005   IEEE   Conference   on  of Social Sciences Research Methods.
Control Applications, Toronto, Canada, 84­89. [12] Gold   London   PM   Fix­   US   Dollars, 
[4] Y.   Nakamori   and   M.   Ryoke   (1994),  http://www.kitco.com/scripts/hist_charts/yearl
“Identification of fuzzy prediction models through  y_ graphs.plx.(accessed on January 2010)
hyperellipsoidal   clustering,”   IEEE   Trans.   Syst., 
Man, Cybern., vol. 24, 1153–1173.
[5] M. C. Lineesh, K. K. Minu and C. Jessy John  Dr. Pushpa.Rani Suri is Associate Professor in
(2010),   Analysis   of   nonstationary   Nonlinear  the department of computer science and
Economic   Time   Series   of   Gold   Price:   A  application at Kurukshetra University, Haryana,
Comparative   Study,   International   Mathematical  India. She has supervised number of PhD
Forum, 5, no. 34, 1673 – 1683. students. She had published number of papers in
[6] Christopher   J.   Neely   (2004),   Implied  national and International Journals and conference
Volatility   from   Options   on   Gold   Futures:   Do  proceedings.
Econometric Forecasts Add Value or Simply Paint 
the Lilly?,June 2. Ms. Neetu Sardana is Sr. Assistant Professor in
[7] Z.   Ismail,   A.   Yahya   and   A.   Shabri   (2009),  Apeejay School of Management, Delhi, India. She
Forecasting   Gold   Prices   Using   Multiple   Linear  has Master’s degree in Computer Science. At
Regression Method, American Journal of Applied  present she is pursuing her PhD in Computer
Sciences 6 (8): 1509­1514. Science. Her area of research is XML data storage
[8] Kevin   M.   Passino,   Stephen   Yurkovich  and analysis.
(1998),”Fuzzy Control”, Addison­Wesley.
[9] Stephen   L.   Chiu   (1994),   Fuzzy   Model 
Identification based on cluster estimation, Journal 
of intelligent and fuzzy system, Vol.2, 267­278.

You might also like