OPEN-SOURCE SCRIPT

Moneyness Options [Loxx]

Cập nhật
A moneyness option is basically a plain vanilla option where the strike is set to a percentage of the future/forward price. For example, a 120% moneyness call would have a strike equal to 120% of the forward price. A 120% moneyness put would have a spot equal to 120% of the strike. The value of this option is given in percent of the forward. The value of a moneyness call or put is thus given by: (via "The Complete Guide to Option Pricing Formulas")

c = p = c^-rT * (N(d1) - LN(d2))

where L = X/F for a call and L = F/X for a put, and

d1 = (-log(L) + v^2*T/2) / (v*T^0.5)

d2 = d1 - (v*T^0.5)


b=r options on non-dividend paying stock
b=r-q options on stock or index paying a dividend yield of q
b=0 options on futures
b=r-rf currency options (where rf is the rate in the second currency)

Inputs
S = Stock price.
K = Strike price of option.
T = Time to expiration in years.
r = Risk-free rate
c = Cost of Carry
V = Variance of the underlying asset price
lambda = Jump rate per year
cnd1(x) = Cumulative Normal Distribution
nd(x) = Standard Normal Density Function
convertingToCCRate(r, cmp ) = Rate compounder

Numerical Greeks or Greeks by Finite Difference
Analytical Greeks are the standard approach to estimating Delta, Gamma etc... That is what we typically use when we can derive from closed form solutions. Normally, these are well-defined and available in text books. Previously, we relied on closed form solutions for the call or put formulae differentiated with respect to the Black Scholes parameters. When Greeks formulae are difficult to develop or tease out, we can alternatively employ numerical Greeks - sometimes referred to finite difference approximations. A key advantage of numerical Greeks relates to their estimation independent of deriving mathematical Greeks. This could be important when we examine American options where there may not technically exist an exact closed form solution that is straightforward to work with. (via VinegarHill FinanceLabs)

Things to know
Only works on the daily timeframe and for the current source price.
You can adjust the text size to fit the screen
Phát hành các Ghi chú
fixed errors
blackscholesblackscholesmertonblackscholesoptionpricingHistorical VolatilitymoneynessmoneynessoptionsoptionsVolatility

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?


Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: patreon.com/algxtrading/membership
Ngoài ra, trên:

Thông báo miễn trừ trách nhiệm