Margrabe: Margrabe formula for option pricing

View source: R/Margrabe.R

MargrabeR Documentation

Margrabe formula for option pricing

Description

the function uses the Margrabe formula to compute option prices

Usage

Margrabe(s1, s2, v1, v2, t, rho, q1, q2) 

Arguments

s1

price of the first risky asset

s2

price of the second risky asset

v1

volatility first asset

v2

volatility second asset

t

maturity

rho

correlation coefficient between asset 1 and asset 2

q1

expected dividend rates of the prices s1 under the appropriate risK -neutral measure

q2

expected dividend rates of the prices s2 under the appropriate risK -neutral measure

Details

Margrabe formula is an option pricing formula applicable to an option to exchange one risky asset for another risy asset at maturity

Value

Price of an option computed using Mrgrabe Formula given the price of the first risky asset s1, price of the second risky asset s2, volatility of the first asset v1, volatility of the second asset v2, maturity of the option t, correlation coefficient between asset 1 and asset 2 rho, expected dividend rates of the prices s1 under the appropriate risK -neutral measure q1, expected dividend rates of the prices s2 under the appropriate risK -neutral measure q2

Author(s)

Colzani Luca, Magni Marta, Mancassola Gaia, Kakkanattu Jenson

References

Espen Gaarder Haug(2007):The Complete Guide to Option Pricing Formulas

Examples

Margrabe(125,100,0.45,0.47,1,0,0.04,0.02)

## The function is currently defined as
function (s1, s2, v1, v2, t, rho, q1, q2) 
{
    v <- sqrt(v1^2 + v2^2 - 2 * v1 * v2 * rho)
    d1 <- (log(s1/s2) + (q2 - q1 + v^2/2) * t)/(v * sqrt(t))
    d2 <- (log(s1/s2) + (q2 - q1 - v^2/2) * t)/(v * sqrt(t))
    Magrabe <- s1 * exp(-q1 * t) * pnorm(d1) - s2 * exp(-q2 * 
        t) * pnorm(d2)
    return(round(Magrabe, 2))
  }

Lcolzani98/OptionPricingFunctions documentation built on June 13, 2022, 5:46 a.m.