PureBytes Links
Trading Reference Links
|
Chuck,
I knew I'd get myself into deep doo-doo by answering your first question.
Even though I've owned AB for more than 1.5 years, I still consider myself a
rank beginner when it comes to AFL. There are lots more folks out there much
more astute than I am who could probably give you the proper code. To increment
each year, you probably need a For loop, which I plead ignorance on. I believe
you want to filter on TODAY'S stocks from a minimum volume of 200,000 to a
maximum volume of 500,000. So, you have already defined TodaysFilter, which
is:
TodaysFilter = V>MinFilter AND < MaxFilter;
What you really need to define is LastYearsFilter, and then the
yearbeforelast's, and so on. Each of those years' volumes is normalized to the
average volume 4500 bars ago. Sorry, I don't know the answer, but I'm sure
someone with intimate knowledge of For loops will speak up. I'm much more of a
lurker than a major contributor to this forum. Every once in awhile, I emerge
from hibernation and contribute something, but when it comes to code, I usually
let others take the lead.
AV
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=chuck_rademacher@xxxxxxxxxx
href="">Chuck Rademacher
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, June 19, 2003 8:42
PM
Subject: [amibroker] A challenge for Al
Venosa...
Al,
<FONT
face=Arial>
How about writing an AFL
statement to do the normalising for me?
<FONT
face=Arial>
It would look something
like this:
<FONT
face=Arial>
x =
ma(WilshireVolume,245);
// 245 is approximately a year.... not critical
y =
ref(ma(WilshireVolume,245),-4500); // 4,500 is an
approximately how far back I want to look
<FONT
face=Arial>
maxFilter =
500000;
minFilter =
200000;
<FONT
face=Arial>
TodaysFilter =
(
);
<FONT
face=Arial>
<FONT
face=Arial>
I finished four of the
lines. If you could finish the fifth line, it would be
fantastic.
<BLOCKQUOTE
>
-----Original
Message-----From: Al Venosa
[mailto:advenosa@xxxxxxxxxxxx]Sent: Thursday, June 19, 2003 8:21
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re:
[amibroker] Historical volume filtering
Chuck,
I, too, have often wondered how to apply a volume filter to the distant
past. What you suggest makes sense. However, it might be a little more
accurate if you normalized annual volume of the NYSE to 1985 and then
increased your multiplier each year by the incremental increase (or
decrease) in volume for the next year. So, each year there would be a
different multiplier applied to your filter (starting with 1985 being 1).
Also, why limit it to the NYSE? If you trade NASDAQ stocks, do the same for
them. Or, how about the Wilshire 5000 for the entire market?
Of course, this brings on the next question. If you also filter on
stocks with a price > $20/share, for example, how do you handle stock
splits over the years? A $20 stock today might be $0.20/share or less back
in 1985. Any ideas along these lines?
Al Venosa
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=chuck_rademacher@xxxxxxxxxx
href="">Chuck Rademacher
To: <A
title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, June 19, 2003 8:01
PM
Subject: [amibroker] Historical
volume filtering
<FONT face=Arial color=#0000ff
size=2>I was about to send this email to "b", but I would welcome comments
from anyone else interested in such historical
work.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>At the risk of having some of you ask why it matters, my
backtesting generally goes back to 1985. Just yesterday,
I posted a message to this group saying that I always use one set of
parameters across all stocks and across all
timeframes. One of the downsides of this approach
(perhaps) is that volume has changed over time. I suppose that
one could argue that volatility changes over time as well.
Volatility, however, goes through cycles and volume just keeps
growing.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>The question that I have involves volume filtering. To
me, it is essential that volume filters be applied to actual volume and
not backadjusted volume. My concern, however, is that if I
apply a filter requiring an average of 300,000 shares, I don't get very
many hits back in the late 80's and early
90's.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>I have a solution in mind and would appreciate some input or
dialogue on the subject. It seems to me that volume
filtering should be based on some percentage of the total volume of
all NYSE stocks (for instance). I haven't done my homework
yet, but let's say that the average volume today is ten times more than it
was in 1985. If I decide to filter today at 300,000 shares,
wouldn't it make sense to filter based on 30,000 shares in
1985. I can probably answer that question myself by saying
that I don't think 30,000 would be an adequate filter in 1985.
But I could scale it from 100,000 to 300,000 progressively between 1985
and 2003 based on mathematical equation.
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>You may ask why backtesting to 1985 (or any other date) is
important. There are dozens of reasons, but the most
important reason to me is that prospective investors in any funds that I
manage want to see how a proposed system would have performed
over a statistically meaningful period of time. You can argue
about the relevance of such information, but THEY EXPECT TO SEE
IT. For the record, I also think that it is very
important.
<FONT face=Arial color=#0000ff
size=2>
<FONT
face=Arial color=#0000ff size=2>I welcome comments from anyone with an
interest or knowledge in this
area.Send BUG REPORTS to
bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page:
<A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend
SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page:
<A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|