Close Navigation
Augmented Dynamic Adaptive Model (ADAM) for Daily Seasonal Data

Augmented Dynamic Adaptive Model (ADAM) for Daily Seasonal Data

Posted May 20, 2026 at 11:43 am

Selcuk Disci
DataGeeek

The article “Augmented Dynamic Adaptive Model (ADAM) for Daily Seasonal Data” was originally published on DataGeeek blog.

I have modeled the BIST 100 index to build predictive intervals. Because the data has daily seasonality, I preferred the modeltime::adam_reg function.

I did not use the timetk::step_timeseries_signature function because the model cannot process too many exterior regressors, and the algorithm captures the trend and seasonality well by nature. So I did not preprocess the data to keep it simple.

library(tidyverse)
library(tidyquant)
library(tidymodels)
library(timetk)
library(modeltime)
 
#BIST 100
df_bist <- 
  tq_get("XU100.IS") %>% 
  select(date, close)
 
 
#Splitting the Data 
splits <- 
  time_series_split(
    df_bist,
    assess     = "1 month",
    cumulative = TRUE
  )
 
df_train <- training(splits)
df_test <- testing(splits)
 
 
#Seasonality Diagnostic
arima_reg() %>% 
  set_engine("auto_arima") %>% 
  fit(close ~ date, df_train)
 
 
#Model
mod_adam <- 
  adam_reg() %>% 
  set_engine("auto_adam")
 
#Fitting
mod_fit <- 
  mod_adam %>% 
  fit(formula = close ~ date, data = df_train)
 
#Calibrate the model to the testing set
calibration_tbl <- 
  mod_fit %>%
  modeltime_calibrate(new_data = df_test)
 
 
#Accuracy of the finalized model
calibration_tbl %>%
  modeltime_accuracy(metric_set = metric_set(rmse, rsq, mape))
 
 
 
#Prediction Intervals
calibration_tbl %>% 
  modeltime_forecast(new_data = df_test, 
                     actual_data = df_test) %>%
  plot_modeltime_forecast(.interactive = FALSE,
                          .legend_show = FALSE,
                          .line_size = 1.5,
                          .color_lab = "",
                          .title = "BIST 100") +
  labs(subtitle = "<span style = 'color:dimgrey;'>Predictive Intervals</span> of the <span style = 'color:red;'>Augmented Dynamic Adaptive Model</span>") + 
  scale_y_continuous(labels = scales::label_currency(prefix = "₺", 
                                                     suffix = "")) +
  scale_x_date(labels = scales::label_date("%b %d"),
               date_breaks = "4 days") +
  theme_minimal(base_family = "Roboto Slab", base_size = 16) +
  theme(plot.subtitle = ggtext::element_markdown(face = "bold", size = 14),
        plot.title = element_text(face = "bold"),
        plot.background = element_rect(fill = "azure", color = "azure"),
        panel.background = element_rect(fill = "snow", color = "snow"),
        axis.text = element_text(face = "bold"),
        axis.text.x = element_text(angle = 45, 
                                   hjust = 1, 
                                   vjust = 1),
        legend.position = "none")
Augmented Dynamic Adaptive Model

Source: Yahoo Finance

Join The Conversation

For specific platform feedback and suggestions, please submit it directly to our team using these instructions.

If you have an account-specific question or concern, please reach out to Client Services.

We encourage you to look through our FAQs before posting. Your question may already be covered!

Leave a Reply

Disclosure: Interactive Brokers Third Party

Information posted on IBKR Campus that is provided by third-parties does NOT constitute a recommendation that you should contract for the services of that third party. Third-party participants who contribute to IBKR Campus are independent of Interactive Brokers and Interactive Brokers does not make any representations or warranties concerning the services offered, their past or future performance, or the accuracy of the information provided by the third party. Past performance is no guarantee of future results.

This material is from DataGeeek and is being posted with its permission. The views expressed in this material are solely those of the author and/or DataGeeek and Interactive Brokers is not endorsing or recommending any investment or trading discussed in the material. This material is not and should not be construed as an offer to buy or sell any security. It should not be construed as research or investment advice or a recommendation to buy, sell or hold any security or commodity. This material does not and is not intended to take into account the particular financial conditions, investment objectives or requirements of individual customers. Before acting on this material, you should consider whether it is suitable for your particular circumstances and, as necessary, seek professional advice.

Disclosure: API Examples Discussed

Please keep in mind that the examples discussed in this material are purely for technical demonstration purposes, and do not constitute trading advice. Also, it is important to remember that placing trades in a paper account is recommended before any live trading.

IBKR Campus Newsletters

This website uses cookies to collect usage information in order to offer a better browsing experience. By browsing this site or by clicking on the "ACCEPT COOKIES" button you accept our Cookie Policy.