To get a measure of the probability of up-step versus down-step to measure a trend strength... p = 0.5 + mean / (2 n I)
===
Actual Data
A plot of I calculated from the FTSE since 1984 gives a normal like distribution but with fatter tails! This is not good news...
It
is possible that the random walk will fundamentally fail as a model because stock prices simply don't fit! To be investigated.
Yet Black Swan events are as many commentators point out exactly that "black swan" events and White Swans are the norm. So predictability does reign in the stock markets. There is only 1 event in the 26year daily data sequence I am looking at which stands out as a black swan. The rest of the events obey the distribution even though it is not known at this stage what it is. The probability of variance can be calculated for the FTSE simply by looking at the back data ignoring any modelling.
Analysis of FTSE (1984 to present)
VAR0002 is the difference between daily price closes for the FTSE rounded to 3 decimal places. Values are in 1/10%s.
Statistics | ||
VAR00002 | ||
N | Valid | 6725 |
Missing | 0 | |
Std. Deviation | 11.25086 | |
Variance | 126.582 | |
Skewness | -.386 | |
Std. Error of Skewness | .030 | |
Kurtosis | 8.795 | |
Std. Error of Kurtosis | .060 |
The distribution is pretty central
which is good but the Kurtosis is massive meaning that the stock market data is leptokurtic and spikey with fat tails clearly visible here against the normal distribution. Also evident in the Q-Q test below. The Normality test proves that it is not normal.
Tests of Normality | |||
Kolmogorov-Smirnova |
| ||
Statistic | df | Sig. |
|
.072 | 6725 | .000 |
|
a. Lilliefors Significance Correction |
The probability of getting a deviation of more than 0.02 in the FTSE corresponds to x = 500 which is 500/6617 of the days' closes and a probability of 7.6%. That is 13/100 days in the FTSE history the price has closed up or down by at least Log[0.02]!
A deviation of 0.02 means a price change by a factor of Exp(0.02) = 102%.
This is real data not a model with assumptions. so this is meaningful and is an actual historically holding measure of risk!
Does this relationship hold for other charts?
Can it be used to derive a proper probability function that can be used to determine actual market variance and am actual measure of risk?
Also up 2do is the cellular automata model of stock markets. Will use the model presented in a paper firstly: buy/sell orders placed randomly (not decided the variance function yet) around the last exchange price in a number of stocks. An automatic exchange will match the orders as it can. A number of bots will play this game and keep account of their portfolios. Once this is working a graph will be made of the stock price movements so see if it mirrors actual stock markets.
Next up more advanced decision algorithms using moving averages.
Next up a genetic basis to the algorithms so they can be evolved.
Multi-fold interest here. (1) Test my own strategies to see which provide maximum return. (2) Discover new strategies by evolution (3) Watch how the strategies interact and spread through trading populations (e.g. if everyone is contrarian then it pays to act normally and vice-versa). (4) Discover if a stock market chart can be created in a model so its variance etc can be understood better.
LOT OF WORK!
No comments:
Post a Comment