R/Eta_put_price.R

Defines functions Eta_put_price

Documented in Eta_put_price

#' @title Delta hedging for european put option
#' 
#' @description 
#' The Eta_call_price function takes parameters from Black-Scholes model and returns a number of stock needed to fully hedge european put option.
#' 
#' @usage Eta_put_price(asset, strike, rate, vol, time, End_Time)
#' 
#' @param asset a numeric vector of asset prices.
#' @param strike numeric value, strike price for call or put option.
#' @param rate numeric value, risk free rate in the model, r >= 0.
#' @param vol numeric value, volatility of the model, vol > 0.
#' @param time a numeric vector of actual time, time > 0.
#' @param End_Time end time of the option, End_time >= time.
#' @return A numeric vector, amount of money needed to hedge an european put option.
#' 
#' 
#' @seealso \url{https://en.wikipedia.org/wiki/Black–Scholes_model}.
#' 
#' @examples 
#' Eta_put_price(100, 100, 0, 0.5, 0, 1)
#' Eta_put_price(c(100, 120), 100, 0, 0.3, 0, 1)
#' Eta_put_price(c(100, 120), 100, 0, 0.3, c(0, 0.5), 1)
#' 
#' 
#' @export

Eta_put_price <- function(asset, strike, rate, vol, time, End_Time){
  return( strike*exp( -rate*End_Time ) * pnorm( -d2(asset, strike, rate, vol, time, End_Time) ) )
}
mociepa/ShortfallRiskHedging documentation built on Sept. 30, 2022, 6:43 p.m.