📜 ⬆️ ⬇️

Evaluation of option premiums - analytical formulas vs modeling

Introduction


In the wake of HYIP cryptocurrency slips news about Bitcoin trading on the CME and NASDAQ world exchanges. For me, this is a landmark event: the hands of corporations that inflated dot-com and mortgage bubbles reached out to the gold of the crypank, cryptocurrency. And in the arsenal of these same corporations a powerful lever - derivative financial instruments, or derivatives.

Being impressed by the history of the ups and metamorphosis of the derivatives markets that I read not so long ago — above all, futures and option contracts, I became interested in the non-trivial pricing of options. I discovered that although the Internet is full of rewrites of articles interpreting the famous Black-Scholes formula, practical tools — web sites, technology programs, or banal programmer’s guides — are not mathematics, this issue is lacking on the Internet. I had to remember the basics of the server and adapt rigorous mathematical descriptions in a popular, understandable, first of all, to me, format.

Option Definition


An option is a contract that gives the buyer the right (but not the obligation!) To buy or sell an asset that is traded on the market at the price indicated by him (the contract buyer). The option seller assigns a premium to the buyer - his remuneration for the opportunity given to the option buyer to buy or sell an asset in a certain period at a certain price.
Example of an option contract:


Suppose that in 30 days the market rate of Ethereum will rise to $ 500. The buyer of the option will be able to buy 10 Ethereum (10 ETH) at the agreed price of $ 470. After that, the buyer, who wants to immediately benefit from his deal, will immediately sell Ethereum at a price of $ 500, earning:
')
10 x (500 - 470) = 300 (USD).

If the price of Ethereum is below $ 470, the buyer of the option simply refuses the unprofitable transaction.

Win-win offer! Of course, for such a wonderful opportunity the seller will request some amount - an option premium.

So, the specification of the option contract:


The size of the premium on the option is the subject of our little research.

How the seller values ​​the option premium.


Calculate the amount of the premium - such that you yourself do not stay in the loser, and do not scare away the potential buyer with a “hurt” price tag - real art. At least, it was so for the time being. So far in 1973, two mathematicians have not revealed to the world an elegant formula called by their names - the Black-Scholes formula. There is even a popular book written about this formula and its influence on the derivatives market - “Quanta. Like math wizards, they earned billions and nearly collapsed the stock market. ” Of course, the real story is somewhat more complicated than “the darkness of ignorance - vzhuh! - the formula "... But I am not interested in such global processes, but directly the question: how much is the Black-Scholes formula applicable for evaluating the" fair "premium on an option calculated for cryptocurrency contracts popular with traders?

The Black-Scholes model describes a certain “standardized” market. Emasculated, spared from sharp price fluctuations, living for years in the same rhythm. Of course, the formula derived for the “ideal” market does not work as well in practice as in theory.

As is common with traders - where there is a lack of theory, they turn to empiricism. To the trader's “chuik”, to the “experience”. As a programmer, I am disgusted by such ignorance. Therefore, I’ll give my solution: someone else’s calculations, a bit of a terver, Excel magic and, at the very end, C # source files.

Reference calculation - Black - Scholes model


Wikipedia will provide us with the formula . By setting the values ​​of the variables of an option contract and knowing the parameters of the trading asset, we can calculate the “fair” premium.

For further calculations, we need “ideal” data - a price series with the necessary characteristics.

The real price, as I have already noted, can be a non-permanent lady: either she is marking time, then suddenly she rushes to her quarry. We need a sample of an ideal series of price data as a reference for subsequent calculations.

Lognormal distribution


