Econometrics: State-space model forecasting - page 3

 

EconModel ,

try opening a trade in the direction of the forecast.

Open and hold until the change to the opposite signal. At a horizontal segment (forecast) do not touch the trade.

After a horizontal segment, if the signal is to the same side you can refill.

If in the other direction, then rollover

something like this ...

 
Stells:

EconModel ,

try to open a trade in the direction of the forecast.

Open and hold until the change to the opposite signal. At a horizontal segment (forecast) do not touch the trade.

After a horizontal segment, if the signal is to the same side you can refill.

If in the other direction, then rollover

like this ...

In my reply to Math's post I came up with the idea of an error. If you develop this thought.

What counts as a prediction. I have a forecast "point", i.e. a specific value and it is accompanied by the value of the forecast error. How about "point forecast - minus forecast error > last value" for a forecast (for a long)?

 
EconModel:

In my response to Maths' post, I came up with a thought about the error. If you expand on that thought.

What counts as a prediction. I have a "point" forecast, i.e. a specific value and it is accompanied by the value of the forecast error. How about "point forecast - minus forecast error > last value" for a forecast (for a long)?

Kindergarten, man. You have no idea what kind of bullshit you're talking at the slightest approximation to practical trading... or even a tester...

Do you even want real profits? How are you different from a tester who trades mullions by crossing a pair of averages? Sitting on a "more professorial" bench?

I should smack your parents in the head with that bench....

 
MetaDriver:

You're such a child's plaything, man. You have no idea what kind of bullshit you're talking at the slightest approach to practical trading... or even a tester...

Do you even want real profits? How are you different from a tester who trades mullions by crossing a pair of averages? Sitting on a "more professorial" bench?

I should smack your parents in the head with that bench....


As a more experienced person than me, you could have spoken strictly on the merits of the topic rather than talking rubbish.
 
EconModel:

Should the truth be in the tester?

Under R I could try something, but the advisor would have to take time out.


Do a simple backtest like this:

# параметры
threshold <- 0.001 # минимально интересное отклонение цены от прогноза
fees <- 0.0005 # комиссионные+спред+проскальзывание в пунктах

# два вектора одинаковой длины (реальные цены и предсказанные цены)
px.real <- ...
px.pred <- ...

n <- length(px.real)

get.p <- function (n, s.o, s.c) {
  p <- rep(NA, n)
  p[s.o] <- 1
  p[s.c] <- 0
  p <- na.locf(p, na.rm = F)
  p[is.na(p)] <- 0
  p
}

# сигналы
s.o.l <- ((px.real + threshold) < px.pred)
s.c.l <- (px.real > px.pred)
s.o.s <- ((px.pred - threshold) > px.pred)
s.c.s <- (px.real < px.pred)

# позиция
p.l <- get.p(n, s.o.l, s.c.l)
p.s <- get.p(n, s.o.s, s.c.s)
p.t <- p.l - p.s
p.t.d <- c(0, diff(p.t))

# издержки, накопленная прибыль
f <- fees * abs(p.t.d)
eqty <- px.real * p.t - cumsum(px.real * p.t.d + f)

plot(eqty, t = 'l')

Don't forget to set realistic transaction costs :)

Strongly doubt the suitability of your prediction for trading.

 
anonymous:


Do a simple backtest like this:

Don't forget to set realistic transaction costs :)

Strongly doubt the suitability of your forecast for trading.

Thanks, I'm starting to pound the keyboard.

By the way, why the doubts?

 
EconModel:
As a more experienced person than me, you could express yourself strictly on the essence of the topic, instead of talking rubbish.

Okay, fine. Just got emotional, sorry.
EconModel:

In my response to Maths' post, I came up with a thought about the error. If you expand on that thought.

What counts as a prediction. I have a "point" forecast, i.e. a specific value and it is accompanied by the value of the forecast error. How about "point forecast - minus forecast error > last value" as a forecast (for a long)?

Tell me, why should the forecast error be deducted from the profit? After all, it will be deducted from there, according to this scheme, where else. The error in the forecast can be both negative and positive, no?

If it has any real value (this cleverly-calculated error of yours), then it should obviously be in multiplicative relationship with prediction of transaction direction, and not additive.

I do not want to give you the right answer, I hope you will think it over.

 
EconModel:

By the way, why the hesitation?

The deviations of the real price from the predicted one are too small.
 
MetaDriver:
Okay, fine. I'm just emotional, I'm sorry.

Tell me, why on earth would a prediction error be deducted from the profit? Because that's where it will be deducted from, in that scheme, where else would it be deducted from? Forecasting error may be both negative and positive, no?

If it has any real value (this cleverly-calculated error of yours), then it should obviously be in multiplicative relationship with prediction of transaction direction, and not additive.

I do not want to give you the right answer, I hope you will think it over.

Hold on, I'll do the anonymus count and see if it clears up.
 
anonymous:
Too small deviations of real price from predicted price.

Up to 20 pips. You have to compare, I think, with the length of the bar. Mda.... On H1 price change over 20 pips....

Ok. I'll take a time out for now.

Reason: