create.dynamic.data {tradeCosts}R Documentation

User-level function to create a dynamic data.frame for use in trade.costs

Description

This function requires two vectors: period, id. It combines these two vectors and optional vectors into a single data.frame ready for use in the trade.costs function.

Usage

create.dynamic.data(period, id, ...)

Arguments

period The column of periods in which trades occured.
id The column of security identifiers traded.
... Additional vector arguments of the same length to be incorporated into the resulting data frame

Details

This helper function makes creating a dynamic data.frame easier.

Value

A data.frame is returned for use in the trade.costs function.

Author(s)

Daniel Suo

Examples

data(dynamic.mar.2007)
create.dynamic.data(dynamic.mar.2007$period, dynamic.mar.2007$id,
dynamic.mar.2007$vwap)

[Package tradeCosts version 0.3-0 Index]