calc_mrgn: Calculate initial margin on opening trades

Description Usage Arguments

View source: R/calc_mrgn.R

Description

calc_mrgn calculates the opening margin required depending on strategy type

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
calc_mrgn(
  strat = NULL,
  prc = NULL,
  spstrk = NULL,
  lpstrk = NULL,
  scstrk = NULL,
  lcstrk = NULL,
  spcred = NULL,
  lpcred = NULL,
  sccred = NULL,
  lccred = NULL,
  qty = 1,
  shares = 100
)

Arguments

strat

String representing option strategy used in the study ie. Short Put

prc

numeric stock price

spstrk

numeric short put strike

lpstrk

numeric long put strike

scstrk

numeric short call strike

lcstrk

numeric long call strike

spcred

numeric short put credit

lpcred

numeric long put credit

sccred

numeric short call credit

lccred

numeric long call credit

qty

numeric quantity of option positions

shares

numeric quantitiy of stock shares default 100


themechanicalbear/mobstrs documentation built on Dec. 31, 2020, 8:35 a.m.