Why do I see "Trends" in Randomly Generated Data?

Quote from SoCalTrader619:

Do you think you'd be able to modify this Excel worksheet to show OHLC?

Here ya go. I had to make some assumptions regarding the max range of each bar and you'll see Y-axis values can go negative...
 

Attachments

Awesome! That's exactly what I was looking for. Thanks!

Quote from MBAGearhead:

Here ya go. I had to make some assumptions regarding the max range of each bar and you'll see Y-axis values can go negative...
 
Quote from Indrionas:

Yes, I can post a few more later if you wish :)

I think that when one thinks about "tradeable trends", he just fools himself by applying trend-following concept to the parts of the data and ignoring the rest of data where the trend-following concept fails miserably, especially when you include trading costs.

One can not trade trends, one trades price.
Trends are simply a perfect sign of strength as they apply to individual charts.
 
Quote from Indrionas:

Then you are assuming stationarity and the system will only work on the same market conditions that you are simulating. But market data is not stationary and distributions change over time.

No, I am not - unless I'm misunderstanding you. if the data generated is dynamic and has the same statistical properties as the target market (distribution etc) the simulated approximation should be a good one. Are there other elements that would be needed?

I realise that no backtest is going to prove definitively that a system will work real-time but having more data on which to test can give greater confidence that the system has a realistic chance of working in the wild.

Thx
D
 
If markets depend on performance (?), then the markets are not random. They depend on something.
If the performance is random - then why is needed management, management schools, competitive advantages, strategic development and so on? Is all just BS?
It is like when you go to a shop - do not choose! Just buy random goods - in average you will get the same results. Do not choose school for your children, car, food, house. All at the end is random and does not depend on you. At the end the result is the same. Am I right with this reflection. This makes life much much easier. :D :D :D
 
Quote from epetrov:

If markets depend on performance (?), then the markets are not random. They depend on something.
If the performance is random - then why is needed management, management schools, competitive advantages, strategic development and so on? Is all just BS?
It is like when you go to a shop - do not choose! Just buy random goods - in average you will get the same results. Do not choose school for your children, car, food, house. All at the end is random and does not depend on you. At the end the result is the same. Am I right with this reflection. This makes life much much easier. :D :D :D


You are thinking about individual case. But what happens when you add up million individual cases? You get random distribution.
 
Quote from fundjunkie:

No, I am not - unless I'm misunderstanding you. if the data generated is dynamic and has the same statistical properties as the target market (distribution etc) the simulated approximation should be a good one. Are there other elements that would be needed?

I realise that no backtest is going to prove definitively that a system will work real-time but having more data on which to test can give greater confidence that the system has a realistic chance of working in the wild.

Thx
D

Non-stationarity means that the rules by which time series was generated change. In other words - statistical properties do not stay the same all the time.
 
normally real market data can pay alot of respect to price pivots, i see here everytime you draw a horizontal line there is no second time it bounces exactly of that line, no price memory.
 
Quote from Indrionas:

I took 10 minutes to write a simple program that I called "market generator".

It generates market data. The random process is this:

200 OHLC bars are generated.

For each bar a random number from 100 to 300 is selected (uniform distribution). This number is "number of ticks in the bar".

With the above number I then generate up and down ticks with 50/50 probability. I.e. chance of up tick = 0.5 and down tick = 0.5, so no bias.

Starting price is 100. One tick = 1.

In the attachment you can see a single simulation. This is random data. You can analyze, use TA and data-mine your ass off with it, but it is completely random and all patterns you will come up with will be meaningless bull crap.


Am i correct that you take randomly data from real market data?

If you do, than i think your experiment is completely wrong and doesn't proof anything at all. In that case you take randomly data from data that according to some is not random at all. So according to those who believe in trends you use "trending" data as a basis to proof randomness.
Purely randomly would be, according to me, ANY figure between 0 and infinity. This means that a value of 0.025 can be theoretically followed by 1245785457885221.112448, 1244.24, 1245778545877855455455. That's really random (no limitations or filtering) and it would give huge moves between ticks in both directions. As soon as your basis is marketdata, it cannot be random anymore because you already limited the range between which values have to fall.

Another problem is that trends can exist in different timeframes. So if you take randomly tickdata, this data can fall in a trend that is defined in a higher timeframe. This would also mean that the data loses value as being random because in that higher timeframe the ticks would all fall within the range of the trend of the higher timeframe.

200 bars are not enough to test, because i use different timeframes, which means that in the highest timeframe i need a couple of hundred bars. If i would use hourly, quarterly , 5 minutes and tich charts i would need 200 bars on hourly with inside of each bar 200 quartely bars, within each quarterly bar 200 5minute bars...... so i would need a few million ticks.


With the small size of your sample it is for me impossible to prove that trends exist. So by default you are right because the way you prepared your data makes it impossible to me to prove my point.

Example: proof me that you can shoot someone with a gun. But you cannot use any bullets. How are you going to shoot someone ? If you leave out essentioal elements to proof something, than by default you will never be able to proof it.

To me real randomness doesn't exist in the markets as real trends do not exist either. There are only systems to maximize the probability for a certain outcome. I tested systems over thousands of trades with several years of data. If i make substantially more profitable trades than losing trades and stay profitable during all these years within getting hit severly (never a margin call), and if i'm able to define the direction for the next bar (or sometimes even several bars) with a high probability, then it is clear to me that markets are not completely random.
 
Quote from spike500:

Am i correct that you take randomly data from real market data?

If you do, than i think your experiment is completely wrong and doesn't proof anything at all. In that case you take randomly data from data that according to some is not random at all. So according to those who believe in trends you use "trending" data as a basis to proof randomness.

No, I did not use real market data. I described the process how I generated data in the post in this thread.

All I was trying to show is that people can see "trends" in the data where there are none. There are no real trends in randomly generated data. This is only to answer to the thread "Why do I see trends in randomly generated data". If you can see "trends" in random data, then how do you know you're not fooling yourself when you're looking at, say, intraday chart.

Purely randomly would be, according to me, ANY figure between 0 and infinity. This means that a value of 0.025 can be theoretically followed by 1245785457885221.112448, 1244.24, 1245778545877855455455. That's really random (no limitations or filtering) and it would give huge moves between ticks in both directions. As soon as your basis is marketdata, it cannot be random anymore because you already limited the range between which values have to fall.

Not at all. Random variable can have its distribution. If it's normally distributed random variable, it has mean and standard deviation.

For instance, if you randomly pick out 100 men and measured their heights, you won't find values like 0.25 feet, then 1000 feet, then 58 feet, etc. You will find values that are sample from the population that is defined by distribution. And these values will be random.

Another problem is that trends can exist in different timeframes. So if you take randomly tickdata, this data can fall in a trend that is defined in a higher timeframe. This would also mean that the data loses value as being random because in that higher timeframe the ticks would all fall within the range of the trend of the higher timeframe.

200 bars are not enough to test, because i use different timeframes, which means that in the highest timeframe i need a couple of hundred bars. If i would use hourly, quarterly , 5 minutes and tich charts i would need 200 bars on hourly with inside of each bar 200 quartely bars, within each quarterly bar 200 5minute bars...... so i would need a few million ticks.

Timeframes don't matter as long as data is generated by random process. The same illusion can be shown to be present if I generated data "across different timeframes". It does not matter as long as up tick probability equals down tick probability.

In the example, it generates on average 200 ticks per bar. 200 bars * 200 ticks equals 40000 ticks. Sample size large enough to infer size of bias with significant level of confidence.
 
Back
Top