# Tag Info

25

I can help you beat random walk 'in the way you want', i.e. the expected value $E[\$]$will always be positive even assuming no drift. However, I have to warn people that$E[\$] > 0$ is NOT really an adequate condition for 'beating' in reality (at least to myself). Let's define some mathematical notations for derivation, and rephrase (simplify) vonjd's ...

18

Variance ratio tests have been used numerous times to show that financial asset prices do not follow a random walk. You can for example look at -Lo and MacKinlay : Stock market prices do not follow a random walk : http://press.princeton.edu/books/lo/chapt2.pdf (US Stocks) -Hoque, Kim, Pyun: A comparison of variance ratio tests of random walk: A ...

10

Test your historical time series for both randomness and independence. Understand that a time series may be random and independent; non-random and independent; random with dependencies; and non-random with dependencies. A mistake would be to limit dependency tests to autocorrelation. The most general test I know of is called the differential spectrum by ...

8

Your formula looks like cointegration (between the price time series) rather than correlation (between the returns). To simulate "correlated random walks", i.e., random walks built from correlated innovations, you can just build the desired covariance matrix (for instance, put ones on the diagonal and $\rho$ everywhere else), take multivariate gaussian ...

8

Why don't you try it and report back? Recall, though, that while a random walk is often a rather competitive forecast, realized data is understood to have weak dependence especially in higher moments. Having worked a bit with DieHarder, I'd suspect it to reject a number of series. But the proof is in the pudding...

8

The problem is that you are creating a new random number generator for each iteration. Move new MersenneTwister() out of the loop: MersenneTwister mtsign = new MersenneTwister(); MersenneTwister mt = new MersenneTwister(); for(int i = 0; i<= NumberOfTrials-1; i++ ) { // use mtsign and mt here ... } Furthermore, you don't need two generators, you ...

7

If the price of every asset follows an independent random walk without drift then every position has an expected return of zero. So, in expectation, there is no combination of positions that has an expectation different from zero.

7

I will assume a white noise is a process $(\varepsilon_t)$ with zero mean, no autocorrelation and constant variance $\sigma^2 > 0$ while a random walk is a process $(x_t)$ defined by $$x_{t+1} = x_t + \varepsilon_{t+1}$$ where $\varepsilon$ is a white noise. 1) No since $Var(x_{t+1}) = Var(x_t) + Var(\varepsilon_{t+1})$ is stricly increasing while ...

5

The first chapter of the book Econometrics of Financial Markets by Campbell, Lo and MacKinlay discusses this very well.

5

I have tested lots of forex data for randomness. Some currency pairs are very close to random walk. And the problem is open question, because there is no uniform explanation what the random walk is. According to Mandelbrot, Taleb and some other authors randomness can be different. Even if the data is not random it doesn't mean it can be effectively traded. ...

5

They are different concepts, and the relation between them can be described as a conditional: "if EMH holds (all available information about future price movements is already priced into the market), then future price movements will follow a purely random walk as new and unpredictable information emerges"

4

I would start with explaining random walk (this should be fairly simple) and then making a connection to heat equation in discrete time. This paper is doing exactly this and by leaving out technicalities you should make this pretty intuitive for students. Basically the intuition is as follows: At each integer time unit, the heat at each point is spread ...

4

You have intense academic research on orderbook dynamics simulations, just cite: Econophysics: Empirical facts and agent-based models, by Anirban Chakraborti, Ioane Muni Toke, Marco Patriarca, Frederic Abergel (Arxiv 2010) High Frequency Simulations of an Order Book: a Two-Scales Approach by: Charles-Albert Lehalle, Olivier Guéant, Julien Razafinimanana, ...

4

That post has been up since March. Either he hasn't figured it out, or he's trying to get people to click through to the book. In the following statement, isn't he implying that "rw" is a return (as in....random walk)? rw <- rnorm(100) In the following statements, isn't he calling a "trade" the DIFFERENCE IN RETURNS? Isn't that meaningless? if(...

4

All the ideas above are great ideas. Another kind of test would be an idea borrowed from Random Matrix Theory. Assemble your time-series into a matrix. Evaluate the distribution of the eigenvalues of the matrix vs. the distribution of a random matrix. Turns out that the distribution of eigenvalues in a random matrix conforms to distributions such as the ...

4

Historically the RWT (Random Walk Theory) came first, as empirical observations by for example M.F.M. Osborne (1959) and others in the 1960s. The EMH came about as a result of theoretical work by Samuelson in 1965 ("Proof that properly discounted prices...") and E.Fama (1969) as a general empirical/theoretical hypothesis that guided the field for many ...

