I am not sure how entry and exit points are set now in JBookTrader. However, it could be ideal, if entry / exit points are available as time series.
________________________________ From: John-Crichton McCutcheon <[email protected]> To: [email protected] Sent: Fri, October 22, 2010 3:36:46 PM Subject: Re: [JBookTrader] Re: Status of Kalman filter? Yeah, is Kalman ideal for optimizing entry, exit points ? On 10/22/2010 2:32 PM, Astor wrote: Kalman will take as an input whatever time-series you give it and will provide as an output a smoothed out version of that time series, with smoothing being optimal in a statistical sense. It can even extrapolate those time-series forward, though I always have less faith in extrapolation than interpolation. It can also provide an estimate of the variance of the prediction, which may be useful for setting entry/exit values for some strategies. > >Use of Kalman for smoothing out price or indicator time series is straight >forward and obvious, - just a much more powerful version of EMA. I am less >clear >how to use it at the Strategy level for entry/exit optimization? > >Are you proposing taking historical entry and exit time series and apply >Kalman >to smooth out the fluctuations due to noise and then forecast the optimum >value >one step forward? > > ________________________________ From: John-Crichton McCutcheon <[email protected]> >To: [email protected] >Sent: Fri, October 22, 2010 9:55:14 AM >Subject: Re: [JBookTrader] Re: Status of Kalman filter? > >This is more directed at Eugene's previous message. But I'm replying to >Michaels email for context. > >Not to say that applying the Kalman filter for the purpose of getting >smoother ( or truer) >values for a time series is not a good idea, because it is, but I >thought it to be even more than >that. Currently, we use the optimizer in JBT to find the 'averaging >coefficients' >which are most profitable and ( least risky, most consistent, etc. ) >then we hard code those >coefficients into the Strategy. So those coefficients are optimized >based upon their influence on >profitability not smoothness. Can we apply Kalman to adapt the >'averaging coefficients' in JBT >towards values that are more profitable rather than necessarily for >smoothing? Perhaps we can do >both: >1) Use Kalman at the Indicator level to smooth out indicators. >2) Use Kalman at the Strategy level to adapt entry - exit parameters >to current conditions. > >? > > > > > > > >On 10/21/2010 8:14 PM, Alexana wrote: >> 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. > > >-- >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. > -- 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. -- 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.
