Learn R Programming

QFRM (version 1.0.1)

Profit: Computes payout/profit values

Description

Computes payout/profit values

Usage

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

Arguments

o
An object of class Opt*
S
A (optional) vector or value of stock price(s) (double) at which to compute profits

Value

A numeric matrix of size [length(S), 2]. Columns: stock prices, corresponding option profits

Examples

Run this code
Profit(o=Opt())
graphics::plot( print( Profit(OptPos(Prem=2.5), S=40:60)), type='l'); grid()

Run the code above in your browser using DataLab