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

RE: which timeframe is best?



PureBytes Links

Trading Reference Links

[And this blast from the past.]

http://www.miapavia.it/homes/ik2hlb/timef.htm

TRADING TIME FRAME


----------------------------------------------------------------------------
----




Trading Time Frame
by  Bob Brickey  www.tradelab.net


A practical problem in price waveshape analysis has to do with the rate at
which prices are sampled (weekly, daily, hourly, each minute, etc.), so the
sampled representation will retain a price waveshape's essential
characteristic information.  In the price dimension, we also may wish to
know how many amplitudes must be distinguished from one another so a sampled
representation serves its intended purpose adequately.  (Point & figure
charting is an example of a price amplitude sampling scheme where price
detail is filtered.  Fuzzy price level logic is another.)

An infinite number of samples may be theoretically desirable in analyzing
continuous waveshapes that contain no noise, but this creates an infinite
database that requires an infinite amount of numeric processing.  Moreover,
price waveshapes contain noise and the analysis bandwidth (the spectrum of
frequencies considered in an analysis) would be infinite with an infinite
number of samples.  Consequently there would be an infinite spectrum of
noise.  Infinite spectrum signal analysis can be achieved only in the
absence of noise, because the number of distinguishable amplitudes is
limited by the amount of noise, or more correctly, by the ratio of
signal-to-noise power.  Market trade increments established by trading
exchanges fix price levels to absolute increments, but even so, price
waveshapes contain noise manifested by quantum jumps between incremental
levels and because noise also exists in the time dimension.  An infinite
number of sample points obviously is not practical for these and other
reasons, but how many should be used?

An important consideration is the shortest time interval over which we want
to hold individual trade positions.  Price changes occurring faster than
that interval generally can be considered noise, because generally we will
want to ignore them.  An exception is where shorter time interval changes
can be analyzed to predict longer interval changes.

The shorter the average trade interval, the more trades we can make per unit
of trading time.  Offsetting this consideration is the fact that market
price swing amplitudes are inversely proportional to frequency.  (That holds
true over cyclic periods ranging from seconds to centuries if the effects of
trading-rule-imposed minimum price increments are smoothed over time.)  In
other words, as price swing frequency increases, price swing amplitude
decreases.  Therefore, though trading shorter time interval price cycles
results in more trades per unit of trading time, the mean potential gross
profit per trade is smaller.  The lowest practical gross profit is fixed by
total average trade transaction cost.  So, it is the average combined cost
of commissions, fees, slippage, and execution mistakes that fixes the upper
spectral frequency that should be considered in price change analysis.

Trade transaction costs vary widely from trader-to-trader.  They depend on
such factors as whether trading is being done on or off a trading floor,
whether off-floor traders have direct floor order placement access, the
types of trade orders used, trade size, average trader latency between
trading signals and order placement, the average number of order placement
mistakes made over time, the average time before order mistakes are
corrected, and other factors.

Trader latency is an especially big factor in many cases.  Trader latency
often results partly from trader hesitation.  When automatic trading systems
generate buy or sell signals, traders often do not act immediately, because
they are trying to second-guess a system, because of reluctance to accept
loss, or because of fear of loss.  Trader latency is a much bigger factor
than many traders realize or want to admit.  Because it affects transaction
cost, it also can be a significant factor determining the optimum price
sampling period.

The longer average trader latency is, the longer the optimum price sampling
time period becomes.  If you have trouble following trading system signals
without hesitation, you shouldn't be using a short price sampling period.
Frequent price sampling is optimum only where total transaction cost is very
low and the noise component of all input information is very low.  The
higher the average transaction cost per trade and the higher the noise level
of the input information being analyzed the longer the optimum time sample
interval becomes.

