The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Math::Business::BlackScholesMerton::NonBinaries

SYNOPSIS

use Math::Business::BlackScholesMerton::NonBinaries;

# price of a Call spread option
my $price_call_option = Math::Business::BlackScholesMerton::NonBinaries::vanilla_call(
    1.35,       # stock price
    1.34,       # barrier
    (7/365),    # time
    0.002,      # payout currency interest rate (0.05 = 5%)
    0.001,      # quanto drift adjustment (0.05 = 5%)
    0.11,       # volatility (0.3 = 30%)
);

DESCRIPTION

Contains non-binary option pricing formula.

vanilla_call

USAGE
my $price = vanilla_call($S, $K, $t, $r_q, $mu, $sigma);

DESCRIPTION
Price of a Vanilla Call

vanilla_put

USAGE
my $price = vanilla_put($S, $K, $t, $r_q, $mu, sigma)

DESCRIPTION
Price a standard Vanilla Put

lbfloatcall

USAGE
my $price = lbfloatcall($S, $K, $t, $r_q, $mu, $sigma, $S_max, $S_min)

DESCRIPTION
Price of a Lookback Float Call

lbfloatput

USAGE
my $price = lbfloatcall($S, $K, $t, $r_q, $mu, $sigma, $S_max, $S_min)

DESCRIPTION
Price of a Lookback Float Put

lbfixedcall

USAGE
my $price = lbfixedcall($S, $K, $t, $r_q, $mu, $sigma, $S_max, $S_min)

DESCRIPTION
Price of a Lookback Fixed Call

lbfixedput

USAGE
my $price = lbfixedput($S, $K, $t, $r_q, $mu, $sigma, $S_max, $S_min)

DESCRIPTION
Price of a Lookback Fixed Put

lbhighlow

USAGE
my $price = lbhighlow($S, $K, $t, $r_q, $mu, $sigma, $S_max, $S_min)

DESCRIPTION
Price of a Lookback High Low

_d1_function

returns the d1 term common to many BlackScholesMerton formulae.

_l_max

This is a common function use to calculate the lookbacks options price. See [5] for details.

_l_min

This is a common function use to calculate the lookbacks options price. See [5] for details.

dnorm

Standard normal density function