[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Trends, random series


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: Re: [amibroker] Trends, random series
  • From: "Steve Dugas" <sjdugas@xxxx>
  • Date: 20 Jun 2002 19:19:02 -0000
  • In-reply-to: <OKEFKGFCPEECMONPLCDIIEKMCDAA.wpeters_1@xxxx>

PureBytes Links

Trading Reference Links


Greetings Big Steve,
 
Thanks very much for your reply. I did read and save 
all your earlier CMO5 posts - it sounds like a very "robust" approach, which I 
added to my own to-do list for testing in the near future (or 
sooner, if only I could manage to get myself laid-off   : - 
)
 
I think it was your mention of accumulation and distribution 
that caught my eye, because I have recently been looking into acc/dist ratings 
like those found in IBD and HGS Warehouse. I have been trying to understandhow 
these are calculated and how or when (or if) including them in different systems 
might contribute to reliability or profitability. In the course of all 
your testing, have you ever looked into these ratings, and have you found them 
to be useful at all? Thanks again!
 
Steve D.
 
 
----- Original Message ----- 
<BLOCKQUOTE 
>
<DIV 
>From: 
Steve 
Karnish 
To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Thursday, June 20, 2002 2:02 
PM
Subject: Re: [amibroker] Trends, random 
series

Little Steve,
 
Over the last six years, I have "invested" over 
10,000 hours in research.  My "less random" issues continually surface as 
I test different approaches.  My previous CMO5 posts allude to a dozen of 
these opportunity.  
 
Here's one for commodity traders:  Soybean 
Meal
 
Try testing the CMO5 on soybean meal with 
symmetrical triggers between 15-85.  Now try a CMO3 and a CMO8.  How 
about spinning a StoRSI on the same commodity.  Something tells me that 
if stock or commodity spits out profits at all trigger levels, with different 
periods inserted into the formula and still produces profits using completely 
different formulas...you might have an issue that has a fairly good history of 
repeating it's general pattern of movement.  The CMO5 works well on one 
hour DJIA (CBOT) contracts, heating oil, crude, the Canadian Dollar, Gold, and 
Bonds (to name a few).  A couple of stocks to look at for orderly supply 
and demand are:
AET, BAC, BAX, CAH, FRE, KALC, KR, PCAR, 
PEP.
 
This is a very superficial list...but, most 
traders (with system testing software) spend the majority of their time trying 
to get "something" to work on "everything".  I'd prefer to apply 
"anything" on issues that have a history of producing results with "anything" 
that you throw at them.
 
Give me issues that produce results withwide 
ranges of "triggers" and a wide range of indicators.  
 
Take care,
 
Stevie "No Wonder" Karnish, CTACedarCreek 
Trading<A 
href="">www.cedarcreektrading.com1-877-668-1125
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Steve Dugas 

To: <A title=amibroker@xxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, June 20, 2002 11:31 
AM
Subject: Re: [amibroker] Trends,random 
series

Hi Steve,
 
I usually try to concentrate to issues whose patterns 
seem to be more "predictable" than others (maybe I should call it "less 
random"). Would you mind sharing how you go about determining 
"patterns of non-random accumulation and distribution", and identifying 
which stocks have the patterns that you like to see? Thanks very 
much!
 
Best Wishes,
 
"Little Steve"   : - )
 
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Steve 
Karnish 
To: <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 

Sent: Thursday, June 20, 2002 12:07 
PM
Subject: Re: [amibroker] Trends, 
random series

Bill, Al, Ken & all,
 
One of my "golden rules":  seekand 
trade only issues that have patterns of "non-random" accumulation and 
distribution.  Many issues spew "random" numbers, month after month, 
year after year, and traders insist on trying to unlock these 
difficult puzzles (created by the "random walk" these issues march 
to).  
 
Doesn't it make more sense to concentrate on 
issues that have demonstrated a "pattern" of supply and demand?  
The force behind  price movement, for all  issues, canbe 
debated (market maker influence, commercial interest, fund participation, 
etc.).  If trader's allocate all of their time trying to apply 
approaches to "random numbers"...I believe they might be 
disappointed.  
 
It's my opinion (for what it's worth), the 
markets you select to trade are more important than the approach you 
apply.  Why force math on issues that continually change character or 
exhibit a very random pattern?  
 
Take care,  
 
Steve Karnish, CTACedar Creek 
Trading<A 
href="">www.cedarcreektrading.com1-877-668-1125
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
<A title=wd78@xxxx 
href="">wavemechanic 
To: <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 

Sent: Thursday, June 20, 2002 9:31 
AM
Subject: Re: [amibroker] Trends, 
random series

