# intextratio01
# column study
# ======================================
# Intrinsic/Extrinsic ratio
#https://www.investopedia.com/terms/i/intrinsicvalue.asp
#https://www.investopedia.com/articles/optioninvestor/07/options_beat_market.asp
#Intrinsic value is the value any given option would have if it were exercised today. Basically, the intrinsic value is the amount by which the strike price of an option is profitable or in-the-money
#Intrinsic value = if stock price > strike then stock price - strike else 0
def stkcls = close(GetUnderlyingSymbol());
def strik = getstrike();
def intrin = if stkcls > strik then (stkcls - strik) else 0;
#extrinsic value
#time value = option price - Intrinsic value
# use mark for option price , (bid+ask)/2
def optprice = (bid+ask)/2;
def extrin = optprice - intrin;
plot intextratio = intrin/extrin;
#In other words, the time value is what's left of the premium after calculating the profitability between the strike price and stock's price in the market. As a result, time value is often referred to as an option's extrinsic value since time value is the amount by which the price of an option exceeds the intrinsic value.
#https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Option-Related
# =================================================
# make background color black
#assignBackgroundColor(Color.black);
#