New article Trader's Statistical Cookbook: Hypotheses has been published at mql5.com:
article considers hypothesis - one of the basic ideas of mathematical
statistics. Various hypotheses are examined and verified through
examples using methods of mathematical statistics. The actual data is
generalized using nonparametric methods. The Statistica package and the
ported ALGLIB MQL5 numerical analysis library are used for processing
Any trader willing to create their own
trading system is going to become an analyst sooner or later. They are
permanently trying to find market trends and testing trading ideas.
Testing an idea can be based on different approaches - from a usual
search of best parameter values in the optimization mode of the Strategy
Tester to scientific (sometimes pseudo scientific) market research.
In this article I suggest considering
statistical hypothesis - an instrument of statistical analysis for
research and inference verification. Let us test various hypotheses with
the Statistica package and ported numerical analysis library ALGLIB MQL5 using examples.
The hypothesis to be tested is called a
null hypothesis (Н0). A competing hypothesis (Н1) is its alternative. It
is on the flip side of the Н0's coin, i.e. it logically refuses the
Imagine, that there is a population of
data on Stop Losses of some trading system. We are going to state two
hypotheses making a basis for testing.
Н0 – average Stop Loss value equal to 30 points;
Н1 – average Stop Loss value not equal to 30 points.
Variants of acceptance and rejection of hypotheses:
The last two variants are connected with errors.
Now the value of significance level is to
be specified. It is the probability that the alternative hypothesis
will be accepted whereas the true hypothesis is the null one (third
variant). This probability is preferable to be minimized.
In our case such error will occur if we
assume that Stop Loss at the average is not equal to 30 points even
though that it actually is.
Usually the significance level (α) is
equal to 0.05. That means that the test statistic value of the null
hypothesis can populate the critical region in no more that 5 cases out
In our case the test statistic value will be evaluated on a classical chart (Fig.1).
Fig.1. Test statistic value distribution by normal probability law
Author: Dennis Kirichenko
To add comments, please log in or register