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

Re: [amibroker] Test of Scrambler



PureBytes Links

Trading Reference Links


>>I presume the BOBE is either Bob Evans 
Restaurants or the symbol is BBY for Best Buy...>>
 
Bob Evans. They have good breakfast sausage.
 
>>I am not intimately familiar with ADX, 
however it appears that your ATR constraint may have some impact on the signals 
that you accept.  At any rate that would likely increase the similarity of 
the synthetic results with the actual instruments. >>
 
I noticed that the volatility of the scrambled price data was very high. 
So, I used the ATR constraint to mitigate some of that volatility, to get the 
volatility closer to real life. And, you're right. I think it did increase the 
similarity of the synthetic results to the real price data. That's one reason 
why I concluded testing on scrambled price data is not all that bad. 
 
>>More importantly, the average directional 
movement indicators, in my understanding, are oscillators that hope to exploit 
an observation that prices trend upward by closing strongly upward; i.e. the 
sentiment of the trend is still strong and buyers are interested in the 
stock.  Your random/scrambled buyer has no concept of interest (or 
trend for that matter) and this property should not exist in the data.  I 
suspect the inconsistent metrics of the synthetic results indicate this missing 
information.>>
 
Actually, I don't use the ADX as an oscillator. I learned from Chuck LeBeau 
that you can use the ADX both as a setup and a trigger for entering a trade. The 
concept is the fact that as the ADX rises, it signifies a trend (the relative 
position of the PDI and MDI determine the direction of the trend). The higher 
the ADX, the stronger the trend. So, you wait until the ADX actually falls into 
the teens (signifying a consolidation or trading range), then upticks a fraction 
of a point (breakout). The uptick is the trigger to enter. So, it doesn't matter 
what the past price history is or the interest of the buying public. If the 
conditions are such that the prices are breaking out of a consolidation, the 
trigger is activated. Again, that's why I contend you can use scrambled data to 
test how well your trigger works. 
 
>>Reviewing your spreadsheet results, I am at 
a loss for what I could conclude about the systems, other than there is little 
correlation in system metrics. The average return of the synthetics is nearzero 
with a large variation. The average win/loss are somewhat similar with roughly a 
10% stddev. max and avg trade drawdown are consistent, however with a ATR stop 
loss that would be expected. >>
 
I agree with your observations. Unfortunately, the way Leo has programmed 
the scrambler, it can only scramble current data into the future. What I asked 
him to do (and he has recently done it, but I haven't tested it yet) is to be 
able to set dates in the past so that one can create synthetic data from past 
data during a bull market (or whatever market you want to test in). In suchan 
instance, it's possible that the synthetic bars may produce more bullish trends 
than those in present time (because most of the bars in the mid-to-late 90swere 
changing in a positive direction). I'd like to repeat the above testing with 
synthetic data from, say, 1996-1999 and see how they compare to real data from 
the previous period 1993-1996. If the summary table and accompanying 
correlations are better, that would signify the utility of scrambled data, don't 
you think? After all, the system I tested was a long-only trending system, so 
you can't expect it to be profitable during the current time period. I wishI 
knew Tushar Chande's email address. I'd like to write him and discuss these 
matters with him.
 
>>You can certainly generate a largenumber 
of synthetic baskets, however, I still fail to see the value in those.  If 
you somehow developed a profitable approach that worked for all random series, I 
may expect it to work for non-random series - maybe - unless the system made use 
of the metrics of the random series distributions, etc.  You can indeed 
create synthetics and test systems ad nauseam - but I see little to no value in 
that effort.>>
 
Why not? You may very well be correct, Richard, and you probably are. I 
just want to see for myself before I close my eyes to the possibility. I think 
the value is in seeing how well your system recognizes the patterns it was 
designed to recognize, even with randomized data.
 
>>You clearly did a lot of work and I do find 
the results interesting.  They do, however, support my suspicion that 
the results of scrambled data are not terribly useful. Of course, I may have 
seen what I expected!  As we used to say with seismic maps, "if I didn't 
believe it I wouldn't see it."  Which brings another anecdote experience to 
mind:  the research center created a random seismic section, hung it on the 
wall and listened to interpreters interpret the geologic significance.....  
>>
 
As I've said several times on this board, people trade their perceptions of 
the market, not the market itself. Isn't that what TA does, help the analyst 
develop a strategy to support his perception of market behavior? 
 
>>What do you conclude from the 
results?  I have no doubt that you can "see" trends and patterns in the 
random series, we have all noticed similar "pictures" in by watching cloudsroll 
by; however, I have been unable to extract the value from such cloud 
formations.>>
 
I see lots of stormy weather approaching! :-))) Actually, let me reserve my 
conclusion until such time as I am able to do some more testing. I'll be back. 

 
I've always respected your opinion, Richard. Thanks for the stimulating 
discussion.
 
