Istrategies pubQF
Istrategies pubQF
Istrategies pubQF
Abstract
Temporal linear correlations, which are not visible in average, can leads to changes
in time series probability distribution function. In the case of stock market data the
visible pivot point of the time series is zero. The unbalance of the gaussianity of
left and right side of zero point can lead to some statistical forecasting of stochastic
systems. Here we show the principle of objective value minimization which helps us
to correct gaussianity estimation. The experimental testing of investments strategies
based on this knowledge are presented. The positive eciency of strategies can be
as the proof of correctness of the objective value theory.
Key words: information entropy, stochastic processes, probability distribution,
stock market data
PACS: 05.45.Tp, 89.65.Gh
Introduction
2 February 2012
simplest way of prediction and risk evaluation. The standard way of portfolio
selection.
In late fties last century Markowitz found the analytical solution of ecient
portfolio selection. The standard Markowitz issue corresponds to simplest way
of risk and prot evaluation. Risk is found to be variance of the past data and
prot as the average from returns on the same region. In order to apply his
procedure to another type of risk and prot evaluation one has to exchange
in formulas below only m and D or C on correspond values. This is especially
valid when we would like to optimize portfolio to forecast future values of m
and D or C.
3) Fundamental analysis.
The Method of predictions can be selected on fundamentals and technical.
Fundamental evaluation are based on knowledge about condition of rms or
political or investor information about decision making process. Fundamental
analysis is rather long-term, which uses the disproportion between the market
value and the evaluation. There are twofold problems within:
a. Is it the evaluation properly made?
b. Market prices are not always showing the capital of a rm and future prot
from the capital, but what investors thought about this.
The second case is much visible when we calculate the capital of a rm and
compare to the capitalization on the stock market. It is well-known that the
second is much higher than the rst balance. The ratio of these two capitalizations is not universal and diers among stocks even in the same branch of
industry. In this case investor uses some intuitive knowledge about the proper
value.
4) Technical analysis.
The very beginning coecients which may help in forecasting are moments and
smoothing methods. These coecients are based on the statistical property
of price changes. Moments comes from the mathematics and are just rst
and second moment of time series so average and variance. In nance we
use names of trends and volatility to show the same but volatility uses the
second moment in many dierent ways but it is not as strictly dened as in
mathematics. Trends are believed by investors to be much stronger than on
beginning one can suppose. One can say that to know in which trend we are
(bullish or bearish) is most important. Wisdom is to know the trend and follow
it. The nest analysis about trend searching is Elliot Waves. Our expression
about this analysis is that waves which shows you trend are not always visible.
The correct investing structure in data can be seen from time to time and can
3
(1)
where xi ,xf and xm is portfolio i, risk free and market return respectively.
The linear trend i and random noise i is selected to better t the data. The
relation prot=covariance could be explained in two ways:
1) Market portfolio is assumed to be most optimal portfolio one can get.
Larger correlation of returns from portfolio xi to the most optimal xm should
be awarded with higher prot in long time horizon.
2) The covariance i shows the level of decreased prot from ecient diversication. Higher risk connected to the ecient portfolio should collect more
prot in longer time. The most important risk factor related to i is connected
to collective fail of all investments in the portfolio, so that the risk of shortage
of money would force to close the position in the most unprotable way. In
long time horizon investment the collective panic-like behavior which would
force us to change the investment decision is related to the correlation i in
average. One can say that the risk which can bear by individual investor can
dier, so the risk should possess some deviations from the mean i . On the
other hand covariance i is collected from the past, but one never knows if it
will persist in the future. One more problem appears in CAPM modeling that
is risk related to the correlation to the market i is not only one risk factor
in ecient market, so one should look at some more correlations of the prot
portfolio to existing fundamental analysis parameters [18].
The fundamental law of nature tells that free energy in the relaxation pro4
cedure stays in the minimum [10]. This is related to the limited sources of
energy in nature. Nevertheless humans, because of desire, struggle with nature to possess more sources of the energy. Limited amount of energy as well
as information, money etc. are then minimized by nature laws but we would
like to have its unlimited sources. That is why we can say that the value which
are minimized express the real value of the corresponding source such a value
we call objective. In this paper we try to convince that the absolute value
of some source demonstrate not always the real value, the value which are
desired to maximize by humans, because what we would like to have more are
express by its objective value. Stock market is thought to be stochastic [13]
or mixture of deterministic and stochastic processes [48] but with prevailing
part of the stochastic one. Regarding last we apply the principle of objective
value minimization to the stock market data. We try to reveal the important
thing of the stock market analysis, i.e. which stock is most desirable to invest
bringing higher prot than can do average investors.
Let us dene x as the value of the studied variable. The information entropy
for stochastic process is given by the formula [1,9]
H=
P (x) ln P (x)dx.
(2)
It is common knowledge that in the equilibrium the entropy has its maximal
value [1,2,10]. One can think about certain function w(x) of x that we assign
as the objective value. We would like to show some properties of this function.
Let us create the functional which maximize the information entropy with
constraints of the given average objective value [1]:
S=
P (x) ln P (x)dx +
w(x)P (x)dx +
P (x)dx = max.
(3)
The last factor in Eq. (3) gives the normalization of all probability to 1. We
assume that for properly dened the objective value w(x), one should have
w(0) = 0. Resolving functional (3), i.e. calculate derivatives that should vanish
S
= 0,
P (x)
(4)
(5)
5
Table 1
Examples of objective values w(x) and corresponding the probability distribution
P (x).
Objective value
P (x)
w(x) = |x|
P (x) e|x|
w(x) = x2
)
(
w(x) = ln c+|x|
c
Probability distribution
exponential
x2
P (x) e
)
(
c
P (x) c+x
gaussian
power-law
The table 1 presents the examples of objective values w(x) and corresponding
to it the probability distribution P (x). Lets change a little functional (3) in
order to minimized objective value with the constraint of given value of the
information entropy
S =
w(x)P (x)dx
P (x) ln P (x)dx +
P (x)dx = min.
(6)
The above functional is minimized after calculating the the derivative that
should vanish, because
2S
> 0.
P (x)2
(7)
The minimization of the functional S gives the same dependence P (x) versus
x as maximization of the functional S. Using the fact that probability distribution P (x) include all the information about the stochastic process one
can say that: the principle of maximum entropy express in the principle of
minimum of the objective value.
Proposition In the equilibrium, for stochastic not correlated process, the
average objective value is minimized for constant entropy
w(x) =
w(xn ) = min,
(8)
system known from statistical mechanics can serve as a objective value. Very
fast one can conclude that distribution of energy is P (E) eE what agrees
with statistical mechanics [10]. One can calculate from the above principle
Maxwell-Bolzmann distribution of velocities. Minimization of the energy of
the whole system which consist of particles without interaction can be regard
as a minimization of the energy of every particles alone, so minimized should
2
be E v 2 . The above gives the Maxwell-Boltzmann distribution P (v) ev
[10].
Random Matrix Theory can be used to describe correlations eigenvalues spectrum of random data with the same probability distributions [2]. Correlations
calculated from time series with dierent probability distributions will show
lower values than in the case of the same Pdf. In correlation calculations the
absolute value has its important impact so the smooth transormation of the
data can lead to change the correlation. In nancial interest is to relate correlations with risk but the aim of analysis should be the maximal correlation
so the real risk. Let us imagine such a case that we are dealing with two
time series transformed from one original that both possess dierent probability distribution. Let the rst time series has Gauss distribution and second
Couchy one. Correlation calculated between these two time series is apparent from one and can be evaluate as an integrate of the join part of these
two probabilities. When we would like to calculate some property of two time
series with dierent probability distributions we have to renormalized them
to the distributions with the same properties. We use the Objective Value
Theory to do this. Objective Value can be calculated from data by looking on
the probability distribution function (Pdf). The ObV correspond to each data
point representing its objectiveness, the value which in average is minimized
in isothermal processes. ObV is extensive, so one can use the mean value as
the reference value. Pdf renormalization process can be explained as follows.
We calculate the objective value of each point and on this level we normalize
average ObV of each time series to the mean ObV of all data. Next we calculate inverse function to objective value using only one set of parameters in
Pdf description. Now we possess normalized all time series that the statistical
properties calculated among these time series are nd to be extreme (maximal
or minimal). Apply the renormalization procedure to our example of time series with Couchy and other with Gauss distribution will give us transformation
of these two dierent distributions to the universal one so the join part will
give us unity. The validation of the theory will be calculations of correlation
7
x = w
w(x)
SD(x)
w(x)
(9)
P (x)dx 1) = min,
(10)
where wp (x) is measure for risk and mp is expected prot from portfolio. Here
we use our forecasting method by unbalance in gaussianity:
mp =
pi Fi
(11)
Pi
,
Pi1
(12)
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
-6
-4
-2
green color reects growth and red falls of prices. That is why we can separate
our return time series on bullish and bearish which reects another type of
subsystem responsible for action in investors brain. We would like to convince
that there should exist two separate parts which are acting separately only
when in the stock market is hossa and second when is bessa. This is because
we sell or buy so zero is the threshold in which we earn or loose. Let us then
separate our time series to positive and negative values and put a notation as
follows:
x+
i : xi > 0 and xi : xi < 0 for i=1,...,N
(13)
All the time we would like to assign zero as the pivot point in both time series.
+
Let us consider that there exist some asymmetry between {x
i } and {xi }
probability distribution function Pdf (see example on Fig. 1). This unbalance
will lead us to do some forecasting basing on gaussianity of left and right Pdf
(our meaning of gaussianity we explain in details in section 5).
Gaussianity in a simple word would mean a level of maturity of the distribution. Gaussianity for Gaussian distribution is maximal. This is well known
from statistic that sum of many not correlated increments with nite variance will give us a Gaussian distribution, which further does not change in
its gure after adding additional data. Gauss distribution is the attractor of
convolutions of many distributions with nite second moment, that is why it
is so ubiquitous. When we are dealing in stock market data with situation
represented in Fig. 1 then our method says that we should BUY for three
9
reasons:
1) If the distribution will persist then average of the right side is higher than
average of the left side.
+
xi > x
i
(14)
Glef t Gright
max(Glef t , Gright )
(15)
Gaussianity evaluation
(( + 1)/2)
(/2)(1 + x2 /)(+1)/2
(16)
where (z) = 0 tz1 et dt. Now we would like to t our Student distribution
to data. Let us note as xi clean time series which correspond to Student distribution Eq. (16) best tted to data, so we would like to minimize (
xi xi )2 .
In order to do so we use Maximum likelihood principle. We use equation on
the conditional probability which we would like to maximize:
P (xi |
xi ) =
P (
xi and xi )
= P (xi ),
P (
xi )
(17)
where xi and xi are independent from each other. The lack of dependence
should be true because we are dealing with stochastic data. The method of
maximum likelihood try to nd maximum sum of logarithmus of probability
given by Eq. (17), so to nd we should resolve the following equality:
ln(PSt (, xi ))
=0
(18)
We solve this equation numerically with constraint that variance of the data
should follow 2 = /( 2) and mean equal zero. In the case of power
nding one should preliminary normalized time series by division with average
absolute value of x:
xi
xi =
i = 1, ..., N
(19)
|xi |
The objective value of all stocks one can present as
(
(20)
P (x) ln P (x)
.
w(x)
(21)
The gaussinianity can be further expand in order to release entropy and ObV
evaluation from data. Complex calculations from data sometimes lead to large
11
P (x)dx = min,
(22)
1
P (x) = exp 1 + + w(x)
(23)
1
1 = ln exp
w(x) dx
(24)
1
1
P (x) ln P (x)dx = w(x) ln exp
w(x)
(25)
1 ln exp (w(x)/) dx
G=
w(x)
(26)
w(x) = 0.5 ( + 1) ln 1 + x2 / ,
(27)
(28)
Next we put Eq. (28) to the formula on gaussianity Eq. (26) we get
G = ln ( ( + 2))
1
,
+1
(29)
12
+
( + 2)
+
+ (+ + 2) ( + 1)(+ + 1)
(30)
((x x)/SD)2
w(x) = ln 1 +
,
(31)
where SD is the standard deviation of x. We divide w(x) for left side w (x)
and right side w+ (x) of the value of x with the respect of x. The inverse
function calculated from normalized objective value is as follows
x = w
1 (w) =
(ew/w 1).
(32)
Then one can create the normalized average value of left side R and right
side R+ of x i.e.
R/+ = SD w
w (x)
/+
w/+ (x)
(33)
We calculate the objective value for stocks from New York Stock Exchange
(NYSE), Warsaw Stock Exchange (WSE) and FOREX market. Results of
calculated of dierent stocks from New York Stock Exchange in years 1999
13
and 2000 are presented in Table 2. In Figs 2,3 there are plotted the Pdfs with
tted t-Student distribution for Ford and Bank of America respectively.
We use the forecasting described in section 6 in investment strategy (IS1) as
follows. In order to create create the portfolio with a help of R we do so that
pi = r R/ j |pj /r| using available data from the period prior to the selected starting point. Finally we invest in the portfolio but only if risk value
r is positive. The procedure was repeated over 1000 times and at the end we
calculated an average prot i.e. the eciency of the method. At Fig. 4 we
show a distribution of returns for our portfolio at Warsaw Stock Exchange.
We have calculated recommendations for windows 27 65 and 17 41 days
long for NYSE and WSE respectively. In the case of NYSE it was the period
October 1999 - December 2000 and for WSE on the period of July 2002 December 2003 (see Figs 5,6,7). For NYSE The annual return received in such
a way after commissions subtracting is around 15.2% for 11 stocks (7.5% for
60 stocks) and for WSE it was 14.6% (the commission level has been set to
0.25%). To omit articially large price changes that can be caused by such
eects as stock splitting, extreme returns larger than 0.4 have been rejected.
Looking at the results of investment strategy one can conclude that in the
case of hossa (WSE) and bessa (NYSE) we generate positive high prot.
The second forecasting procedure (IS2) which use the gaussianity (see sec. 4)
we applied to the FOREX market. FOREX market is global market of currency exchange, commodities as well as derivatives. In the FOREX there is
possibility to sell or buy given currency rate, e.g. EUR to USD (euro to American dollar). The common amount of currency handled on the FOREX is lot
(100000 of basing currency). The minimal value of lot in order to open position is 0.1. Nevertheless if investor open the position on one lot of currency
it should possess on the account only 1% from one lot so 1000. The cost of
opening the position is spread, so dierence between ask and bit oer. Another
cost of the investor is swap, which is constant cost subtracted at closing of
each day. Here swap is the dierence between costs of credit in one and second
14
currency. Swap can be positive but mostly is negative in order to prevent riskless opportunities of making the prot. In this strategy IS2 we use parameter
F in Eq. (15) to forecast future prices movement as follows:
RIS2 (Nf ) =
Nf
Fi ,
(34)
i=1
2
where Fi is F calculated on window of the size Nwin
shifted i data back. The
2
parameter Nwin is equal 20000 minutes. Strategy consist of two parameters
RIS2 (Nf ). First one is slow changing parameter with Nf = 5000 minutes and
second fast changing with Nf = 90 minutes. In our calculations we use 15
minuts high, low and close price that is time series is: PiIS2 = Pihigh + Pilow +
2 Piclose . Time series is calculated as in Eq. (12). Investment strategy tells
to buy if RIS2 (5000) > RIS2 (90) and RIS2 (5000) > 0.2. In the opposite one
should sell that is RIS2 (5000) < RIS2 (90) and RIS2 (5000) < 0.2. After the
opening in 2-6 weeks the position should be close. The trigger to close buy
position is when RIS2 (5000) > RIS2 (90) and RIS2 (5000) < 0. In the case of
sell position it is respectively: RIS2 (5000) < RIS2 (90) and RIS2 (5000) > 0. In
Table 3 are presented prots of investment procedure IS2 using smallest value
of investment 0.1 lot. The average prot from past investments are positive
about 152 USD in two and half month (smallest deposit is about 100 USD,
- one per cent of 0.1 lot), what is the experimental proof of our theory used
in method IS2. One can see on the above that prot is high but it should be
tted to the risk aversion of the investor, because the price movements are
sometimes against the method so it appears the risk of shortage of money on
the account. Even if further method wins but it can be so that without us.
Each investor should answer the question how much money it can invest to
bear the risk which is inherit property of each stochastic system forecasting.
Conclusions
We would like to emphasize that correctness of the theory lays on the temporal correlations which are not visible in the average. These correlations lead
to leptokurtic probability density distribution. With a help of our parameters
we see these correlations in the unbalanced left and right side of the returns
distribution. Such a correlation is more visible in FOREX when we use 15
minutes lags between the data. The theory based on the objective value help
us to more appropriate compute the unbalance in gaussianity, what is most
15
Fig. 2. Plot of the histogram of Ford stock counted in NYSE in years 1999 and 2000
and corresponding Student distributions with = 3.63, = 3.02 and + = 4.11.
References
16
Fig. 3. Plot of the histogram of Bank of America stock counted in NYSE in years
1999 and 2000 and corresponding Student distributions with = 3.28, = 2.98
and + = 4.08.
Table 2
Results of calculations of , and + parameter occurring in Student distribution
for 11 stocks counted on NYSE.
Stock
+
Apple
2.94
2.85
3.06
Bank of America
3.28
2.98
4.08
Boeing
3.8
4.07
3.24
Cisco
3.14
3.16
3.11
Compaq
3.05
2.67
3.99
Ford
3.63
3.02
4.11
General Electrics
3.52
3.76
3.34
General Motors
3.93
3.35
3.96
IBM
3.08
3.2
2.99
McDonalds
3.83
3.12
4.35
Texas Instruments
3.56
3.94
3.25
17
Fig. 4. Histogram of returns received by investment strategy IS1. The mean return
equals to 0.415% while the histogram dispersion is about 2.4%.
18
Fig. 5. The aggregated return for our investment strategy IS1 applied for 19 stocks
from the Warsaw Stock Exchange. The return corresponds to the mean annual
return 18% while the simple average return of 19 stocks was about 5.3% at the
same time period.
[15] V. Tola, F. Lillo, M. Gallagati, and R.N. Mantegna, Cluster analysis for
portfolio optimization, (2006)
[16] Krzysztof Urbanowicz, The principle of objective value minimization applied
to portfolio selection (2006).
[17] D. Polkow, T. Gebbie, How many bets are there?, arXiv:0601166 (2006).
[18] G.C. Lim, T.H. McCurdy,
19
Fig. 6. The aggregated return for our investment strategy IS1 applied for 11 stocks
from the New York Stock Exchange. The return corresponds to the mean annual
return 18.7% while the simple average method of all 11 stocks was about 45% at
the same time period.
20
Fig. 7. The aggregated return for our investment strategy IS1 applied for 60 stocks
from the New York Stock Exchange. The return corresponds to the mean annual
return 11% while the simple average return of all 60 stocks was about 10% at the
same time period.
21
Table 3
Results of testing the investment method IS2 on dierent currency rates in the
FOREX market from 2.06.2006 to 18.08.2006.
Currency rate size in lots No of investments Prot in USD
EURUSD
0.1
399.21
GBPUSD
0.1
677.27
USDCHF
0.1
86.31
CHFJPY
0.1
53.57
GBPCHF
0.1
-333.94
USDPLN
0.1
191.20
NZDUSD
0.1
173.14
GBPNZD
0.1
178.57
USDCAD
0.1
391.60
EURJPY
0.1
229.12
AUDJPY
0.1
393.70
EURCAD
0.1
176.61
AUDJPY
0.1
115.94
AUDNZD
0.1
127.22
AUDUSD
0.1
60.93
EURGBP
0.1
-74.03
EURCHF
0.1
-134.13
USDJPY
0.1
40.26
22