loxx

Writer Extendible Option [Loxx]

These options can be exercised at their initial maturity date /I but are extended to T2 if the option is out-of-the-money at ti. The payoff from a writer-extendible call option at time T1 (T1 < T2) is (via "The Complete Guide to Option Pricing Formulas")

c(S, X1, X2, t1, T2) = (S - X1) if S>= X1 else cBSM(S, X2, T2-T1)

and for a writer-extendible put is

c(S, X1, X2, T1, T2) = (X1 - S) if S< X1 else pBSM(S, X2, T2-T1)

Writer-Extendible Call

c = cBSM(S, X1, T1) + Se^(b-r)T2 * M(Z1, -Z2; -p) - X2e^-rT2 * M(Z1 - vT^0.5, -Z2 + vT^0.5; -p)

Writer-Extendible Put

p = cBSM(S, X1, T1) + X2e^-rT2 * M(-Z1 + vT^0.5, Z2 - vT^0.5; -p) - Se^(b-r)T2 * M(-Z1, Z2; -p)


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
Asset price ( S )
Initial strike price ( X1 )
Extended strike price ( X2 )
Initial time to maturity ( t1 )
Extended time to maturity ( T2 )
Risk-free rate ( r )
Cost of carry ( b )
Volatility ( s )

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)

Numerical Greeks Output
Delta
Elasticity
Gamma
DGammaDvol
GammaP
Vega
DvegaDvol
VegaP
Theta (1 day)
Rho
Rho futures option
Phi/Rho2
Carry
DDeltaDvol
Speed

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

Public Telegram Group, t.me/algxtrading_public

VIP Membership Info: www.patreon.com/algxtrading/membership
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?