Re: Moving Average Crossover

Home 21090308 Forums Re: Moving Average Crossover


In response to Haksun’s reply:

1) It is not using the weighted average (instead of AR) that causes the complexity of the optimization problem. Fitting AR(p) is still an optimization problem (unconstrained) with (p + 2) parameters except that the objective function is much simpler. If we denote the original process by [tex]{X_t}[/tex], then AR(p) minimizes [tex]sum(X_t – hat{X}_t)^2[/tex]; whereas in our configuration, the objective function is strategy specific and is of a much more complex form [tex]f(X_t, hat{Y}_t, mathcal{F}_{t-})[/tex], where [tex]hat{Y}_t[/tex] is the (fitted) indicator at time t and [tex]mathcal{F}_{s}[/tex] represents the filtration at time s.

2) Fitting an AR model to the original price process wouldn’t help much in generating this kind of indicators, since [tex]{Y_t}[/tex] is different from the original price process [tex]{X_t}[/tex] and [tex]{Y_t}[/tex] itself is not expected to be AR. (We could use ArmaModel.armaMean to generate the indicators though, since [tex]Y_t = sum{a_i X_{t-i}}[/tex].) In fact, if the original price process [tex]{X_t}[/tex] were indeed a stationary AR process, we wouldn’t expect to make much money at all using this strategy. A mean-reverting strategy would probably be much better. Also, for an AR(p2) model, there are actually (p2 + 2) parameters to estimate (including the constant and the variance of error) not just 1.

3) I guess it largely depends on how we are going to use this indicator. Perhaps HMM? Let’s please discuss this in Beijing tomorrow and post some thoughts here a bit later.