Financial Time Series    

Chapter 2
Function Reference


Functions by Category

This chapter provides detailed descriptions of the functions in the Financial Time Series Toolbox.

Table 2-1: Financial Time Series Object and File Construction
Function
Purpose

ascii2fts

Create financial time series object from ASCII data file

fints

Construct financial time series object

fts2ascii

Write elements of time series data into an ASCII file.

fts2mtx

Convert to matrix

Table 2-2: Overloaded Methods 
Function
Purpose

display

Display financial time series object

end

Last date entry

exp

Exponential values

hist

Histogram

horzcat

Concatenate financial time series objects horizontally

iscompatible

Structural equality

isequal

Multiple object equality

length

Get number of dates (rows)

log

Natural logarithm

log10

Common logarithm

max

Maximum value

mean

Arithmetic average

min

Minimum value

minus

Financial time series subtraction

mrdivide

Financial time series matrix division

mtimes

Financial time series matrix multiplication

plus

Financial time series addition

power

Financial time series power

rdivide

Financial time series division

size

Get number of dates and data series

sortfts

Sort financial time series

std

Standard deviation

subsasgn

Content assignment

subsref

Subscripted reference

times

Financial time series multiplication

uminus

Unary minus of financial time series object

uplus

Unary plus of financial time series object

vertcat

Concatenate financial time series objects vertically

Table 2-3: Utility Functions 
Function
Purpose

chfield

Change data series name

extfield

Extract data series

fieldnames

Get names of fields

freqnum

Convert string frequency indicator to numeric frequency indicator

freqstr

Convert numeric frequency indicator to string representation

ftsbound

Start and end dates

getfield

Get content of a specific field

getnameidx

Find name in list

isfield

Check if a string is a field name

rmfield

Remove data series

setfield

Set content of a specific field

Table 2-4: Data Transformation Functions 
Function
Purpose

boxcox

Box-Cox transformation

convertto

Convert to specified frequency

demts2fts

Convert demonstration time series to financial time series object

diff

Differencing

fillts

Fill missing values in time series

filter

Linear filtering

lagts

Lag time series object

leadts

Lead time series object

peravg

Periodic average

resamplets

Downsample data

smoothts

Smooth data

toannual

Convert to annual

todaily

Convert to daily

todecimal

Fractional to decimal conversion

tomonthly

Convert to monthly

toquarterly

Convert to quarterly

toquoted

Decimal to fractional conversion

tosemi

Convert to semiannual

toweekly

Convert to weekly

tsmovavg

Moving average

Table 2-5: Indicator Functions  
Function
Purpose

adline

Accumulation/Distribution line

adosc

Accumulation/Distribution oscillator

bollinger

Bollinger band

chaikosc

Chaikin oscillator

chaikvolat

Chaikin volatility

fpctkd

Fast stochastics

hhigh

Highest high

llow

Lowest low

macd

Moving Average Convergence/Divergence (MACD)

medprice

Median price

negvolidx

Negative volume index

onbalvol

On-Balance Volume (OBV)

posvolidx

Positive volume index

prcroc

Price rate of change

pvtrend

Price and Volume Trend (PVT)

rsindex

Relative strength index (RSI)

spctkd

Slow stochastics

stochosc

Stochastic oscillator

tsaccel

Acceleration between periods

tsmom

Momentum between periods

typprice

Typical price

volroc

Volume rate of change

wclose

Weighted close

willad

Williams Accumulation/Distribution line

willpctr

Williams %R

Table 2-6: Calendar Functions
Function
Purpose
busdays
Business days in serial date format

Table 2-7: Plotting Functions 
Function
Purpose

candle

Candle plot

chartfts

Interactive display

highlow

High-Low plot

plot

Plot data series


 Reference Alphabetical List of Functions