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

calc_strat_headline_sizeR Documentation

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

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

calc_strat_headline_size(strat_df)

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

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. 5, 2023, 1:42 p.m.