calc_strat_headline_size: Calculates headline sizes of strategies given the size of the...

Description Usage Arguments Value Examples

Description

Calculates headline sizes of strategies given the size of the component trades by first summing the positive sizes and negative sizes separately. Then taking the higher number as the size

Usage

1

Arguments

strat_df

A dataframe of strategies which are dataframes containing timeseries sizes of their component instruments. Columns should be 'date', 'strategy', 'instrument', 'size'

Value

A dataframe containing the size of the strategies daily

Examples

1
2
3
portfolios <- build_strategies(demo_strategies, as.Date("2016-01-01"), as.Date("2018-12-07"))
actual_pf_size <- convert_dur_size(portfolios$actual, portfolios$summary, demo_duration)
calc_strat_headline_size(actual_pf_size)

yunching/tidymas documentation built on Feb. 17, 2020, 5:13 a.m.