3

Using $q = 1-p$ we can work out the root as: $$\sqrt{1-4pq} = \sqrt{1-4p(1-p)} = \sqrt{1-4p+4p^2} = \sqrt{(1-2p)^2}$$ Taking the positive root reduces this to $(1-2p)$. This gives for the fraction: $$\frac{1 + \sqrt{1-4pq}}{2p} = \frac{1 + (1-2p)}{2p} = \frac{1-p}{p}$$ This also holds inside the logarithm.

3

Here is a more or less formal proof of the fact that "the system can't be beaten". The argument works whenever the underlying process is a martingale. In particular, it is valid for a random walk without drift. Let $S=\{S_n\}$ be a discrete-time martingale which represents a series of games played at times $n=1,2,...$. Assume that $S_0=0$ (no game at time $... 3 1) The probability of a H or T of any next coin toss (fair coin) is always 0.5 because coin tosses are independent of each other. 2) Stock markets, or for that matter any asset, are an entirely different game. First of all the expectancy is not 0.5 of, for example, experiencing an up or down day tomorrow in a stock simply because the distribution is ... 3 would you expect your financial data to qualify as being a good random number generator Financial time-series, specifically price-change series, would make terrible random number generators because they generally contain significant dependencies. or would it fail in many of these tests? If you test for randomness, meaning, initial conditions do not ... 3 Not sure about the correctness of the first approach, but second approach uses$1 /\sqrt k$to scale the variance of the total sum by$k$. So the difference of two processes (say$W_t$and$W_{t+\Delta t}$) generated by the random walk would have a variation of$\Delta t$, which satisfies one of conditions needed to get a Wiener's process. 2 There are also the NIST tests used to examine the random number generators used in cryptographic systems. http://csrc.nist.gov/groups/ST/toolkit/rng/index.html I played around with it a little bit, here is the first test, the monobit test. library(stats) library(quantmod) code_input <- function(sym, fn=Cl) { return(na.omit(as.vector(ifelse(ROC(fn(... 2 I think you mean to say any self-financing trading strategy would give you zero returns - which it will - the principle of no-arbitrage ensures that. For example, say you have a stock whose returns follow a random walk pattern with expected return equal to zero. The only way this can happen is (a) the stock stays fixed at a value K or (b) the stock has an ... 2 There are a number of papers in the literature which show that Dollar Cost Averaging is suboptimal, in the sense that, given a DCA investment strategy, then there exists an alternative investment strategy which will be strictly preferred by a utility maximising agent. This preferred strategy may not necessarily be a "lump-sum" strategy, but a better strategy ... 2 You did not carefully read the article you yourself linked to. Dollar cost averaging is a generalized concept. What the author compares is a full-sized investment or time-specific partial investments. So, dca is a concept and you draw conclusions from one single approach to dca. There is no mathematical proof that dca works or not because it is one single ... 2 There are several reasons: Expected payoff = 0 I don't know why you selected 0.5 ATR and 2 ATR away from the market but let's go with it for a while. This means that you want to gain 2x while risking only 0.5x. For now let's assume that FX log-returns are normal. To bring it to a higher level, we can use a piece of Black Scholes formula, namely the ... 2 The answer can be found here under 1.3) Random Walk Hitting Probabilities (when events have equal probability of$\frac{1}{2}$each). $$p(a) = \frac{b}{a+b}$$$p(a)$would be the probability of take-profit hit first. To look at probability of stop-loss being hit first, just take 1 minus the above, resulting with$a$on the top (... 2 The first the solution to: $$dS_t = S_t\left[\mu dt +\sigma dW_t\right]$$ The second is the solution to: $$dS_t = S_t\left[\left(\mu -\frac{\sigma^2}{2}\right)dt + \sigma dW_t\right]$$ The difference is that the first one is a martingale when$\mu$is equal to zero while the second one is not:$$\mathbb{E}[S_0 exp(\sigma W_t)]= S_0exp(-\frac{\sigma^2}{2}t)... 2 In the Ljung-Box test, the null hypothesis is:$H_0\$: The data are independently distributed So, your p-values of 0 indeed indicate that you should reject the null hypothesis, but it means that your data is not independently distributed, and in particular that there is some significant autocorrelation in the process. This is obviously the case, because ...

2

I think the main difference even in this little example is the gain-loss asymmetry which is a known stylized fact: When you look at the big bump both time series posses your artificial one is perfectly symmetric whereas the real one takes longer for going up and then crashes in a relatively shorter time frame. This is a known phenomenon in real financial ...

Only top voted, non community-wiki answers of a minimum length are eligible