# Tag Info

19

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

15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1

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

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