Plots historical futures term structure data contained in an S4 object of class FuturesTS from the pullit package.

Plots historical market performance indicators for S4 objects of class FundMarket from the pullit package.

Plots historical market performance (type = "performance") or positions summary (type = "positions") by leg for S4 objects of class AssetPricingFactor from the factorem package..

plot(object, ...)

# S4 method for FuturesTS
plot(object, ticker, frame = NULL)

# S4 method for FundMarket
plot(object, ticker)

# S4 method for AssetPricingFactor
plot(object, type)

Arguments

object

an S4 object from the finRes suite.

...

extra plot parameters.

ticker

a scalar character vector. Bloomberg identifier.

frame

a scalar integer vector. Animation speed parameter; the lower the faster.

type

a scalar character vector. Specifies the type of plot desired: "performance" or "positions".

Examples

if (FALSE) { library(finRes) # pull data from Bloomberg with pullit term_structure <- pull_futures_market(Bloomberg = T, type = 'term structure', active_contract_tickers = "C A Comdty", start = as.character(Sys.Date() - 365L), end = as.character(Sys.Date()), TS_positions = 1L:10L, roll_type = "A", roll_days = 0L, roll_months = 0L, roll_adjustment = "N") # plot futures term structure plot(term_structure, ticker = "C A Comdty") } if (FALSE) { library(finRes) # pull data from Bloomberg with pullit fund <- pull_fund_market(Bloomberg = T, tickers = "SPY US Equity", start = as.character(Sys.Date() - 365L), end = as.character(Sys.Date())) # plot fund performance plot(fund, ticker = "SPY US Equity") } if (FALSE) { library(finRes) # pull data from Bloomberg via pullit tickers <- c("C A Comdty", "S A Comdty", "SMA Comdty", "BOA Comdty", "W A Comdty", "KWA Comdty", "MWA Comdty", "O A Comdty")#' term_structure <- pull_futures_market(Bloomberg = T, type = 'term structure', active_contract_tickers = tickers, start = as.character(Sys.Date() - (2L * 365L)), end = as.character(Sys.Date()), TS_positions = 1L, roll_type = "A", roll_days = 0L, roll_months = 0L, roll_adjustment = "N") # construct an asset pricing factor with factorem factor <- momentum_factor(term_structure) # plot factor performance plot(factor, type = "performance") # plot factor performance plot(factor, type = "positions") }