PureBytes Links
Trading Reference Links
|
Bob Fulks wrote:
> I don't know how to explain it in a short message without pictures
> but will try.
Bob, thank you for an *outstanding* post. That's a wonderful
description of how to apply a logical and scientific approach to
system development, instead of the "throw some indicators at the
wall and see if they stick" approach. If I could, I'd like to ask for a
bit of expansion and clarification of some of your points:
> characteristic in real time. In this case we are looking for a periodic
> component that occurs around every 10 days. So we would like to isolate
> this component from the other information in the price pattern to see if we
> can generate trading signals from it. We design a filter that passes data
> with a period in the range of perhaps 5 to 15 bars. I usually use
> combinations of various moving averages for this. (A moving average is a
> filter that can be used to remove periodic components with fewer than some
> number of bars.)
Can you expand on this a bit? My EE filter-design classes were 20
years ago, and I was never very good at it. :-)
I assume an N-period MA (do you usually use an XMA, or maybe
Tim Tillson's T3 because of its faster response, or...?) acts as a
high-pass filter to remove signals "faster" than some period X, where
X is probably less than N, but some specifics would be very helpful.
E.g. if you have a rough rule-of-thumb relating N and X, that would
be great. For now I just use the "plot it and see how it looks"
method.
> You can then create an indicator to plot the resulting filtered signal
> to compare it with the original price signal. It should be a lot
> smoother and have the trend removed so that it oscillates around
> the zero line. Many common oscillators such as MACD have
> a similar structure and use similar moving average filters.
So do you use something like MACD's MA(fast)-MA(slow) to remove
the trend? Presumably with the slow MA set to a period long enough
that it removes the oscillations of the signal you're interested in,
i.e. so MA(fast) contains the signal but MA(slow) doesn't?
E.g. as a first experiment I tried plotting
Xaverage(High,5) -XAverage(High,15) on a daily SPX chart,
and it does a reasonably good job of isolating the tops -- and the
bottoms too, since the swing bottoms tend to have low highs.
> Ideally, the tops and bottoms of our resulting
> signal will occur at or near the same bars as the tops and bottoms of the
> ShowMe we created above. We can test this with correlation functions and
> adjust the characteristic of the filters so that we get good correlation of
> tops and bottoms.
Can you explain exactly what you mean by correlation functions?
> Now we need to generate signals near the tops
> and bottoms of our trading signal.
> Simple things such as:
> if Sig > Sig[1] then buy
> if Sig < Sig[1] then sell
> work pretty well but lag a little. Let's use
> this in our example.
The lag is a problem with many indicators, and turns many good
indicators into money-losers. Do you know of a good (safe,
reliable) way to anticipate the turn in the indicator and get aboard
the move at the start?
> Now we probably get too many unprofitable trades. For example, we probably
> want to trade only with the trend (when the trend is up, we want to go long
> and flat, when the trend is down, we want to go short and flat, and when
> the trend is flat, we may want to go both long and short). So we need a way
> to determine the trend. (There are lots of ways to do this, none perfect.)
> So we then use a trend signal to filter out trades. Assuming a Trend
> function that returns values: up = 1, down = -1, and no trend = 0
I want that Trend function!! :-) I've been trying to find a good
indicator of trend, *especially* one that detects a no-trend condition.
I (and probably most other system developers) could vastly increase
the profitability of my systems if I could figure out how to keep them
out of the market in flat periods -- or, better yet, switch to a range-
trading strategy when the market flattens.
Obviously the Trend function would need to be tunable for different
measures of trend (e.g. are you interested in the 10-day SPX
period or a longer 2-month super-period?), but that should be
do-able.
I'm sure none are perfect, but I'd appreciate some pointers if you
know of some good trend indicators.
Again, thanks for an excellent post!
Gary
|