Trader latency also results where traders have competing obligations.
Someone who trades while working at another job often cannot act on trading
signals immediately, even if they otherwise would.  Other obligations even
may restrict them to trading only on a daily or weekly basis.  A restriction
like that fixes the upper spectral frequency limit for optimal analysis to a
much lower value than where someone is able to act on real-time trading
system signals throughout each trading day.

Because of these and other considerations, the optimum upper spectral
frequency analysis limit varies widely from trader-to-trader.  It is that
optimal upper spectral frequency limit that determines the ideal price
waveshape sampling rate, or in other words, that determines whether daily,
60-minute, 15-minute, 5-minute, or whatever bar charts and related analysis
input should be used.  A longer than ideal price sample time interval will
filter out waveshape information important to trading decisions.  A shorter
than ideal sample interval will include unnecessary noise.  (Noise has
several meanings, as mentioned in previous lessons.  I am using it here to
mean price changes that occur over time intervals too short to be relevant
to a trade duration of interest.)

Noise is very important to traders, whether they understand it or not,
because noise makes analysis more difficult and less reliable.  It even can
make reliable analysis impossible.

If input information a trader relies on does not correlate with future price
changes, why include it in trading decision analysis?  As I have said
various ways in the past, market analysis is difficult enough even where all
input information being considered is relevant.  Anything that cannot be
demonstrated to correlate to future price changes is noise, whether it is an
indicator most traders swear by or spectral components at frequencies too
high to take advantage of.  Everything that is noise to you, in your
personal trading situation, should be removed from your trade decision
process to the fullest extent possible, because if it isn't, the probability
of success over a large number of trades will be near zero.

The idea of mixing everything imaginable into decision making in the hope
something good will come out is foolish.  It is something like taking every
medication in a pharmacy in the hope of taking the one you need.  You may
get the one you need that way, but you would get lots of others that would
do more harm than good and the combination would likely kill you.  Mix very
much that does harm with the little that could help and the chance of
improving your situation will be poor.

The same is true in trading.  Every input that doesn't have predictive value
is noise and noise erodes trading account balances.  Add very much noise to
your decision process and success becomes impossible, except by chance, even
if traces of valuable signal information are buried somewhere within.  We
might laugh at poorly educated people who would take every medicine they
could get their hands on in the belief it would cure them, but traders do
the same thing all the time with irrelevant information.  Few people laugh,
because few understand the adverse effects of noise.

If the average noise power is N, and if the average signal power is S, then
S+N will be the average total power of signal and noise when both are mixed.
 The effective values of the amplitudes are the square roots of the
respective power values.  (They are called powers, because they are values
already raised to powers of two.  Taking square roots simply reverses the
squaring process.)  Therefore, the ratio of the total power to noise power
is (S+N)/N, and the ratio of the effective amplitudes of signal and noise to
noise is:

  Sqr(S+N)/Sqr(N) = Sqr((S+N)/N) = (1+S/N)^(1/2)

If it is assumed (a very close approximation of the truth) that a change in
signal amplitude cannot be instantly recognized (recognized in real-time)
when it is less than the noise amplitude, whereas a signal can be instantly
recognized if its amplitude is equal to or greater than that of the noise,
then the number of distinguishable signal amplitudes in the presence of
noise is:

  Nsa = k(1+S/N)^(1/2)

where Nsa is the number of noise signal amplitudes and the factor k is near
unity for most types of analysis.  k is never far from unity, even with the
most exotic analysis methods known.  That is another way of saying it is
impossible to instantly detect signal that is much weaker than noise using
any method ever devised, no matter how sophisticated.

It is obvious from that relationship how destructive irrelevant analysis
input can be.  Mixing in information that doesn't correlate to the future
increases the total noise level with no gain in signal strength.  The higher
the noise level, the more difficult it becomes to detect a signal.  Add very
much noise to an already noisy signal and the signal cannot be instantly
recognized by any method ever devised by the most brilliant people of all
time.  (Find a solution to that problem and you won't have to worry about
making money in the market, because it will be worth a fortune.)

