Icon

6680012_​Kbank

Data Cleaning and Preparation

  1. Missing Value : used to find the missing value of price by using Linear Interpolation Linear interpolation is appropriate since gaps stem from market holidays with valid price data before/after.

  2. Column Filter : to ensure that the raw data maintained the information that can used with this model

  3. Using the Lag column and calculate with the math formula to find the log_return of KBANK stock. Log return is preferred over raw price changes because it stabilizes variance across the price range and is time-additive, both important for ARIMA and exponential smoothing assumptions.

Exploratory Data Visualization

Line plot of Stock price (Raw data) and Return of stock (transformed data).

Overall, the stock price value is around 150HB to 200 THB

In 8/04/25, it showed the outlier value of return of stock price.

Decomposition of Moving Average

Decomposed the Log_return series into Trend, Seasonal, and Residual components using an additive decomposition approach:

Trend extracted via 5-day Backward Simple Moving Average on Log_return.

Detrended series computed as (Log_return - MA(Log_return)). 3. Seasonal index computed by grouping the detrended series by weekly cycle position (CyclePosition = ROWINDEX % 5) and taking the mean per position via GroupBy, then joined back to the full 242-row series (Joiner).

Residual computed as Log_return - MA(Log_return) - Seasonal.

Holt's Double Exponential Smoothing no Parameter

Using the Java Snippet to determine the weights to confirm the recursion prior to implementing parameter by using beta =0.01 alpha=0.1

lpha=0.1, beta=0.01. Alpha=0.1, beta=0.01 are conventional conservative defaults (heavy smoothing, slow-changing trend) — illustrative starting values, not data-optimized. With beta=0.01, Trend stayed near-flat throughout, since the model barely updates its trend estimate. This was superseded by the RMSE-optimized version (beta≈0.99), showing that default parameters don't suit KBANK's near-random-walk volatility

Holt's Double Exponential Smoothing with Parameter

Used a Parameter Optimization Loop to find the alpha/beta combination that minimizes RMSE, evaluated via Numeric Scorer.

Best parameters extracted and used to re-run the Java Snippet on the full series.

Trend=Additive, Seasonal=None. Search range: alpha, beta ∈ [0.01, 0.99]. Optimal: alpha=0.91, beta=0.901. In-sample fit: R²=0.951, Adjusted R²=0.950, MSE=2.61E-4, MAE=0.0116.

A wide search range was used so the RMSE-optimal weights would not be artificially constrained by a narrow default range.

Arima Model

Table Partitioner used with the Parameter Optimization Loop to find for the ARIMA order testing p from 1 to 5 and ARIMA Leaner would provide the best p, d ,q used to train a final the test period.
Loop searched p ∈ [0,5] (step 1, integer); d and q set the same way (check the "Best Parameters" tab for the exact winning values). Scored with Numeric Scorer: R²=0.89, RMSE=1.748, MAE=1.233, MAPE=0.7%.

KNIME test a range of combinations and pick whichever actually fits the data best — more objective, less guessing.

Holt's Triple Smoothing

Extended the Double ETS Java Snippet with an additive weekly Seasonal component (period=5) and a third smoothing weight (gamma). Optimal alpha/beta/gamma found via Parameter Optimization Loop minimizing RMSE (Numeric Scorer).

Best parameters extracted (Table Row to Variable) and used to re-run the model on the full series.

Trend=Additive, Seasonal=Additive, period=5. Search range: alpha/beta/gamma ∈ [0.01, 0.99]. Optimal: alpha=0.2, beta=0.008, gamma=0.01. RMSE=0.0093.

Missing Value
Numeric Scorer
Parameter Optimization Loop End
Math Formula
Math Formula
Math Formula
GroupBy
Joiner
Compute linearcorrelation fornumeric columns
Linear Correlation
Math Formula
Seasonal
Line Plot
Java Snippet
Java Snippet
Actual VS Forecast
Line Plot
Seasonality
Line Plot
Java Snippet
Missing Value
Math Formula
Residual
Line Plot
Math Formula
Table Row to Variable
Parameter Optimization Loop End
Numeric Scorer
Table Row to Variable
ARIMA Learner
Price vs Forcast_price
Line Plot
Math Formula
ARIMA Predictor
Price VS Predicted Price
Line Plot
Java Snippet
Parameter Optimization Loop Start
Sorter
Column Filter
Lag Column
Math Formula
Stock Price
Line Plot
Return of Stock
Line Plot
Level
Line Plot
Residuals
Scatter Plot
Trend
Line Plot
Find Log_price
Math Formula
Parameter Optimization Loop Start
Numeric Scorer
Trend
Line Plot
Java Snippet
Forecast
Line Plot
Parameter Optimization Loop End
Level
Line Plot
Actual VS Forecast
Line Plot
Visualize price andmoving average overdate
Line Plot
ARIMA Learner
Missing Value
Parameter Optimization Loop Start
Math Formula
Residuals
Scatter Plot
Compute movingaverage forfinancial priceseries
Moving Average
Table Partitioner
Column Renamer
Table Row to Variable
ARIMA Predictor
Kbank Stock Price 2025, daily
Excel Reader

Nodes

Extensions

  • No modules found

Links