spreads {fSeries}R Documentation

Calculations of spreads and mid quotes

Description

Functions to calculate spreds and midquotes from price streams.

Usage

  
spreads(x, which = c("Bid", "Ask"), tickSize = NULL)    
midquotes(x, which = c("Bid", "Ask"))

midquoteSeries(...)
spreadSeries(...)

Arguments

tickSize the default is NULL to simply compute price changes in original price levels. If ticksize is supplied, the price changes will be divided by the value of inTicksOfSize to compute price changes in ticks.
which a vector with two character strings naming the column names of the time series from which to compute the mid quotes and spreads. By default these are bid and ask prices with column names c("Bid", "Ask").
x an object of class timeSeries.
... arguments to be passed.

Value

all functions return an object of class timeSeries.

Note

The functions returnSeries, getReturns, midquoteSeries, spreadSeries are synonymes for returns, midquotes, and spreads.

Author(s)

Diethelm Wuertz for the Rmetrics R-port.

Examples

## data -  
   # Microsoft Data: 
   myFinCenter <<- "GMT"
   MSFT = as.timeSeries(data(msft.dat))[1:10, 1:4]
   head(MSFT)

## midquotes -

## spreads -


[Package fSeries version 260.73 Index]