If a price waveshape is sampled every 1/2fb day, where fb is the spectral
frequency bandwidth, then in time T there will be 2fb samplings (because of
the bandwidth limiting effect explained by Harry Nyquist in his 1924 paper
"Certain Factors Affecting Telegraph Speed"), as well as a like number of
amplitudes of price that are independent of each other.  It follows the
number of distinct signals in T days from which one makes a choice under the
stated conditions is:

  Nsa2fbT = k(Sqr(1+S/N)^(2fbT)) = k(1+S/N)^(fbT)

Further, the amount of signal information in time T, when the bandwidth is
fb in the presence of a signal-to-noise ratio of S/N, will be:

  H = Log(Nsa2fbT) = kTfb log(1+S/N)

where Log is to the base 2.  (Students of electronics will see a similarity
to Hartely's law, which states the amount of information transmitted over a
channel of bandwidth fb Hz when used for T seconds is proportional to the
product of the bandwidth and the transmission time, or H = kTfb.)

Let's interpret the significance of that expression.  One of the most
important things it shows is the amount of information that can be recovered
from a signal and noise mixture increases as noise power decreases.  So, if
we can recover more signal by reducing noise, how can we reduce noise?
There are several ways, but two are highly significant and nearly always
critical to long-term trading success:

1. We must not pollute and thereby destroy the value of inputs with the best
signal to noise ratios by mixing in information with significantly poorer
ratios.  We especially must not include inputs that have no demonstrable
correlation to future price changes whatsoever, because they are entirely
noise.

Would tuning your radio to static and turning up the volume help you
understand someone speaking over a noisy telephone circuit?  Asking others
in the room to be quiet, might help, because that would reduce the total
noise level, but mixing in more noise would reduce signal recovery.

If you think trading indicators or other inputs that do not correlate with
future price changes have predictive value in combination, then combine them
and demonstrate correlation of the combination with future price changes
before using them.  Even if you can demonstrate correlation that way, don't
use the raw inputs that are alone only noise.  Use the combination that
correlates with the future.  If you can't combine input information in some
way and demonstrate correlation of the mixture with future price changes,
don't use the information at all, because you will bury what signal you have
deeper in noise.

The equation as stated above relates directly to analysis of price
waveshapes, but the same is true generally in the analysis of input
information of any kind, such as the information traders and investors call
"fundamental" information.

Of course, information that is truly fundamental to future price change is
relevant and not noise.  Unfortunately, most market information represented
as fundamental has no demonstrable correlation to future price change
whatsoever.  That is especially true over the very short time periods of
interest to most traders.  The term "fundamental" therefore often is a
misleading misrepresentation, because the information is nothing but noise
with respect to future price changes.

2. Limit the frequency spectrum of analysis to spectrum containing
"tradeable" price changes.  Price changes that occur too quickly to be of
value in your personal trading circumstances are noise, even if they might
constitute signal for someone able to take advantage of them.  Including
them in analysis will reduce the amount of information useful to you that it
is possible to recover.

There is considerable potential for improvement here, because noise power is
directly proportional to spectral bandwidth.  The bandwidth ratio between
five-minute and ten-minute price sampling is 2 to 1, because the Nyquist
frequency is twice as high.  Therefore, if you use five-minute price bars
where ten-minute bars contain all the information you are able to take
advantage of in your personal circumstances, you double the noise power,
without gaining usable signal.  Doubling noise power is very significant,
especially if the signal is barely stronger than the noise at the narrower
bandwidth.  Doubling the noise power is the same as halfing the signal
power, from a signal recovery standpoint, because it is the signal to noise
ratio that is important.

Of course, the:

  H = Log(Nsa2fbT) = kTfb log(1+S/N)

equation above shows more than the effect of noise.  It shows the amount of
recoverable signal information can be increased by any or all of the
following:

1. Increasing the signal bandwidth.  Unfortunately, that is not applicable
to trading, because:

   a. The signal bandwidth is already extremely wide.

   b. There is no way to increase the signal bandwidth, because we would
have to somehow make price changes occur more rapidly.

   c. We can't use the high frequency portion of the spectrum that currently
exists, because we can't react fast enough, so though increasing the signal
bandwidth would give us more signal, it would be signal we couldn't use.

2. Increase the signal strength.  The primary signal available to traders is
the predictive component of price changes.  There is nothing we can do to
increase the predictive signal information in price waveshapes.  It is fixed
by cyclic processes that generate the waveshapes.  However, we can search
for inputs other than price that have stronger signal amplitudes.  (Let me
know if you find any!  Contrary to popular belief, they are extremely
difficult to find.)

3. Decrease the noise power.  We already have discussed the critical
importance of eliminating inputs that are only noise, but that isn't the
only method of decreasing noise.

I began this lesson by discussing the importance of using an optimum data
sampling rate.  Periodic data sampling is a simple and effective way to
filter out high-frequency noise.  Most traders employ it, because they
analyze price bars accumulated over a time interval rather than using raw
tick data, but few understand the technical considerations or know why it
improves trading results.

In a "nut shell," price bars filter noise.  The longer the time interval of
the bars, the more noise they filter, but also the more signal they filter.
The objective is to choose a bar time interval that removes as much noise as
possible without removing much signal information of value to trade
durations a trader is able to take advantage of.

However, that is not the only simple thing that can be done.  There is an
equal amount of price waveshape noise in the time and price dimensions, but
time interval bars filter noise in only one dimension.  An equal amount of
additional noise reduction is possible by filtering in both dimensions.
That can be accomplished by using both time and price interval sampling or
by using fuzzy logic in both time and price dimensions.

The advantage is easy to demonstrate by comparing average end-results of
genetic trading system evolution processes or neural network system training
where input information is sampled in only one and in both dimensions.  The
two-dimension interval sampling advantage comes directly from noise
reduction.  Why filter only half the noise that can be easily eliminated
when noise is so detrimental to trading results?

4. Increase the signal to noise ratio.  This only can be done by increasing
the signal or decreasing the noise, both of which have been discussed
separately above.

That is it.  That is all we have to choose from.  As you can see, noise
reduction is clearly the easiest way to increase recoverable signal.
Pollute the little available signal with any of the readily available noise
sources most traders consider trading indicators and you will find it
impossible to compensate for the degradation of signal to noise ratio by any
means.

Of course, it is easy to demonstrate that automatic trading systems based on
popular indicators make money in back-tests over short time intervals.  That
means nothing.  It is easy to select rules and adjust parameters to make any
indicator seem to work for short periods.  That can be done even using
strings of random numbers as trading indicators.  Try enough combinations of
rules and parameters and you can make anything that changes work over any
specified past period.  Systems like that are widely available at prices
ranging from free to a few thousands dollars.  However, they are gambling
systems, not professional trading systems, because trading decisions are
based on noise and noise is randomly related to future price change.

Nothing can be done to increase the predictive signal level in a price
waveshape, because to do so, it would be necessary to change the price
waveshape.  The only way to improve the signal to noise ratio is to reduce
the noise.  The good news is most traders base trading decisions almost
entirely on noise, so there is lots of potential for improvement.

If you want to make money trading, the number one rule is REDUCE THE NOISE.
The number two rule is reduce the amount of input information, because
analysis difficulty tends to increase factorially with the amount of input
information. (However, that is a different subject than we are currently
discussing.)  Anything that doesn't correlate with future price change is
noise.  If the noise level exceeds the signal level, it generally is
impossible to "instantly detect" the signal.  If you can't instantly detect
a predictive signal, you can't make money trading over a large number of
trades, except by chance.