Al:
 
It is difficult to understand how this 
approach can produce patterns and harmonics (e.g., Elliott Wave, 
Fibonacci, Gann, etc.) that relate to the past.  If this is so, 
then either such analysis is worthless, which would have to be 
convincingly demonstrated to numerous users, or the Chande approachdoes 
not provide valid out of sample data.  One or the other, but 
not both.
 
Bill
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
<A title=avcinci@xxxx 
href="">Avcinci 
To: <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxx 

Sent: Wednesday, June 19, 2002 
8:12 PM
Subject: Re: [amibroker] Trends, 
random series


William (and 
Richard),
 
Let me try to explain 
Leo’s scrambler. It was developed by Tushar Chande from his book 
Beyond Technical Analysis, 2nd ed. Chande randomly rearranges thedata 
of a ticker to create new sequences. He does this as follows: he 
observes the relationship between the O, H, L, and C of the 
2nd bar by using the C of the 1st bar as 
reference. So, he writes the relationship as: 
 
DeltaO = O – 
ref(C,-1);
DeltaH = H – 
ref(C,-1);
DeltaL = L – 
ref(L,-1);
DeltaC = C – 
ref(C,-1);
 
He samples with 
replacement with these formulas and creates patterns that bear the 
market’s signature as defined by relative price relationships. The 
next step is to use a random number generator to scramble the bars. 
When you have a new sequence, you need a starting point, which is 
usually the prior C. The new bar is derived from the prior C as 
follows (where the Syn prefix stands for the new synthetic values): 

 
Syn-C = ref(C,-1) + 
deltaC;
Syn-H = ref(C,-1) + 
deltaH;
Syn-L = ref(C,-1) 
+deltaL;
Syn-O=ref(C,-1) + 
deltaO;
 
He calculates the 
interbar relationships as defined above for a ticker of your choice. 
He uses a random number generator to pick a number from 1 to x (x 
determined by the no. of bars you want to scramble). That number is 
the next bar of the sequence. Suppose on the 10th pick, you 
pick bar 5. Then the original bar 5 becomes bar 10 of the new 
sequence. The bars may repeat. You can generate as long a sequence as 
desired. You use the synthetic values determined by the equations 
above to establish the next bar’s appearance. Thus, what you wind up 
doing is encapsulating the market behavior in the original bar 10and 
reproducing it in another sequence to create new synthetic data. You 
can generate a variety of chart patterns of any length using data 
scrambling. According to Chande, you can generate 100 years of data 
and test your system against a variety of market conditions. Since 
these are the types of patterns you are likely to see in the future, 
this is the most rigorous out-of-sample testing you can achieve. 
 
The above commentary 
was partly plagiarized from Chande’s book, and it is merely a 
synopsis. To get a clearer understanding of the methodology with 
spreadsheet examples, you should read his chapter devoted to 
scrambling. 
 
I have attached 2 gifs 
showing what scrambled data look like on 2 different tickers. Note 
that the patterns are not any more unusual than those of normal chart 
patterns, and you can see definite trends developing. In fact, ifyou 
look at recent real charts of the market indices, you will see many 
instances of V-tops and V-bottoms, which is what William was concerned 
about earlier today. Hope this helps. Many thanks to Leo Timmermans 
for programming Chande’s scrambler for Amibroker. I asked him recently 
if he could program it in such a way to create synthetic data foran 
entire watch list at one time. That might be tricky, but he said he 
would look into it. 
 
Al V.
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
<A title=wpeters_1@xxxx 
href="">wpeters_1 
To: <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxxxx 

Sent: Wednesday, June 19, 2002 
1:22 PM
Subject: RE: [amibroker] 
Trends, random series, etc : was MetaStock and AmiBroker

<FONT face=Arial color=#0000ff 
size=2>AL,
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>With randomised data isn't there a chance that the so-called 
'trend' can reverse on the next tick 'more-so' than data based on 
human intervention. And that includes mechnical systems (ie. if 
enough traders started using a certain 
indicator).
<FONT face=Arial color=#0000ff 
size=2>The obvious predictability in human behaviour is what can 
give you the little advantage and this is not in totally randomised 
data.
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Surely if so your 'randomised' data 'trend' does not have an 
equal chance of reversing on each and every tick then its not 
randomised.
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Very interesting topic.
 
<FONT face=Arial color=#0000ff 
size=2>William

<FONT 
face=Tahoma size=2>-----Original Message-----From: Al 
Venosa [mailto:avcinci@xxxx]Sent: Wednesday19 
June, 2002 10:54 AMTo: 
amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
Trends, random series, etc : was MetaStock and 
AmiBroker


