build_strategies: Build strategies from an input csv file or dataframe of...

build_strategiesR Documentation

Build strategies from an input csv file or dataframe of strategies, can use 'demo_strategies' to generate a template file

Description

Build strategies from an input csv file or dataframe of strategies, can use 'demo_strategies' to generate a template file

Usage

build_strategies(input, start_date = as.Date("2000-01-01"),
  end_date = today())

Arguments

input

A dataframe containing strategy inputs or A character variable containing the path to the input csv file

start_date

A Date variable with start date of generation, this can be earlier or later than the dates in the template file

end_date

A Date variable containing the end date for the position sizes, defaults to today

Value

A list containing the actual sizes (mix of months-weighted and percentage based on input file) and simulated sizes ie actual sizes but filled upwards, then downwards to use for simulation of returns

Examples

data(demo_strategies)
build_strategies(demo_strategies, as.Date("2016-01-01"), as.Date("2018-12-07"))

build_strategies("input_file.csv")


yunching/tidymas documentation built on Feb. 5, 2023, 1:42 p.m.