The concept of instant detection is important.  Many trading techniques
fail, because they work well only after the fact.  It often is possible to
see Elliott Waves and other well-known price patterns after it is too late
to take advantage of them.  We don't need fancy analysis methods to see what
we should have done.  We can see that simply by looking at price charts or
our trading account statements.  What we need are methods of instant signal
detection, so we can know what to do in real time.  All but the most exotic
methods of instant detection require the signal to be at least as strong or
stronger than the noise.  If you can't find much signal, you hadn't better
have much noise.

If something doesn't correlate with future changes, don't let it anywhere
near your trade decision making process.  If you have nothing left after
eliminating everything that doesn't correlate with future changes, then,
unless you simply want to gamble, don't trade until you find something that
does.

Even though instant detection generally becomes impossible where the noise
level exceeds the signal level, there are highly effective methods of
detecting signals well below a noise level after it is too late to use the
information in real-time trading.  Most involve integration.

Imagine we send a space vehicle to a planet orbiting some distant star.  It
lands and robots erect an enormous antenna to send a television picture
(signal) back to Earth.  Even with the large antenna the received image is
weaker than the noise (snow) level.

Imagine we take a time exposure of the television screen with a film camera.
 Each frame of the television display will have granules of noise (snow) in
different positions, so noise granules at any point on the screen will come
and go at random.  The noise granules at all points therefore will average
to gray when integrated over the duration of our time exposure photograph.

Though the signal may be weaker than the noise level, so the image cannot be
seen instantly at all, it may be seen when we develop the time exposed film,
because signal components will have been the same each frame if the
transmitted picture was stationary.  Black portions will have been slightly
darker each television frame.  White portions will have been slightly
lighter each frame.  The desired image therefore will have reinforced and
become stronger on the film from frame-to-frame, whereas noise components
being different each frame will have averaged to gray.

Numerical integration provides a powerful way to do the same thing where
numeric data stream signals are buried in noise.  Integration doesn't
provide a means of instant signal detection, because integration must occur
over time, but it does provide a way to let us learn the characteristics of
a signal buried below noise, so at least we know what we should be looking
for.  Trading without knowledge of the characteristics of a price predictive
signal is like hunting tigers without knowledge of the characteristics of
tigers.  Either way, we may be eaten alive!

Numerical integration is a great research tool, but it won't tell us whether
to buy or sell in real time.  That will be possible only if the noise level
of the information analyzed is lower than the signal level.  Nothing can be
done to increase the signal level, but most traders could greatly reduce the
noise level by discarding almost everything they currently use.

Should a mechanic consider the color of your car in deciding whether your
spark plugs need replacement?  Should tire condition, head light condition,
break condition, the blood alcohol level of the driver, and all sorts of
other things with no demonstrable correlation to spark plug condition be
thrown into spark plug condition determination?  Even if some included
information correlates, if much irrelevant information is mixed in, the
likelihood of correct analysis will be poor.

So, if we are convinced noise degrades analysis, we can eliminate market
indicators that don't correlate to future price changes.  We can eliminate
input information that changes too fast for us to take advantage of.  Is
there any other way to reduce noise?

Fortunately, there is.  We can eliminate changes of all other kinds we can't
or don't want to trade.  We also can eliminate price changes that don't
correlate with the future.  Haven't I just said that repeatedly?  Not
exactly.  I have been referring mostly to popular trading indicators that
don't correlate with future price changes, "fundamental" market information
that doesn't correlate with future price changes over a trading interval of
interest, and other noise inputs of all types other than price.  I am
referring here to the non-predictive components of price changes.

It is possible to demonstrate that specific price changes reliably predict
future changes, but all price changes do not have equal predictive value.
Some have no predictive value whatsoever.  Those changes are noise.  They
should not be included in trade analysis any more than should
non-correlating "fundamental" information or trading indicators that don't
correlate.

