Tag Info

21

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 ...

16

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 ...

9

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

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

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 ...

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.

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. ...

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? ...

4

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

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 ...

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 ...

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) { ...

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

could this strategy be applied for real trading ? i mean, whatever a trade makes or loses money, trading incurs transaction-costs. thus, you cannot stand on that (perfect) bell-shaped distribution to trade profitably with any certainty.

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)]= ...

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 ...

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 ...

1

It's true that in general if $\sum_i f_i g_i = \sum_i f_i h_i$, we do not automatically have $g_i = h_i$. But this sum is special, because all $f_i$ are monomials (i.e. of the form $\alpha^n$). This makes the sum a power series (of the form $\sum_{n=0}^\infty \alpha^n C_n$), and these series have a lot of nice properties such as continuity and ...

1

If you have a vector $X = (X_1,\ldots,X_n)$ of a multivariate normal distribution with covariance matrix $\Sigma$ and $F_i$ is the marginal cumulative distribution function of $X_i$ then $F_i(X_i)$ is uniformly distributed. So what you can do: generate uniforms (e.g. Sobol or Halton) transform to uncorrelated Gaussians transform these Gaussians to ...

1

I would confirm it. For time series forecasting, one can use 3 versions of random walk: RW model 1 (basic geometric random walk): stock returns in different periods are statistically independent (uncorrelated) and identically distributed (constant volatility) RW model 2: stock returns in different periods are statistically independent bot not identically ...

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