rebase_agg_windows: Rebase to new linear combination of assets

Description Usage Arguments Value

View source: R/momentum_prediction.R

Description

Change the price windows and historic price mean windows in trading period i to represent a linear combination of prices, the jth combination being the jth column of the matrix which is the ith entry of new_assets.

Usage

1
2
3
4
5
6
rebase_agg_windows(
  agg_windows,
  new_assets,
  asset_rownames,
  scalar_columns_to_rebase = NULL
)

Arguments

agg_windows

A tibble of class @eval{AGG_WINDOW_CLASS_NAME} as returned from aggregate_price_and_mean_windows

new_assets

A list, whose ith entry is a square matrix. Each column represents a new linear combination of the assets to consider replacing one of the old assets.

asset_rownames

These are the names of the assets of agg_windows in the order which they correspond to the rows of the matrices in new_assets

scalar_columns_to_rebase

A character vector of column names of agg_windows to be rebased. These must be double columns.

Value

the new tibble with rebased values


benSepanski/pfselect documentation built on May 1, 2020, 1:57 p.m.