It is the elimination of information of all kinds that we can't or don't
want to use that is the essence of filtering.  That is what filters are used
for.  It is impossible to profit over a large number of trades made off a
trading floor without filtering, except by chance.  If trading is done off a
trading floor without price waveshape filtering, the noise will exceed the
strength of all signals that correlate with practical trade durations,
making it impossible to instantly detect a usable trade signal.

I have focused again and again on the adverse effects of noise, because
noise reduction is the easiest way most traders could improve their results.
 Even though tremendous benefit can be derived from it, trying to talk most
traders out of popular trading indicators they believe in is like trying to
talk someone out of their religion.  It doesn't matter that they can't
demonstrate correlation.  They believe anyway, and that is that.  Of course,
that is good for the rest of us, because if some didn't lose there would be
nothing to win.

As important as noise reduction is, it is only part of trading problem
solution.  A low noise level only makes it possible to recover a signal.  It
doesn't recover it, because it is never possible to remove all the noise.

There are two aspects to recovery.  It isn't possible to see signal in the
remaining noise, either with your eyes or a detection algorithm, unless you
know what a signal looks like.  It also is necessary to know how to
interpret the indications of a signal once it can be seen.  (Asking others
to be quiet may make it possible to hear someone speaking Greek on the other
end of a noisy phone circuit, but if you don't understand Greek, you still
won't be able to recover intelligence from the signal you can hear.)

Everyone can't make money in a game where those with superior knowledge take
it from the others.  It is ridiculous to think those with that knowledge
will provide it to the people they are taking money from.  Because of that,
and because they have almost priceless value, it generally is impossible to
buy trading signal specifications.  Even so, I already gave SciLink members
precise specifications for one signal.  More about that later.

Though signal specifications generally cannot be purchased, they can be
determined by intelligent people with enough hard work.  There is no reason
for anyone to go through the agony, however, unless they have the willpower
to eradicate commonly used noise inputs, because it will do them no good.
Traders who are unable to psychologically uncouple from superstitious
reliance upon popular indicators that have no demonstrable correlation to
future price changes need read no further, because they never will trade
profitably over a large number of trades, except by chance.  They will be
able to design all sorts of trading systems that will work in back-testing,
but those systems will not continue to work into the future, except by
chance.

There are two ways to find signals.  They can be found with stochastic
processes, like genetic evolution and they can be found by deducing
deterministic methods.  I used a deterministic method to find specifications
for the signal rpbTinyNN detects.  That is only one of numerous useful
signals that can be used.  It is a signal I had never used or even tried to
detect before writing the neuron function.  Even so, I was able to predict
the signal would be there and I was able calculate its exact parameters in
minutes, because I used a deterministic method that is very efficient.

The parameters for that signal are very critical.  Try adjusting any of the
weights in rpbTinyNN and you will see what I mean.  They are critical
because the signal is only slightly stronger than the noise.  There will be
more noise than signal in the output unless the signal detector (the neuron)
is tuned almost exactly to the precise signal shape.

Blackboard 10 has a chart that shows exactly what that signal looks like.
As you can see, there are two forms that are the exact inverse of each
other.  Neither predicts whether prices are more likely to rise or fall.
The theoretical probability of a price rise or fall after either is exactly
the same.  However, if previous daily closing prices have changed more like
the shape marked bullish than the shape marked bearish and prices rise, they
will rise on average 1.43 times further than they will fall if they fall.
The same is true in reverse if closing prices have changed more like the
bearish pattern.  That advantage is fixed by sine wave cycles that sum to
form the price waveshapes that follow each signal.

I was able to predict the exact shape of that signal and its inverse, the
shapes of the various waveshapes that would follow, and the exact
probabilities of price change ratios afterward without any empirical
testing.  I did that by summing several small amplitude sine wave price
cycles that have periods ranging from slightly more than two days to
slightly less than eighteen days.  If those sine wave cycles didn't exist,
that signal and its inverse wouldn't work.

  -Bob Brickey
   Scientific Approaches
   sci@xxxxxxxxxx