Learn R Programming

QFRM (version 1.0.1)

as.OptPos: Coerce an argument to OptPos class.

Description

Coerce an argument to OptPos class.

Usage

as.OptPos(o = Opt(), Pos = c("Long", "Short"), Prem = 0)

Arguments

o
A Opt or OptPx object
Pos
Specify position direction in your portfolio. Long indicates that you own security (it's an asset). Short that you shorted (short sold) security (it's a liability).
Prem
Option premium, i.e. cost of an option purchased or to be purchased.

Value

An object of class OptPos.

Examples

Run this code
as.OptPos(Opt())

Run the code above in your browser using DataLab