NxTrend - Deterministic trend in a time series

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


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

is the univariate time series data (a one-dimensional array of cells (e.g., rows or columns)).
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).
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.
is the polynomial order. This is only relevant for a polynomial type of trend and is ignored for all others. If missing, POrder = 1.
is the constant or the intercept value to fix (e.g., zero). If missing, an intercept will not be fixed and is computed normally.
is the forecast time/horizon beyond the end of X. If missing, a default value of 0 (latest or end of X) is assumed.
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.
is the statistical significance or confidence level (i.e., alpha). If missing or omitted, an alpha value of 5% is assumed.


  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



Article is closed for comments.

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