Last data update: 2014.03.03

R: Visualization of Futures Data
futures-plotR Documentation

Visualization of Futures Data

Description

Visualization of historical commodity futures prices and remaining time to maturity. This function is intended to be fed with the futures data contained in this package (see futures-data).

Usage


futuresplot(futures, type = c("forward.curve", "ttm"), ...)

Arguments

futures

A list with elements price and ttm. Usually an element of futures.

type

What shall be plotted. "forward.curve" or "ttm" (time to maturity).

...

Optional arguments passed to plot.

Author(s)

Philipp Erb, David Luethi, Juri Hinz

See Also

futures-data

Examples


# data(futures)
# 
# ## Plot time to maturity of corn data
# futuresplot(futures$corn, type = "ttm")
# 
# ## Plot forward curves of wheat data since Jan 2010
# wheat.2010 <- lapply(futures$wheat,
#                      function(x)x[as.Date(rownames(x)) > "2010-01-01",])
# futuresplot(wheat.2010, type = "forward.curve")

Results