streak_var: Streak (Multiple Variables)

streak_varR Documentation

Streak (Multiple Variables)

Description

Counts the number of days the open price has moved consecutively Negative and positive streaks are represented by their sign; only works with various types of returns or mutated vector created by diff()

Usage

streak_var(df, var)

Arguments

df

Dataframe with price data.

var

String of column name you wish to see streak in

Value

Returns a 1 x # of columns in df dataframe

Examples

streak_var(tail(SPYdaily,200), "tot_ret")

avfintools documentation built on Oct. 6, 2022, 5:14 p.m.