axe_narch_model {sisireg} | R Documentation |
implementation of the AxE model based on the ssr-MLP
Description
Trains a 2-layer MLP with a given time series of quotes with price changes or volatility as target value. The coordinates (or independent factors) are given through the AxE model)
Usage
axe_narch_model(quotes, T, tgt)
Arguments
quotes |
array with observations. |
T |
period: T = 5, 10 or 20. |
tgt |
target variable: tgt = 'trend' or 'vola'. |
Value
model |
the trained model for prediction. |
Author(s)
Dr. Lars Metzner
References
Dr. Lars Metzner (2021) Adäquates Maschinelles Lernen. Independently Published.
Examples
set.seed(1234)
n <- 250
s <- 13000 + cumsum(rnorm(n))
T = 20
# create model for 5-day trend
model <- axe_narch_model(s, T, 'trend')
# calculate prognosis for trend
s_ <- s[n] + cumsum(rnorm(20))
s_T <- axe_narch_predict(model, s_, 'trend')
# plot the results
plot(seq(1:20), s_, type = "l",
xlim = c(0,21+T), ylim = c(min(s_, s_T)-5, max(s_, s_T)+5))
points(20+T, s_T, col='red', pch = 16)
# create model for 5-day vola
model <- axe_narch_model(s, T, 'vola')
r_T <- axe_narch_predict(model, s_, 'vola')
lines(c(20+T,20+T), c(s_T-r_T, s_T+r_T), col='orange')
[Package sisireg version 1.1.1 Index]