prob.below: Probability Below

Description Usage Arguments Details Value Examples

View source: R/optionstrat.R

Description

Calculates the probability of the underlying asset value remaining below a price level in a designated time frame, given the daily standard devaiation of the underlying returns.

Usage

1
2
prob.below(spot, upper, mean = 0, asd = 0, dsd = 0, dte = 0, p,
  quantile = FALSE, tradedays = 262)

Arguments

spot

Current price of the underlying asset

upper

Upper price of the range

mean

The average daily price movement, default = 0

asd

Annualized standard deviation of the underlying returns

dsd

Daily standard deviation of the underlying returns (Annual vol/sqrt(256)), used as an alternative to the asd parameter in conjuction with the dte parameter

dte

Days until expiration, designated time frame

p

Designated probability

quantile

Logical. If True, calculates the price the asset will remain below, given the designated probability

tradedays

Number of trade days in a year, default = 262

Details

This function has two separate possible operations: 1. Calculates the probability of the underlying asset value remaining below a price level in a designated time frame, given the daily standard devaiation of the underlying returns. 2. Calculates the price the asset will remain below, given the designated probability

Value

Returns a probability (if quantile = FALSE), Returns a data.frame (if quantile = TRUE)

Examples

1
2
prob.below(spot = 100, upper = 110, mean = 0, dsd = 0.01, dte = 45)
prob.below(spot = 100, mean = 0, dsd = 0.01, dte = 45, p = 0.75, quantile = TRUE)

Example output

[1] 0.9319814
  probability percent.change    price
1        0.75     0.04524615 104.5246

optionstrat documentation built on Dec. 4, 2019, 1:08 a.m.