trades-class {portfolio} | R Documentation |
Class "trades"
Description
An object of the class "trades" contains a data frame with columns "id", "side", and "shares" describing a simple list of trades to be performed.
Objects from the Class
Objects can be created by calls of the form new("trades", ...)
.
Slots
trades
:Object of class
"data.frame"
with columns "id", "side", and "shares".
Methods
No methods defined with class "trades" in the signature.
Author(s)
Kyle Campbell and Daniel Gerlanc
See Also
Examples
df <- data.frame(id = c(1,2,3), side = c("B","X","C"), shares = c(10,20,30))
t <- new("trades", trades = df)
[Package portfolio version 0.5-2 Index]