schwartz97futures-plot: Visualization of Futures Data

Description Usage Arguments Author(s) See Also Examples

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

1
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

1
2
3
4
5
6
7
8
9
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")

schwartz97 documentation built on May 2, 2019, 5:48 p.m.