# smoothts

Smooth data

`smoothts` is not recommended. Use `smoothdata` instead.

## Syntax

```output = smoothts(input)
output = smoothts(input,'b',wsize)
output = smoothts(input,'g',wsize,stdev)
output = smoothts(input,'e',n)
```

## Arguments

 `input` Financial time series object or a row-oriented matrix. In a row-oriented matrix, each row represents an individual set of observations. `'b'`, `'g'`, or `'e'` Smoothing method (essentially the type of filter used). Can be Exponential (`e`), Gaussian (`g`), or Box (`b`). Default = `b`. `wsize` Window size (scalar). Default = `5`. `stdev` Scalar that represents the standard deviation of the Gaussian window. Default = `0.65`. `n` For Exponential method, specifies window size or exponential factor, depending upon value. `n > 1` (window size) or period length`n < 1` and ```> 0``` (exponential factor: alpha)`n = 1` (either window size or alpha) If `n` is not supplied, the defaults are `wsize = 5` and `alpha = 0.3333`.

## Description

`smoothts` smooths the input data using the specified method.

`output = smoothts(input)` smooths the input data using the default Box method with window size, `wsize`, of `5`.

`output = smoothts(input,'b',wsize)` smooths the input data using the Box (simple, linear) method. `wsize` specifies the width of the box to be used.

`output = smoothts(input,'g',wsize,stdev)` smooths the input data using the Gaussian window method.

`output = smoothts(input,'e',n)` smooths the input data using the Exponential method. `n` can represent the window size (period length) or alpha. If `n > 1`, `n` represents the window size. If `0 < n < 1`, `n` represents alpha, where

`$\alpha =\frac{2}{wsize+1}.$`

If `input` is a financial time series object, `output` is a financial time series object identical to `input` except for contents. If `input` is a row-oriented matrix, `output` is a row-oriented matrix of the same length.