Professional Documents
Culture Documents
ABSTRACT
Hidden Markov Model is elaboration of Markov chain, which is applicable to cases that can’t directly
observe. In this research, Hidden Markov Model is used to know trader’s transition to broker forex online.
In Hidden Markov Model, observed state is observable part and hidden state is hidden part. Hidden
Markov Model allows modeling system that contains interrelated observed state and hidden state. As
observed state in trader’s transition to broker forex online is category 1, category 2, category 3, category
4, category 5 by condition of every broker forex online, whereas as hidden state is broker forex online
research is making construction model , , by making a probability of transition matrix (A) from
Marketiva, Masterforex, Instaforex, FBS and Others. First step on application of Hidden Markov Model in this
every broker forex online. Next step is making a probability of observation matrix (B) by making conditional
probability of five categories, that is category 1, category 2, category 3, category 4, category 5 by condition of
every broker forex online and also need to determine an initial state probability (π) from every broker forex
sequences which is the most possible based on model , , and observed state that is the five
online. The last step is using Viterbi algorithm to find hidden state sequences that is broker forex online
categories. Application of Hidden Markov Model is done by making program with Viterbi algorithm using
Delphi 7.0 software with observed state based on simulation data. Example: By the number of observation T = 5
state and ∑4 7: 87 1.
occur with other conditions incident has
occurred. Provided A and B are two events in the
;8 8
8 / 84 <
a B, if A has occurred" or "Chance B, if A is known
to opportunity", where (Hidayanto, 2009)
|
Opportunity Transition Matrix (A)
random variables
, ! "# where t is the
observation. Stochastic process is a family of
A matrix formed by the above is called the
parameter "Time" of the set T. T is a parameter of transition matrix of the Markov chain
"time" that has discrete or continuous nature. opportunities. The shape of the transition matrix
That is, if, then the stochastic process is A the following opportunities:
= =
/ =4
new state
denoted. If " 0,1,2,3 … # then the stochastic
parameterized "timing" discrete and usually
=
=
/ =
4
> / / @ new state
? /
and is usually denoted by
% , & 0,1,2,3 … . #.
process is parameterized "time" is continuous
=4 =4
/ =44
All possible prices happened t random Initial state
variable is called the state space "state" which is for i = 1,2, ..., N and j = 1,2, ... N.
denoted by Q. State space "state" is called discrete In the transition matrix of the Markov chain
if finite or infinite countable, otherwise state opportunities has traits - traits that entry on each
∑4
space "state" is called continuous if the interval of
,: =7, 1 , =7, ( 0. (Sumarminingsih, 2006)
line numbered one. In other words every i holds:
the real line containing.
For example, the number of messages that
' , ( 0#
arrive in the time period from 0 to t is Hidden Markov Model (HMM)
parameterized "time" and Hidden Markov models or Hidden Markov
continuous state space "state" discrete. Model (HMM) is a statistical model of a system
One of the stochastic process is Markov chain that assumed a Markov process with unknown
models which have the property that the parameters. The problem is to determine the
stochastic behavior in the future depends only on hidden parameters (hidden) of the parameters
the time or the current situation and do not that can be observed (observed). Specified
depend on the state of the past. (Lester, 2009) parameters can then be used for further analysis.
A Hidden Markov Model can be considered as a
Markov Chain dynamic Bayesian Network simplest. In the
Basic Concepts of Markov Chain general Markov model, its state can be observed
Markov chain model was developed by a directly, therefore the transition state the
Russian expert AA Markov in 1906. Markov chain opportunity to be the only parameter. In the
Hidden Markov Model, statenya can’t be observed
if the value
) is known, then
* where + , is
is a stochastic process that has the property that
directly, but can be observed are the parameters
not affected by
, . where -.The definition that are affected by the state. Each state has a
means that the phenomenon of the future is only probability distribution that may arise, therefore
affected by the phenomenon of the present, and the output sequence produced by the Hidden
not influenced by the past. Mathematically, the Markov Model provide some more information
about the sequence of states.
). -|
,
, / ,
) 0
Markov chain can are expressed as follows:
(http://www.wikipedia.com)
). -|
) 0 ,
where 0, - ! 1 and 1 23,/, 34 5 are the set of
Definition of HMM
which is denoted by k) - .
opportunity features - features that entry on
each line of a. In other words:
J
q max jh 0
3. Terminasi
I C7 DE 1 l7l4
3hq arg max jh 0
, i = 1,2,3……,N
E:
l7l4
87 # , 87
K 37 For " r 1, " r 2, … , 1 ,
3. Matrix opportunities early (π) 4. Backtracking
L 3 , 3
, … , 34 #.
limited to state that it probably is.
The Definition of Forex Trading Online
5. M, the number of observed states can be Forex (foreign exchange) is a type of
transaction that traded currency in the currency
observation is probably M D , D
, … , DJ #.
observed. Denote the set is limited to
of a country other State. Forex is a trade involving
(Rabiner, 1989) major financial markets in the world for 24 hours
continuously and it is an investment instrument
Notation HMM that involves analytical support in achieving a
M = D , D
, / , DJ #
and done online. In the trading market of sellers
j 0 87 C7 F , 1 0 ' dan k 0 0
1. Inisialisasi brokers are usually chosen according to kebutuh-
an individual trader. In addition, the presence of
1,96
these online brokers, may facilitate the traders to Estimated number of samples are obtained
100,0353
The data used to build the initial odds calculation:
&
100,0353
matrix (), the matrix of transition opportunities
z1 { |
8000000
(A) and a chance observation matrix (B) is the
& 100,0341 100 responden
quantitative data, in the form of numerical data
which is then processed mathematically. To
establish state observed in this case used From the above calculations, the number of
qualitative data, through interviews with samples taken was 100 respondents.
respondents and data collection through the
Interview and Questionnaire
media.
Before researchers distributed
The data used in this study in the form of
questionnaires to the respondents, the
primary data. Primary data is survey data using
researchers are looking for information to make
questionnaires to online forex trader in
observations through interviews with
Indonesia.
respondents or through the media to determine
Population and Sample the parameters of observation (observed state).
Prior to sampling, preliminary survey first Furthermore, the researchers spread forex
conducted by distributing questionnaires to 30 online questionnaires to respondents in
online forex trader in Indonesia as a respondent. Indonesia. Data results of this questionnaire in
Of the 30 respondents, only 28 respondents who the form of data transfer broker online forex
filled out questionnaires correctly and trader to the period October 2011 to March 2012.
completely, the proportion of subjects success in Data obtained from the questionnaire will then
completing the questionnaire was thus obtained be processed to get the early opportunity matrix
p = 0.93 q = 0.07. Sampling process done by using (), the matrix of transition opportunities (A) and
purposive sampling technique (based on the a chance observation matrix (B).
consideration in accordance with the purpose of
research). Samples taken are online forex traders DATA ANALYSIS
in Indonesia. Determination of the number of
Observed State and Hidden State
respondents was calculated by using the formula:
tuv
1. Based on research conducted before making
&6 s x y3
w
the questionnaire, the characteristics of online
forex brokers are divided into 5 categories:
&6
& &
Leverage up to 1:1000, often to invent a
z1 { 6 |
'
unique competition, a 30% deposit, using the
trading platform MetaTrader 4 and 5, the
Description: availability of PAMM, profit restrictions
during the news.
&6 = The estimated number of samples
N = total population members
2. 25% deposit bonus, up to 1:500 leverage,
n = number of samples taken rarely entered the competition, using the
α = 0.05 level of confidence trading platform MetaTrader 4,
Z = the value of the normal distribution (for α = representatives / IB is still a bit in Indonesia.
0.05 then = 1.96) 3. Trading platform is java based, each opening
d = a tolerable margin of error in determining an account will get $ 5, 1:500 leverage, no
the sample mean = 0.05 deposit bonus, there is a chat service on the
p = proportion of questionnaires were filled in trading platform, the process of withdrawal of
correctly and completely time (up to 1 week).
q = proportion of questionnaires filled in 4. There are many offices in Indonesia, just
incorrect and / or incomplete leverage up to 1:500, rarely hold trading
(Cochran, 1991) competitions, using the trading platform
MetaTrader 4 and 5 (for metatrader demo online forex broker in October 2011 as follows:
version 5 only accounts only).
Table 1. Number of respondents forex broker
5. Leverage up to 1:200 only, rarely hold trading
online in October 2011
competitions, using the trading platform
Broker Forex
MetaTrader 4 and 5, is listed / regulated in No Responden Proporsi
Online
some countries like the U.S. and the UK, the
service payment system slightly so that the 1 Marketiva 16 0,132
withdrawal process takes 2-3 days (using a 2 Masterforex 57 0,471
wire transfer) , spread currency pairs traded 3 Instaforex 30 0,248
little changed at any time yet. 4 FBS 12 0,099
Further 5 categories above are components 5 Others 6 0,050
of Hidden Markov Models (HMM) is a state Total 121 1
observed in this study. While the hidden state is 5 Column proportions in Table 1 is obtained
online forex brokers, that Marketiva, Masterforex, by dividing the number of respondents of each
Instaforex, FBS and Others. forex broker online by the total number of
Initial Construction Opportunity Matrix () respondents. For example: there are 16
The data was obtained through a respondents Marketiva divided the total number
questionnaire grouped by online forex broker is of respondents 121 then the result obtained is
selected in October 2011. The number of 0.132.
respondents who chose each forex broker online While the data of respondents who use
divided by the total respondents in October 2011, online forex broker in March 2012 are shown in
in order to obtain the initial value, where i Table 2 below:
{Marketiva, Masterforex, Instaforex, FBS and Table 2. Number of respondents forex broker
Others}. online in March 2012
Construction Opportunities Transition Broker Forex
No Responden Proporsi
Matrix (A) Online
The data have been obtained through 1 Marketiva 20 0,165
questionnaires, calculated how much 2 Masterforex 49 0,405
displacement of respondents in the period 3 Instaforex 34 0,281
October 2011 to March 2012 and who continue to 4 FBS 8 0,066
use the same online forex broker. This data is set 5 Others 10 0,083
out in tabular form. Each displacement divided by Total 121 1
the number of respondents forex broker online in
October 2011, found that the transition The number of respondents in each forex
opportunities later written down in the form of a broker online is changing. For example: the
5x5 matrix A. If the matrix A has been obtained, it number of respondents Marketiva
can be made schemes Hidden Markov models but In October 2011 there were 16 respondents, in
first do the construction for the matrix March 2012 changed to 20 respondents. This
observation opportunities. change also implies a change in the proportion of
each respondent online forex broker. For
Opportunity Matrix Construction example: The proportion of respondents
Observation (B) Marketiva in October 2011 is 0.132, but in March
Data obtained through the questionnaire 2012 the proportion of respondents Marketiva be
grouped by category selected, then calculated 0.165.
how the number of respondents for each online The data in Table 1 column matrix of
forex broker in each category, and the number is
87 # that the results presented in Table 3
proportions used to construct early chances
divided by the number of respondents online
forex broker in 2012, found that observation below:
Table 3. Matrix of Opportunity Beginning 8 :
opportunities later written in matrix form B.
Construction Program
87
No Broker Forex Peluang Awal
Creating software design using Delphi 7.0 (i) Online (37 )
software to search for a maximal series of hidden 1 Marketiva 0,132
states using the Viterbi algorithm. 2 Masterforex 0,471
3 Instaforex 0,248
DISCUSSION 4 FBS 0,099
Online Forex Broker is Selected Respondents 5 Others 0,050
Based on responses to questionnaires Total 1
obtained by the number of respondents who use
by category
Marketiva
Instaforex
2012
Others
Kategori
FBS
Oktober Broker
1 2 3 4 5 Total
2011 Forex
Marketiva 9 2 2 2 1 16 Online
Masterforex 5 38 10 3 1 57 Maret 2012
Instaforex 3 3 18 2 4 30 Marketiva 1 3 13 2 1 20
FBS 3 4 3 1 1 12 Masterforex 6 5 2 33 3 49
Others 0 2 1 0 3 6 Instaforex 26 1 3 2 2 34
Total 20 49 34 8 10 121 FBS 1 6 1 0 0 8
Table 4 can be read: the first line shows Others 1 1 1 1 6 10
traders using Marketiva broker in October 2011 Total 35 16 20 38 12 121
amounted to 16 traders. Then in March 2012,
from 16 traders Marketiva is there 9 traders who Table 5 shows the options trader on online
continue to use the broker Marketiva, 2 traders forex broker based
move to broker Masterforex; 2 traders move to category, for example: traders who choose a
broker Instaforex, 2 traders move to broker FBS, broker Marketiva by category 1 by 1 person,
and one trader to move to broker Others. based on category 2 as many as 3 people, based
Thus, the data in Table 4 show that the on category 3 as many as 13 people, according to
displacement occurs trader of online forex broker category 4 by 2 people and based on category 5
online forex broker one to the other of the period by 1 person.
from October 2011 to March 2012. For example: Based on Table 5 can be generated matrix
the number of traders using Marketiva broker in observation opportunities (B) the following:
REFERENCES
[1]. Anonim. 2011.HMM/Model Markov
Tersembunyi. http://www.wikipedia.com
[2]. Cochran, W. G. 1991. Teknik Penarikan
Sampel. Penerjemah: Rudiansyah.
Universitas Indonesia Press. Jakarta.
[3]. Evans, L. C. 2003. An Introduction to
Stochastic Differential Equations. Versi 1.2.
Departement of Mathematics, UC Berkeley.
[4]. Hidayanto, A. 2009. Teori Umum Rantai
Markov. Jurnal. achmad.blog.undip.ac.id.
Figure 1. Implementation of hidden markov
[5]. Jaya, I. G. T. 2012. Aplikasi Analytic
models for sequence search online forex broker.
Hierarchy Process untuk Memilih Broker
Figure 1 shows the output of a program that has Forex Online. Skripsi. Jurusan Matematika
been run with the data desired by the transition Universitas Brawijaya, Malang.
matrix A and matrix opportunity observation
opportunities B and Table 3 for the matrix early