Richard,
I'm glad you took the liberty of changing the subject line. I 
don't think you are being a pessimistic, grumpy old man (sorry, 
don't know how old you are). Let me throw in another 2 cents into 
the discussion of trends. You said in order to have a trend, there 
must exist some information in the immediate past that would cause 
the trend to persist for a long enough time to profit from the 
move. I cannot agree more. That is absolutely true. A bad earnings 
report comes out on INTC, and the market immediately reacts by 
selling. This is further fueled by some nitwit analyst who changes 
his buy recommendation to hold or sell (of course, always after 
the fact!). Then, all the other individual "investors" climb 
aboard and do more selling, driving the prices still further down. 
Then, the company foretells that over the next several quarters 
there will be more of the same in regards to diminished sales, 
inducing further pessimism that drives the prices still further. 
All of this information results in a downward trend. This does not 
nor cannot happen with random events like coin tosses. So, 
technically speaking, you are perfectly correct in your assertions 
. 
Now, the trend follower comes in. He couldn't care less what is 
driving the prices down. In fact, he purposefully never pays 
attention to news events and announcements that may drive prices 
in one direction or another. He doesn't care about the cause of 
the trend. All he does is climb aboard the resulting trend, using 
whatever entry he has fashioned to enable him to take advantage of 
this 'breakout' and whatever exit that enables him to exit when 
the trend falters. Who was taking the other side of the market 
when Neeson was loading up on Nikkei futures, driving the Barings 
Bank into bankruptcy? The trend followers who recognized whatwas 
happening and capitalized. What I'm saying is, the trend follower 
buys or sells all breakouts (however you want to define the term 
'breakout') and hopes that the resulting price behavior continues 
long into the future. With the scrambler, these 'trends' can 
indeed take place even with randomized data, as you have already 
pointed out. What I'm suggesting is that your system of entries 
and exits doesn't have a clue what caused the breakout to occur 
because it's nothing more than a mathematical algorithm that 
trades based on certain signals programmed by the user when 
certain price behavior occurs. I contend you can test your system 
on such price behavior just to learn how well the system reacts to 
price breakouts and to see if, indeed, it is effective in finding 
trends in the data, albeit randomized data. By the way, these 
comments are not limited to trend following systems. I chose that 
trading approach merely as an example to make my point. 
Richard, I'm not trying to be argumentative on this topic.I'm 
just pointing out why I think there might be value in testinga 
fully optimized trading model on randomized data. Thanks for the 
provocative discussion. 
Al V.





