# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# tick2ret (fts)

Convert price series to return series for time series object

## Syntax

```returnFts = tick2ret(priceFts)
returnFts = tick2ret(priceFts,'PARAM1',VALUE1,'PARAM2',VALUE2', ...)
```

## Arguments

 `priceFts` Financial time series object of prices. `'PARAM1'` (Optional) `Method` is a character vector indicating the method to convert asset returns to prices. The value must be defined as `'Simple'` (default) or `'Continuous'`. If `Method` is `'Simple'`, `tick2ret` uses simple periodic returns. If `Method` is `'Continuous'`, the function uses continuously compounded returns. Case is ignored for `Method`.

## Description

```returnFts = tick2ret(priceFts,'PARAM1',VALUE1,'PARAM2',VALUE2', ...)``` generates a financial time series object of returns.

### Note

The i'th return is quoted for the period `PriceSeries`(i) to `PriceSeries`(i+1) and is not normalized by the time increment between successive price observations.

If `Method` is unspecified or `'Simple'`, the prices are

```ReturnSeries(i) = PriceSeries(i+1)/PriceSeries(i)-1 ```

If `Method` is `'Continuous'`, the prices are

```ReturnSeries(i) = log[PriceSeries(i+1)/PriceSeries(i)] ```

## Examples

collapse all

Compute the return series from the following price series:

```PriceSeries = [100.0000 100.0000 110.0000 112.0000 115.5000 116.4800 109.7250 122.3040]```
```PriceSeries = 100.0000 100.0000 110.0000 112.0000 115.5000 116.4800 109.7250 122.3040 ```

Use the following dates:

```Dates = {'18-Dec-2000' '18-Jun-2001' '17-Sep-2001' '18-Dec-2001'}```
```Dates = 4x1 cell array {'18-Dec-2000'} {'18-Jun-2001'} {'17-Sep-2001'} {'18-Dec-2001'} ```

The `fints` object is:

`p = fints(Dates, PriceSeries)`
``` p = desc: (none) freq: Unknown (0) 'dates: (4)' 'series1: (4)' 'series2: (4)' '18-Dec-2000' [ 100] [ 100] '18-Jun-2001' [ 110] [ 112] '17-Sep-2001' [ 115.5000] [ 116.4800] '18-Dec-2001' [ 109.7250] [ 122.3040] ```

`returnFts` is computed as:

` tick2ret(p)`
``` ans = desc: (none) freq: Unknown (0) 'dates: (3)' 'series1: (3)' 'series2: (3)' '18-Jun-2001' [ 0.1000] [ 0.1200] '17-Sep-2001' [ 0.0500] [ 0.0400] '18-Dec-2001' [ -0.0500] [ 0.0500] ```

Note that for `n` dates in the original time series, there are ( `n`-1) dates returned for `returnFts` from `tick2ret`. The formula for the date output dates is described as: `RetDate`(`i`) = `PriceDate` (`i`+1).