getSymbols calls.In the case of functions consisting of combined
Op, Hi, Lo, Cl (e.g. ClCl(x)) the one period
transformation will be applied.
For example, to return the Open to Close of a
object it is
possible to call OpCl(x). If multiple periods
are desired a call to the function Delt is
necessary.
seriesLo and seriesHi will return the
low and high, respectively, of a given series.
seriesAccel, seriesDecel, seriesIncr,
and seriesDecr, return a vector of logicals
indicating if the series is accellerating, decellerating,
increasing, or decreasing. This is managed by diff,
which provides NA fill and suitable re-indexing. These
are here to make trade rules easier to read.
HLC extracts the High, Low, and Close columns.
OHLC extracts the Open, High, Low, and Close columns.
These functions are merely to speed the model specification process. All columns may also be extracted through standard R methods.
Assignment will not work at present.
getPrice will attempt to extract price column(s) from a time series,
using sensible defaults. Additionally, the user may provide by symbol and price
preference.
Op(x)
Hi(x)
Lo(x)
Cl(x)
Vo(x)
Ad(x)
seriesHi(x)
seriesLo(x)
seriesIncr(x, thresh=0, diff.=1L)
seriesDecr(x, thresh=0, diff.=1L)
OpCl(x)
ClCl(x)
HiCl(x)
LoCl(x)
LoHi(x)
OpHi(x)
OpLo(x)
OpOp(x)
HLC(x)
OHLC(x)
OHLCV(x)
getPrice(x, symbol=NULL, prefer=NULL, ...)quantmod.OHLC
objects which will be returned as zoo objects, and calls to
seriesLo and seriesHi which may return a numeric
value instead of the original object type.
prefer can be used with getPrice to extract many commonly used
financial time series prices descriptions (e.g. open, high, low, close, bid,
ask/offer, midpoint, trade, price). If the value of prefer does not
match one of the currently supported types, it will be matched against the
object column names using grep.
specifyModel ## Not run:
# getSymbols('IBM',src='yahoo')
# Ad(IBM)
# Cl(IBM)
# ClCl(IBM)
#
# seriesHi(IBM)
# seriesHi(Lo(IBM))
#
# removeSymbols('IBM')
# ## End(Not run)
Run the code above in your browser using DataLab