>From: "Richard Alford" 
>Reply-To: amibroker@xxxxxxxxxxxxxxx 
>To: 
>Subject: [amibroker] Trends, random series, etc : 
was MetaStock and AmiBroker 
>Date: Wed, 19 Jun 2002 08:35:15 -0500 
> 
>I agree on the oxymoronic nature of so called 
random series. The problem results from using very particular 
distributions for the random numbers which allows the 
mathematicians to write books and teach classes. The Gaussian 
functions are one of the most well-behaved functions around. 
> 
>wrt trends in scrambler and other "random" time 
series - simply stated if they are truly random there is 
absolutely no information about the past in the next event. Your 
coin toss observation is a great example: given the 1/1000 case of 
10 heads in a row the odds of another head are precisely 50% for 
the next toss. 
> 
>In order to discuss a "trend" there must be some 
information that persists. One can generally, perhaps always,see 
trends in a random series - in hindsight - however it contains no 
predictive information. There are systems that seek to identify 
trending vs. trading range behavior (I think Ehlers addressesthis 
issue - can't say with how much success), however, they are 
inaccurate at the changes. A moving average on the coin toss 
series will identify trends - but the lag in the moving average 
that we all know of and try to remove is the "hindsight" problem. 
> 
>Trend scale is still another issue. The apparent 
fractal behavior of the stock market suggests that one can find 
trends, and/or search for trends, over any time scale desired. 
(The inflationary or perhaps evolving nature of economies have 
placed a long term upward bias on the trends that can confusethe 
issue.) Once again a moving average of any length on a random 
series will display periods of upward and downward "trends". 
> 
>Sorry to be such a pessimistic old grump. 
> 
>Cordially, 
> 
>Richard 
> 
> ----- Original Message ----- 
> From: Avcinci 
> To: amibroker@xxxxxxxxxxxxxxx 
> Sent: Tuesday, June 18, 2002 8:19 PM 
> Subject: Re: [amibroker] Re: MetaStock and 
AmiBroker 
> 
> 
> Richard, 
> 
> >>distribution of the trends is predictable 
for a random series >> This sounds oxymoronic to me, i.e., 
predictable distribution of random trends. But, I'll take your 
word for it. :-)) 
> 
> Regarding the scale when speaking of trends, I was 
referring to weeks to months, perhaps even a year or two at most 
(stocks, not futures), but not decades. This brings us back to 
discussing the Scrambler. You said you don't hold much if any 
value in it, but can you elaborate just a little more on whatyou 
mean in terms of the scale I am referring to, because in a period 
of 130 trading days, I noticed some pretty decent trends develop 
that lasted long enough to be of value in system testing? Thanks, 
Richard. By the way, I agree that this discussion, interesting as 
it is, has absolutely nothing to do with Metastock!! 
> 
> AV 
> 
> ----- Original Message ----- 
> From: Richard Alford 
> To: amibroker@xxxxxxxxxxxxxxx 
> Sent: Tuesday, June 18, 2002 3:55 PM 
> Subject: Re: [amibroker] Re: MetaStock and 
AmiBroker 
> 
> 
> wrt rsi/stochastics/cmo/etc... my point was that 
they attempt to identify a phenomenon that has been observed as an 
indication of overbought/oversold. There is a reasonable belief 
that the arithmetic created to identify that behavior can be a 
useful indictor of that condition. The comment offered for Elliot 
wave and Fibinacci behavior also points to a large community that 
believes that there is a hidden structure to the market and human 
behavior - I am not a devotee of that belief, but I also havemy 
doubts about Madam Cleo.... 
> 
> wrt trends in random numbers: there is, of course, 
a trend between any two non=equal numbers. Given a suitable 
sample, the distribution of the trends is predictable for a random 
series - probably also random and if the normal Gaussian (pardon 
the pun) distribution is used, as the derivative (or instantaneous 
slope/trend) is a skewed Gaussian. Interesting to the 
statisticians but not very useful to the average investor. 
> 
> wrt: trending 30% - that really has to be a matter 
of scale. If you chose a suitably long moving average you can 
probably even consider today as part of a long time upward trend - 
not particularly useful - although even my meager portfolio looks 
better today than it did in 1970 - not saying much.... 
> 
> Interesting discussion - don't have the faintest 
idea what it has to do with MetaStock :) 
> 
> Cheers, 
> 
> Richard 
> 
> 
> ----- Original Message ----- 
> From: Al Venosa 
> To: amibroker@xxxxxxxxxxxxxxx 
> Sent: Tuesday, June 18, 2002 2:28 PM 
> Subject: Re: [amibroker] Re: MetaStock and 
AmiBroker 
> 
> 
> Thanks, Richard. I always enjoy your mathematical 
insights. I hope you didn't get the impression I was suggesting 
'optimizing' on random bars. I was merely suggesting 'testing' 
your already optimized system on the scrambled data, seeing if it 
can detect those occasional occurrences of non-random behavior of 
random numbers, that's all. Certainly if a trend-following system 
can detect trends in random price bars, it ought to be able to 
detect them in real, non-random price bars, too, don't you think? 
Markets trend only about 30% of the time, as I am told, so 
wouldn't you consider non-trending markets (i.e., sideways 
markets) somewhat representative of random price behavior? 
> 
> I also get the impression you are not an advocate 
of overbought/oversold oscillators, right? 
> 
> Al Venosa 
> avcinci@xxxx 
> >From: "Richard Alford" 
> >Reply-To: amibroker@xxxxxxxxxxxxxxx 
> >To: 
> >Subject: Re: [amibroker] Re: MetaStock and 
AmiBroker 
> >Date: Tue, 18 Jun 2002 12:55:33 -0500 
> > 
> >The non-random appearance of random numbers is 
a very well know phenomenon - probably accounts for the continued 
enthusiasm in slot machines in Vegas... 
> > 
> >I stand by my comments. In particular, the 
various oversold/bought indicators rely on the observation that 
the close tends to be higher in the l-h range in the overbought 
condition - the persistence of such a trend is interpreted as 
buy-sell behavior. 
> > 
> >I personally see no use in random data. There 
is no information in random data and no expectation of the past 
affecting the future - the only reason for technical analysis 
(other than too much time on one's hands) is to glean information 
about the near future. There are, of course, degenerate uses for 
random numbers in testing, but to test, build, or, heaven forbid - 
optimize, using random time series is pointless at best. 
> > 
> >wrt coin tosses: the coin is a Markov process 
of length 0 - no memory. If the market is the same, we may aswell 
head for Vegas and get free drinks as we go broke. (OK - the 
market MAY be a fair game, but I doubt it.) 
> > 
> >Just some thoughts... 
> > 
> >Richard 
> > ----- Original Message ----- 
> > From: Al Venosa 
> > To: amibroker@xxxxxxxxxxxxxxx 
> > Sent: Tuesday, June 18, 2002 9:57 AM 
> > Subject: Re: [amibroker] Re: MetaStock and 
AmiBroker 
> > 
> > 
> > Well, Richard, to be honest, I haven't yet 
done any back (er, I mean forward) testing of the random timebars 
created by Scrambler. However, I have looked at the results of 
randomly scrambling the bars and watching them form on the screen, 
and you can see definite trends develop that can last several 
months, much like in real life. So, at least theoretically, it 
seems to me that, if you are testing a short-term or 
intermediate-term trend-following system, it ought to be ableto 
pick up on those short, seemingly non-random trends (even though 
they were developed from a random number generator). Remember, if 
you flip an honest coin 1000 times, there is a low but finite 
probability that it will come up heads 10 or 12 or 15 times in a 
row. 
> > 
> > AV 
> > 
> > 
> > >From: "Richard Alford" 
> > 
> > >Reply-To: amibroker@xxxxxxxxxxxxxxx 
> > >To: 
> > >Subject: Re: [amibroker] Re: MetaStock 
and AmiBroker 
> > >Date: Tue, 18 Jun 2002 09:48:35 -0500 
> > > 
> > >I understood that the underlying premise 
of technical analysis was that there IS information in the 
price-volume behavior. If you test against random data the results 
had better result in random behavior - perhaps mean behavior is 
more accurate. 
> > > 
> > >Perhaps I am delusional, however, I would 
appreciate insight into the value of random time bars? 
> > > 
> > >Cordially, 
> > >Richard 
> > > ----- Original Message ----- 
> > > From: Al Venosa 
> > > To: amibroker@xxxxxxxxxxxxxxx 
> > > Sent: Tuesday, June 18, 2002 9:23 AM 
> > > Subject: Re: [amibroker] Re: MetaStock 
and AmiBroker 
> > > 
> > > 
> > > Sorry, Dimitris, I thought you knew 
about it. Go to post 19331 and download it, following Leo 
Timmerman's instructions. What he has done is created a VBscript 
tool based on Tuchar Chande's price bar scrambler that scrambles 
all the bars of a given ticker from the previous x bars (barsand 
ticker set by the user) and then re-orders those bars randomly 
into the future, thus creating a ticker that you can use in 
forward-testing. If you set the no. of bars to, say, 130, youcan 
generate 6 months worth of new data for each ticker you do this 
on. Very, very cool. It differs from William's Simulator in that 
it actually generates new data rather than repeating existingdata 
from the last x bars. Try it, you'll like it. 
> > > 
> > > Al Venosa 
> > > 
> > > >From: "dtsokakis" 
> > > 
> > > >Reply-To: amibroker@xxxxxxxx 
> > > >To: amibroker@xxxxxxxxxxxxxxx 
> > > >Subject: [amibroker] Re: MetaStock 
and AmiBroker 
> > > >Date: Tue, 18 Jun 2002 13:49:30 
-0000 
> > > > 
> > > >What is Leo's scrambler ?? 
> > > >DT 
> > > >--- In amibroker@xxxx, "Al Venosa" 
wrote: 
> > > > > 
> > > > 
> > > 
> > > 
> > 
>------------------------------------------------------------------------------ 

> > > Chat with friends online, try MSN 
Messenger: Click Here 
> > > 
> > > Your use of Yahoo! Groups is subject to 
the Yahoo! Terms of Service. 
> > > 
> > 
> > 
> 
>------------------------------------------------------------------------------ 

> > Get your FREE download of MSN Explorer at 
http://explorer.msn.com. 
> > 
> > Your use of Yahoo! Groups is subject to the 
Yahoo! Terms of Service. 
> > 
> 
> 
>-------------------------------------------------------------------------- 

> Join the world's largest e-mail service with MSN 
Hotmail. Click Here 
> 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! 
Terms of Service. 
> 
> 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! 
Terms of Service. 
> 
> 
> Yahoo! Groups Sponsor 
> ADVERTISEMENT 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! 
Terms of Service. 
> 


Send and receive Hotmail on your mobile device: <A 
href="">Click 
HereYour use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Your use of Yahoo! 
Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Your use of Yahoo! Groups 
is subject to the Yahoo! 
Terms of Service. Your use of Yahoo! 
Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Your use of Yahoo! Groups is 
subject to the Yahoo! Terms of 
Service. Your use of Yahoo! Groups is 
subject to the Yahoo! Terms of 
Service. Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.