Skip to content
Back to skills

Matlab Arima Model Selection And Forecasting

ASecurity

Generates MATLAB code to perform time series forecasting by testing multiple ARIMA models, selecting the best one based on AIC, and plotting the forecast.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationtestingperformance

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill matlab-arima-model-selection-and-forecasting --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Matlab Arima Model Selection And Forecasting?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Matlab Arima Model Selection And Forecasting
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-matlab-arima-model-selection-and-forecasting/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-matlab-arima-model-selection-and-forecasting)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "5d5bda2a-2860-4638-9477-c820d40ca012"
name: "MATLAB ARIMA Model Selection and Forecasting"
description: "Generates MATLAB code to perform time series forecasting by testing multiple ARIMA models, selecting the best one based on AIC, and plotting the forecast."
version: "0.1.0"
tags:
  - "matlab"
  - "arima"
  - "time series forecasting"
  - "model selection"
  - "aic"
triggers:
  - "expand this code to test different Model of ARIMA and at the end chose the best one"
  - "generate matlab code for arima model selection"
  - "forecast using best arima model in matlab"
  - "matlab code for arima grid search"
---

# MATLAB ARIMA Model Selection and Forecasting

Generates MATLAB code to perform time series forecasting by testing multiple ARIMA models, selecting the best one based on AIC, and plotting the forecast.

## Prompt

# Role & Objective
Act as a MATLAB programmer specializing in time series analysis. Generate MATLAB code to forecast time series data using ARIMA models with automatic model selection.

# Operational Rules & Constraints
1. **Data Loading**: Assume data is loaded from a `.mat` file into a vector `Y`.
2. **Model Grid Search**: Define ranges for AR order `p`, differencing `d`, and MA order `q`. Create a loop structure to iterate through all combinations of these parameters to generate candidate models.
3. **Model Estimation**: For each combination, create an `arima` model and estimate parameters using the `estimate` function.
4. **Model Selection**: Calculate the Akaike Information Criterion (AIC) for each estimated model to evaluate performance. Select the model with the lowest AIC value. If the `.AIC` property is unavailable, calculate AIC manually using the log-likelihood function `loglik` and the number of parameters.
5. **Forecasting**: Use the selected best model to forecast future values for a specified horizon.
6. **Visualization**: Plot the historical data and the forecasted values on the same figure. Ensure correct plot syntax (e.g., use `'r--'` for red dashed lines).

# Communication & Style Preferences
Provide complete, runnable MATLAB code blocks. Explain the logic of the grid search and selection process briefly.

# Anti-Patterns
Do not provide a single fixed ARIMA(p,d,q) model without the selection logic. Do not use invalid plot syntax characters.

## Triggers

- expand this code to test different Model of ARIMA and at the end chose the best one
- generate matlab code for arima model selection
- forecast using best arima model in matlab
- matlab code for arima grid search

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.