Compute spreads and midquotes from price streams.
1 2 3 4 5 6 
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 
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

x 
an object of class 
... 
arguments to be passed. 
all functions return an object of class timeSeries
.
The functions returnSeries
, getReturns
,
midquoteSeries
, spreadSeries
are synonymes
for returns
, midquotes
, and spreads
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  ## Load the Microsoft Data 
setRmetricsOptions(myFinCenter = "GMT")
data(MSFT)
X = MSFT[1:10, ]
head(X)
## Compute Open/Close Midquotes 
X.MID < midquotes(X, which = c("Close", "Open"))
colnames(X.MID) < "X.MID"
X.MID
## Compute Open/Close Spreads 
X.SPREAD < spreads(X, which = c("Close", "Open"))
colnames(X.SPREAD) < "X.SPREAD"
X.SPREAD

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.