Profit:

Usage Arguments Examples

Usage

1
Profit(o = OptPos(), S = o$S0)

Arguments

o
S

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (o = OptPos(), S = o$S0) 
{
    stopifnot(is.Opt(o))
    o = as.OptPos(o)
    return(cbind(S, Profit = o$Pos$SignLS * (pmax(o$Right$SignCP * 
        (S - o$K), 0) - o$Prem)))
  }

rhooahn/sample-code documentation built on May 27, 2019, 7:40 a.m.