Learn R Programming

QFRM (version 1.0.1)

BinaryMC: Binary option valuation via Monte-Carlo (via) simulation.

Description

Binary option valuation via Monte-Carlo (via) simulation.

Usage

BinaryMC(o = OptPx(Opt(Style = "Binary")), Q = 25, Type = c("cash-or-nothing", "asset-or-nothing"), NPaths = 5)

Arguments

o
An OptPx object
Q
A fixed numeric amount of payoff
Type
Binary option type: 'cash-or-nothing' or 'asset-or-nothing'.
NPaths
The number of simulation paths to use in calculating the price Partial names are allowed, eg. 'c' or 'a'

Value

The original input object o with added parameters and option price PxMC

Details

Two types of binary options are priced: 'cash-or-nothing' and 'asset-or-nothing'.

References

Hull, John C., Options, Futures and Other Derivatives, 9ed, 2014. Prentice Hall. ISBN 978-0-13-345631-8, http://www-2.rotman.utoronto.ca/~hull/ofod/index.html. pp.606-607.

Examples

Run this code
(o = BinaryMC())$PxMC

o = OptPx(Opt(Style="Binary"))
(o = BinaryMC(o, Type="cash"))$PxMC

o = OptPx(Opt(Style="Binary"),q=0.01)
(o = BinaryMC(o, Type="asset"))$PxMC

o = OptPx(Opt(Style="Binary", S0=100, K=80),q=0.01)
(o = BinaryMC(o, Type="cash"))$PxMC

o = OptPx(Opt(Style="Binary", Right="Put", S0=50, K=60),q=0.04)
(o = BinaryMC(o, Type="asset"))$PxMC

Run the code above in your browser using DataLab