margin_use: Calculate amount of margin in use

Description Usage Arguments Value

Description

Calculate the amount of margin in use each day during the study. Can be used as a decision point on if new positions can be opened

Usage

1
margin_use(sy, st, en, marg)

Arguments

sy

character string representing stock symbol for group and join later

st

character string understood by lubridate ymd to represent open date of trade

en

character string understood by lubridate ymd to represent closing date of trade

marg

numeric of the margin at open for this position

Value

dataframe of dates when position was open including stock symbol and margin


themechanicalbear/tastytrade documentation built on June 28, 2019, 10:16 p.m.