Model B- (let's reduce the names of the authors in the title) assumes that the price series describes a log-normal distribution. What does this mean? I will give an example:


in column A - the price of the abstract asset ABS / USD, pi .
Column B contains the natural logarithm of the private pi and pi1 .

Lognormal distribution describes a price series, the derivative of which, obtained as the natural logarithm of the quotient from dividing the current value with the previous one, has a normal distribution. Complicated. Let me explain with our example: if the values ​​in column B are distributed according to the normal law, then the values ​​of column A describe a log-normal distribution.

How do we get a “lognormal” price series? MS Excel, which I have already used for the example, is able to generate random numbers that have a uniform (alas, not normal) distribution. There is a simple method by which we can obtain a series of normally distributed CBs from uniformly distributed CBs. The technique is called the “inverse function method”. Without going into details of the method, I will note the following important aspect of it:


We need the inverse integral (as it is also called, cumulative) normal distribution function. This is in Excel: the “NORM. OBR” function.

The NORMAL OBR function takes values: probability, mean, standard deviation.



How to interpret this data? Take the first pair of numbers:

“CB will take a value of -0.015451 or less with a probability of 0.001 (0.1%)”.

The second pair: “CB will take the value -0.014391 or less with a probability of 0.002 (0.2%)”. Etc.
Inverse function method: we randomly select a number in the range from 0 to 1 (column A) and find the corresponding value of the inverse of the cumulative distribution function (column B). Or, in our case, simply randomly select a number from column B.

Ie, choose the value of N in the range from 0 to 999 and read the contents of the cell Bn+2 :



So we got a normally distributed random variable with a mean of 0 and a standard deviation of 0.005.

There can be any number of values ​​in column D. We will need 3650 values ​​- we are going to simulate the daily price changes of ABS / USD for 10 years. It remains to generate the actual price of ABS / USD.

In column D we have a series of values ​​of ∆, and ∆, by the formula of a lognormal distribution, is defined as

i=ln(pi/pi1)


Hence, the ABS / USD prices, the following and the previous ones, will be related by the function.

pi=pi1e


Transfer the column D to the new sheet, copy it, and then paste the values ​​starting at cell A3.

Now we indicate the initial price of ABS / USD equal to 1000 (USD for 1 ABS) - enter “1000” in cell B2:


In cell B3, enter “= B2 * EXP (A3)” and copy this value into all subsequent cells - B4: B3652.

This completes the preparation of the initial data, finally. Column B contains the price range of our benchmark ABS / USD asset. A series with lognormal distribution characteristics with a standard deviation of 0.005 (0.5%). I got the following values:


There is no guarantee that if you perform exactly the same calculations in MS Excel, you get exactly the same values, since the source data is a random variable. And yet - you see, the schedule is quite like a stock quote?

The calculation of the premium formula BB


Since we have “reference” data, we will carry out a “reference” calculation. We consider the premium for the “vanilla” European CALL option:


Our ABS tool is not a stock, not a bond, or any other security. No dividends for the possession of ABS owner is not entitled.

The same formula is the formula for calculating the premium for a European Call option (value C):

C=SN(d1)XerTN(d2)


d1= fracln( fracSX)+(r+ fracσ22)Tσ sqrtT


d2=d1σ sqrtT


Let us analyze the parameters of the formula.


Historical volatility


For volatility, we take the standard deviation (RMS), recalculated for the annual interval. Let me give you another formula from Wikipedia:

S0= sqrt frac1n1 sumni=1(xi overlinex)2


How do we calculate the standard deviation of ABS / USD prices in MS Excel?



Some of the calculations can be skipped: it is enough to calculate the C column (deviations in percent) and use the Excel function to find the root-mean-square (standard) deviation — as we defined in cell I2 — the STANDOCLON.B function.

It remains to recalculate the standard deviation (σ) value for the interval of one year. Our ABS / USD is trading 365 days a year. The σ value calculated for one day should be multiplied by the square root of 365:

σY=σ sqrt365=0.4943% times19,105=9.443%


Where did the square root in the formula for recalculating the daily value of the standard deviation per year come from? Interested address on the Internet, look for a model of random walk, random walk (RW).

Excel premium calculation


Now that we have defined all the parameters of the Black-Scholes formula, we will enter their values ​​and functions in Excel:


I note right away: I indicate the values ​​of T and σ in absolute terms, not in percentages.


The “fair” premium for the vanilla European CALL option ABS / USD with strike 1000 and expiration in 30 days was $ 10.80 for one contract.

Calculation of premium for “abnormal” price distribution


Above, it was stated that the price model B-SH is adequate for the lognormal distribution of the price series. But how close is the “real” market in its characteristics to the law-like distribution of CB? More precisely, how far is the market from it?

Our hypothetical asset ABS / USD is characterized by a normal distribution of logarithms from private neighboring (current and previous) prices. The graph of the probability density of the occurrence of large and small price deviations (logarithms) has a classical for normal distribution form, approximately like this:


In other words, it has the shape of a bell, with a “steep” apex and “shoulders”, or “tails”, rapidly approaching the abscissa as it moves away from the mean value (0).

What empirical observations would be appropriate for the real market for these very “tails” of the normal distribution?

Large price deviations are possible, but have an extremely low probability. For the chart above, we can say that the price deviation of + 2% or more has a probability of 5%. And the price deviation of + 3% or more already has a near-zero probability - some insignificant fractions of a percent.

The “real” market has a slightly different behavior. Specifically: the majority of price changes lie in a rather narrow range, while, however, the probability of significant price fluctuations is significant. The graph of probability density of price deviations for the “real” market will look like this:


Will the fact that the characteristics of the distribution of daily price deviations for the “real” market differ from the B-Sh model affect the accuracy of the calculation?

Obviously will affect. The question is - how much will the B-Sh formula be mistaken in its assessment of the “fair” award?

Modeling "real" prices


Now my task is to generate a new price range. The price series, the logarithms of the private neighboring prices in which obey a certain “abnormal” distribution - a distribution that is distinguished by “thick tails”. Moreover, I will complicate my task a little.

The final price series should be characterized by the same amount of historical volatility as the ABS / USD price range that we built earlier.

For example, let me give you two curves of the density of the distribution of CB: the normal distribution (the brown line) and the “real” distribution (the blue line) are what we want to get. With thick and long tails:


In the normal distribution, we can vary one parameter - the standard deviation (σ). Here are two graphs of the density of the normal distribution with σ equal to 1 and 0.4, respectively:


Both graphics are not exactly what we would like. The thin “body” of the graph for the parameter σ = 0.4 is close to the desired one. But we would like the “tails” thicker. In other words, a large percentage of deviations are concentrated in the vicinity of the mean value (0), with still significant probability of large (2% or more) price deviations.

Solution: add up two graphics. I will get the very dependence that I cited above in the figure as the “real” probability density of the price distribution.

Now we have added the values ​​of the density function of the normal distribution. How to build a distribution, the density of which will correspond to the sum of two normal distribution functions with parameters σ = 1 and σ = 0.4?

Obviously ( corrected ):
  1. add two (inverse) integral density functions of the normal distribution,
  2. substitute the argument in the resulting function - a uniformly distributed CB.


I will do about the same calculations as before, when generating a number of ABS / USD. But now I’ll fill the two columns with the “NOR.OBR” function. The resulting value should have an annual standard deviation equal to 9.44% - as in the previous example. I will achieve this by conducting several iterations of the selection of parameters, since the result (generated sample) is non-deterministic:



It remains to apply the formula to the series obtained:

xi=xi1ei



The sum of two normally distributed random variables is copied to column A. In column B, as before, we multiply the previous price value (starting from 1000) by the exponent from CB from column A.

As a result, I got the following price chart for WRD / USD:


The premium for the CALL option for WRDUSD on the same terms of the contract that we have previously calculated will remain unchanged, since the parameters in the B-Sh formula have not changed. Let me remind the numbers: the premium for vanilla European CALL-option WRD / USD with strike 1000 and expiration after 30 days was $ 10.80 for one contract.

We have two assets, the price dynamics for which is expressed by different laws:
ABS / USDWRD / USD
Price distribution lawlognormal distribution"Real" distribution
Award according to the formula BC$ 10.80$ 10.80
“Fair” award??

At this stage, MS Excel does not already have enough capabilities; it's time to move on to programming. To be continued…

Source: https://habr.com/ru/post/344996/


All Articles