Guys, here is some background on Kalman filter:

There are many flavors of Kalman filter. I think a plain vanilla
implementation of scalar Kalman will be a big imporovement over
Exponential Moving Average (EMA). Kalman filter has a lot of
similarities with EMA and can be used in a similar way but it has one
important advantage, - it adapts to changing conditions. In EMA the
averaging coefficient is constant and, therefore, contribution of the
new information to the average is constant.

,In Kalman filter the averaging coefficient it is variable and
adaptive. Kalman, at each prediction step, evaluates the value of new
received information and reduces the averaging coefficient, (or its
equivalent) to give more weight to such information if it is valuable.
Alternatively, it increases the averaging coefficient and reduces the
contribution of the new information if the new information is mostly
noise.

Because it is such a useful tool, Kalman filter has been used
extensively anywhere where signal has to be extracted from noise.
Every FM radio uses some version of it hard coded into the circuitry.
Vector kalman filters can deal with multiple time-series
simultaneously. Scalar kalman filters deal with only one time series,
like the EMA.

To give a better intutitive feel, here is a simple modifcation of EMA,
which, while not Kalman, has some of the kalman-like adaptability:


Here EMA is the moving average, P(t) is the new data point and K is
the averaging constant:     EMA(t) = EMA(t-1) + K*[P(t) - EMA(t-1)]
If we define average error of the prediction
as:
E = Average(  [P(t) - EMA(t-1)]^2 )
and volatility of the predictor
as:
EP = Average ( [EMA(t) - EMA(t-1)]^2 )
Then adaptive K can be re-computed for each step t
as:                                                          K = E /
(EP + E)
E and EP are also re-computed at each step.

Following Kalman terminology, values of EMA(t), E, EP and K together
define the "state" of the filter at step t. However, a true Kalman
filter would forecast those in a much more sophisticated way.












On Oct 21, 4:38 pm, John-Crichton McCutcheon
<[email protected]> wrote:
> I'm still trying to understand exactly how it works and I'm trying to
> dust up a bit
> on probability/stat,linear algebra, etc.
>
>  From a high level, I know It works by making predictions ( state of
> system)  and comparing predicted result to actual  result and
> then learning from that.  So its a self-optimizing system.  So what are
> we to predict ?  The book ?  Makes no sense.
> Price ?  If that worked, we'd all be rich.   I'm not sure how the "state
> of  the system" maps to JBT.  It could be a vector of values that tells
> us how much
> money we would have gained by buying or selling , what the book
> indicator is , and what the hold time is for the position.  But I'm not
> confident yet.
>
> On 10/21/2010 5:13 PM, new_trader wrote:
>
>
>
> >> I'm not convinced its a big task because we can treat is as a black box
> >> and use some of the 3rd party implementations.   I think it boils down to
> >> figuring out how to apply it to JBT.  For example, what is to be
> >> estimated by
> >> the filter ?  Perhaps the price reactivity to book indicators ?   If so,
> >> the we
> >> need an indicator for "price reactivity to book indicator."
> > sounds interesting - can you elaborate a bit more on this?
> > which ready-to-go implementation(s) would you favor/recommend?
> > what data from JBT - either native balance or price or preprocessed
> > and/or smoothed by some indicators - would we feed into such an
> > implementation?- Hide quoted text -
>
> - Show quoted text -

-- 
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.

Reply via email to