Dear Astor,
thanks for clarifying. So, the paper actually doesn't use the
difference of two EMAs, so does not correspond to the discussion
above.
So, let me clarify also the deeper problem with the paper, I was
hinting to (but not describing clearly) above.
Equation 3 uses actually equation 1 and 2. In both we have a
parameter alpha. The way it is written, it seems that in both
equations alpha
is the same.
However, throughout the paper and in particular in the examples it
does not explain which value of alpha was used - and how this value
was derived.
As we can expect that the results in table 2 dependent critically on
the specific value this reduces the value of the argument.
.. and to loop back to the original question whether the difference
between two EMAs correspond to the first derivative:
my point was not
- that one can work well with such an indicator (sure, one can, given
appropriate values for the smoothing - at least that is what I got in
all test runs)
- that it is a very popular and commonly used indicator (sure, it is)
- that similar approaches like exponential smoothing of a single value
(e.g. like the one in the paper by LaViola) are a good approximation
for
the first derivative (actually, for LaViolas approach I see this,
so one can debate about the details, but it certainly converges to the
first
derivative for arbitrary small tau in 5 and alpha -> 1 (at least
it looks like, I did not do the full analysis).
My point was simply: why using a difference between two EMAs as
approximation.
Actually, I think, it will only approximate for the slow one towards
infinity and the fast one towards zero..
But this is exactly what is not used - and it is also not what gives
the best results in practice..
Thus, I am wondering whether there is an explanation why the
intermediate values (between 0 and infinity) sometimes give rather
results, i.e., in an area where the behavior of the resulting function
sometimes differs significantly from EMA.
Cheers
Klaus
On May 21, 4:30 pm, Astor <[email protected]> wrote:
> The paper that I had attached, LaViola's Double Exponenital smoothing, uses
> double exponential to estimate a local linear regression. The "slope"
> coefficient of a linear regression is a first derivative of time series with
> a random gaussian noise. In LaViola's paper that slope is given by Equation
> 3: b1(t). It is defined as the difference between a fast(er) and a slow(er)
> exponential moving averages.
>
> From: Klaus <[email protected]>
> To: JBookTrader <[email protected]>
> Sent: Saturday, May 21, 2011 1:39 AM
> Subject: [JBookTrader] Re: Book trading discussion
>
> Dear Astor,
>
> thanks for answering. I needed a bit of time, to have a closer look.
> Here is my answer.
> Regarding
>
> > firstDerivative = velocity = priceChange / timeChange = (EMA(5) - EMA(60))
> > / (1 hr) = (110 - 100) / (1 hr) = 10.
>
> yes. This makes sense. However, the firstderivative has an unclear
> relation (depending on 5 and 60) to the
> "true" first derivative of the "real" time series. - This is exactly
> the point puzzling me, here.
> Thanks also for the paper. I read it. It looks very convincing at
> first sight, but then I could not answer the following
> question based on it. How did the author determine the two parameters
> in the double exponential for his values.
> His claims are:
> - it is faster; no problems here
> - it is nearly as accurate?
> might be, for some parameters. But this is exactly the optimization
> problem: it might be possible to find
> optimized values that yield the results, but it would be invalid to
> simply assume the result would also work
> on data that did not participate in the optimization.
> Unfortunately, the author does not say anything about this.
>
> Additionally, even the author does not claim that he would approximate
> the first derivative..
>
> Cheers
> Klaus
>
> On May 11, 11:33 pm, Astor <[email protected]> wrote:
>
>
>
>
>
>
>
>
>
> > If you are looking for a bit of mathematical theory on this type of
> > methodology, take a look at the attached pdf.
> > From: nonlinear <[email protected]>
> > To: [email protected]
> > Sent: Wednesday, May 11, 2011 4:08 PM
> > Subject: [JBookTrader] Re: Book trading discussion
>
> > On Wednesday, May 11, 2011 1:05:41 PM UTC-4, Klaus wrote:
>
> > now I am puzzled. Why would you do this?
>
> > >The first derivative is the change rate. Ok, I would understand one
> > >does want to do some
> > >smoothing. But the difference between short and longterm EMA certainly
> > >isn't the first derivative.
> > >It does not seem to be a very good approximation, either.
>
> > >I can see this is a somewhat bizarre change rate indicator, though.
> > >And it might have some merits, if it just works..
>
> > Well, I disagree that it a "bizarre" indicator. Consider MACD, a well
> > researched and very popular indicator. The MACD signal line is defined as
> > the difference between the shorter and longer term EMAs, which is precisely
> > what the PriceVelocity indicator in JBT does. The BalanceVelocity indicator
> > in JBT also uses the same concept, applied to book balances. The Tension
> > indicator in JBT is the difference between BalanceVelocity and
> > PriceVelocity.
>
> > In regards to whether the difference between the shorter and longer term
> > EMAs is a good approximation of velocity (i.e. the first derivative of a
> > given quantity with respect to time) is debatable. If you can think of
> > better ways of calculating the first derivative from a notoriously noisy
> > time series, please let me know, and we can certainly experiment with it.
> > However, intuitively, it makes sense to me the way it is right now. Think
> > of it this way: if the average price over the last 5-minute interval was
> > 110 and the average price over the last 60-minute interval was 100, then
> > the first derivative is:
>
> > firstDerivative = velocity = priceChange / timeChange = (EMA(5) - EMA(60))
> > / (1 hr) = (110 - 100) / (1 hr) = 10.
> > Does this make sense?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "JBookTrader" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group
> > athttp://groups.google.com/group/jbooktrader?hl=en.
>
> > double exponential regression.pdf
> > 49KViewDownload
>
> --
> You received this message because you are subscribed to the Google Groups
> "JBookTrader" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group
> athttp://groups.google.com/group/jbooktrader?hl=en.
--
You received this message because you are subscribed to the Google Groups
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jbooktrader?hl=en.