Transformer Forecasting for Financial Returns

transformerreturnsf(
  y,
  h = 10,
  level = 95,
  sequence_size = 20,
  num_heads = 4,
  head_size = 32,
  num_transformer_blocks = 2,
  epochs = 50,
  n_bootstrap = 250,
  show_progress = TRUE,
  seed = 123,
  ...
)

Arguments

y

Univariate time series of returns

h

Forecast horizon

level

Confidence levels for prediction intervals

sequence_size

Lookback period for transformer

...

Additional parameters to TRANSFORMER function

Value

Object of class 'forecast'