TDIInstrument | R Documentation |
Instrument is an abstract class for (tradeable) market instrument(s). The class provides generic methods and defines the instrument data structure.
The instrument class and its generic methods are to be used by calling packages. The class is abstract and should be implemented for each API.
TDI::baseTDI
-> TDI::TDIResult
-> TDIInstrument
source
Identifier for the data source.
symbol
Unique identification symbol.
type
Instrument type classification.
name
Name for the instrument.
exchange
Market for the instrument.
sector
Main sector of the business.
industry
Main industry of the business.
country
Country of registration.
quote
List with latest price data.
keyData
Key data object.
annualCashFlow
Annual cash flow data.
quarterlyCashFlow
Quarterly cash flow data.
series
Xts time series with (historical) data.
setQuote()
Set the latest quote for the instrument.
TDIInstrument$setQuote(Open, High, Low, Close, Volume)
Open
Latest open price.
High
Latest high price.
Low
Latest low price.
Close
Latest close price.
Volume
Volume traded.
The object itself.
setSeries()
Set series or add additional column(s) to the existing data. In case the input is a data-frame it is converted to 'xts'.
TDIInstrument$setSeries(x)
x
Xts time series with (historical) data.
The object itself.
getSession()
Retrieve the trading session data for the input date plus 'n' periods.
TDIInstrument$getSession(date, n = 0)
date
Input date-time.
n
Optional lag number of sessions.
Requested session data.
getReturn()
Return the *returns* calculated from the 'Close' price(s).
TDIInstrument$getReturn()
Instrument returns time series.
getWealthIndex()
Return the *wealth index* calculated from the returns.
TDIInstrument$getWealthIndex()
Instrument returns time series.
TechnicalAnalysis()
Execute the specified technical analysis calculations.
TDIInstrument$TechnicalAnalysis(ta = NULL)
ta
Technical analysis indicator object.
The object itself.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.