Al 
<BLOCKQUOTE 
>
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Avcinci 

To: <A title=amibroker@xxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Saturday, June 22, 2002 6:20 
PM
Subject: [amibroker] Test of 
Scrambler

Well, folks, I conducted a test of the Scrambler today. Here is a 
description of the experiment. First, I chose 5 tickers that were not 
correlated as to industry and put them in a watchlist. They were AAPL (Apple 
Computer), AET (Aetna Insurance), ANF (Abercrombie and Fitch), BP (British 
Petroleum), and BOBE (Best Buy). I then coded a trend-following system that 
trades both long and short (ADX uptick for entry with a max 2.5-ATR stoploss 
and a 4-ATR trailing stop, using Stephane's RemBuyTrail and RemShortTrail 
calls as part of his RemBuy.dll plugin). I tested the system on those 5 
tickers for the last 1000 bars (about 4 years, starting on July 1, 1998). 
Then, I ran the scrambler to generate 1000 bars of synthetic data for each 
ticker, creating a separate watchlist for those synthetic tickers. I tested 
the system on those 1000 bars and recorded the results. I then replicated 
this procedure 4 more times to generate 5 separate replicates of these 
randomized synthetic tickers and therefore 5 independent forward tests of 
the system. The results are summarized in an Excel spreadsheet attachedto 
this message. 
 
The column headings are self explanatory. The first row of data 
contains the BACKtest of the 5 native tickers using real data from the last 
1000 bars. Keep in mind I used position sizing of 1% of capital (1R = 
$1000), so the % return figures are necessarily small because of the way AB 
calculates % return (on the basis of total equity). The system generated a 
small positive expectancy of 0.076 over the last 1000 bars and a total net 
profit of $14,530. The next 5 rows of data summarize the FORWARDtest results 
from the synthetic, scrambled data. Data in the 2nd and 3rd rows were 
extremely close to the real data, giving about the same drawdowns, 
expectancy, net profit, avg. wins, avg. losses, no. of wins and losses,etc. 
However, the next 3 rows showed losses with negative expectancies and 
negative % returns. The drawdown numbers were very close to the previous 
data. The biggest differences were in the % profitable trades, i.e., the 
number of wins relative to the total no. of trades. This was the main cause 
of the negative expectancies and returns. Everything else seemed to be 
fairly uniform relative to the actual data. 
 
When I viewed the synthetic data, I noticed that often the data were 
highly volatile, much more so than usual. Since I was expecting this 
behavior, I tried to control this somewhat by including in the buy and short 
statements to trade only if the 20-day ATR was less than 7% of the closing 
price. So, all trades generated were constrained by this filter. Perhaps I 
should have imposed a 5- or 10-period moving average of the ATR being less 
than 7% of the close to control volatility even more. Other observations 
included trends, some lasting as long as several months, head-and-shoulder 
patterns, support and resistance behavior, and consolidation periods. So, 
based on this experiment, I see no reason why the scrambler cannot be used 
as out-of-sample data to test a trading system. Now, having said that, I 
agree with the critics who state that there is absolutely no past history to 
govern future price behavior (i.e., trading psychology, supply and demand, 
etc.), and for that reason use of scrambled data to test trading systems is 
somewhat unrealistic. There's no doubt about that. However, I still contend 
it can be used as a tool for testing your trading system. I welcome any 
comments. 
Al VenosaYour use of Yahoo! Groups is subject tothe 
Yahoo! Terms of 
Service. Your use of Yahoo! Groups is 
subject to the Yahoo! Termsof 
Service.