Learn R Programming

PortfolioTesteR (version 0.1.4)

standardize_data_format: Standardize Data to Library Format

Description

Internal function that converts various data formats to standard wide format with Date column and symbol columns.

Usage

standardize_data_format(
  data,
  date_col = "date",
  symbol_col = "symbol",
  price_col = "price",
  symbol_order = NULL
)

Value

Standardized data.table

Arguments

data

Input data in long or wide format

date_col

Name of date column

symbol_col

Name of symbol column (for long format)

price_col

Name of price column (for long format)

symbol_order

Optional ordering for symbols