NxTrend - Deterministic trend in a time series

Returns values along a trend curve (e.g., linear, quadratic, exponential, etc.) at time T+m.

Syntax

NxTrend(X, Order, Trend_type, POrder, Const, Horizon, Return_type, $\alpha$)

X
is the univariate time series data (a one-dimensional array of cells (e.g., rows or columns)).
Order
is the time order in the data series (i.e., the first data point's corresponding date (earliest date = 1 (default), latest date = 0)).
Order Description
1 Ascending (the first data point corresponds to the earliest date) (default).
0 Descending (the first data point corresponds to the latest date).
Trend_type
is the model description flag for the trend function (1 = Linear (default), 2 = Polynomial, 3 = Exponential, 4 = Logarithmic, 5 = Power).
Order Description
1 Linear (default).
2 Polynomial.
3 Exponential.
4 Logarithmic.
5 Power.
POrder
is the polynomial order. This is only relevant for a polynomial type of trend and is ignored for all others. If missing, POrder = 1.
Const
is the constant or the intercept value to fix (e.g., zero). If missing, an intercept will not be fixed and is computed normally.
Horizon
is the forecast time/horizon beyond the end of X. If missing, a default value of 0 (latest or end of X) is assumed.
Return_type
is a switch to select the return output (1 = Forecast value (default), 2 = Upper limit, 3 = Lower Limit, 4 = R-Squared).
Method Description
1 Forecast value (default).
2 C.I. upper limit.
3 C.I. lower limit.
4 R-Squared.
$\alpha$
is the statistical significance or confidence level (i.e., alpha). If missing or omitted, an alpha value of 5% is assumed.

Remarks

  1. NxTrend supports the following trend functions:
    $$ \begin{cases} \mathrm{Linear} & Y_t=\alpha + \beta \times t \\ \mathrm{Polynomial} & Y_t=\alpha + \beta_1 \times t + \beta_2 \times t^2 + \cdots + \beta_N \times t^N \\ \mathrm{Exponential:} & Y_t= \alpha \times e^{\beta \times t} \\ \mathrm{Logarithm:} & Y_t= \alpha + \beta \times \ln(t) \\ \mathrm{Power:} & Y_t= \alpha \times t^{\beta} \\ \end{cases} $$
  2. For exponential and logarithmic trends, the intercept value is not permitted to be fixed, and thus is ignored.
  3. The Excel trend built-in function (i.e., "TREND") is a different function, not part of NumXL, and should not be confused with NxTrend.
  4. The polynomial order argument must be a positive integer.
  5. The trend function's coefficients that best fit your data are estimated using the "least squares" method.
  6. The time series may include missing values (e.g., #N/A) at either end.

Files Examples

Related Links

References

Comments

Article is closed for comments.

Was this article helpful?
0 out of 0 found this helpful