MSF 503 Chapter 9 Simulation 3: Options and Value at Risk PDF

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Summary

This chapter of a finance textbook introduces options, including call and put options, and covers concepts like value at risk. It details how options function by providing the buyer with the right to buy or sell an underlying asset at a predetermined price. Examples and mathematical formulas are included.

Full Transcript

CHAPTER 9 SIMULATION 3: Options and Value at Risk 9.1 Options Let’s say you are concerned that your house may burn down. So, you buy fire insurance, and you pay the premium. Usually your insurance contract expires after one year. You now own the right to sell (or put) yo...

CHAPTER 9 SIMULATION 3: Options and Value at Risk 9.1 Options Let’s say you are concerned that your house may burn down. So, you buy fire insurance, and you pay the premium. Usually your insurance contract expires after one year. You now own the right to sell (or put) your house to the insurance company for $100K (the strike price) if it burns down prior to expiry. The insurance company is obligated to buy your house for $100K if you exercise your right. If your house does not burn down, you do not exercise your right. If your house does burn down, it is now worthless, so you exercise your right to sell (put) it to the insurance company at the strike, who has to buy it. Notice that the premium, the price of the insurance, depends upon the probability of the thing happening. In this case, the thing is your house burning down. An option is an insurance contract that grants the buyer the right and the seller the obligation to transact the underlying at the strike price prior to or at expiration in exchange for the premium. 1. A call option grants the buyer the right to buy (say) the stock at the strike price on or before expiry and the seller the obligation to sell. 2. A put option grants the buyer the right to sell (say) the stock at the strike price on or before expiry and the seller the obligation to buy. Let’s look at 1000 21-day price paths according to geometric Brownian motion. The 21-day log returns are approximately normally distributed. © 2024 Ben Van Vliet 166 The value of a call at expiration is: C = max( Stock Price – Strike, 0 ) The buyer of a call is bullish. Pays the premium, which is the maximum loss. Has unlimited potential profit, if the stock goes to infinity. The seller of a call is bearish. Receives the premium, which is the maximum profit. Has unlimited potential loss, if the stock goes to infinity. The value of a put at expiration is: P = max( Strike – Stock Price, 0 ) The buyer of a put is bearish. Pays the premium, which is the maximum loss. Has (virtually) unlimited potential profit, if the stock goes to 0. The seller of a put is bullish. Receives the premium, which is the maximum profit. Has (virtually) unlimited potential loss, if the stock goes to 0. Consider a call option with 50 strike. What is your right or obligation? How much did you pay for this call? If at expiry the stock price is 45, what is your profit/loss? If at expiry the stock price is 55, what is your profit/loss? What is your breakeven price for the stock? What are your maximum profit and loss? © 2024 Ben Van Vliet 167 For the simulation, we get rid of those 21-day price paths where the ending price is less than the strike price, 50, or 55, or 45. import math import numpy as np import matplotlib.pyplot as plt drift = 0.01 / 252 # Risk-free rate sigma = 0.01 # Std deviation of daily log returns curtime = 1.0 # 1 day init_price = 50.0 # Initial price strike = 50.0 # Strike price # Create an array 21 rows by 1000 columns prices = np.zeros( ( 21, 1000 ) ) for i in range( 0, 1000 ): # All paths start at 50 prices[ 0 ][ i ] = init_price © 2024 Ben Van Vliet 168 for col in range( 0, 1000 ): for row in range( 1, 21 ): # Create 1000 21-day price paths according to geometric Brownian motion prices[ row ][ col ] = prices[ row - 1 ][ col ] * math.exp( drift * curtime - 0.5 * math.pow( sigma, 2 ) * curtime + sigma * np.random.normal( 0, 1, 1 ) ) # If the terminal price is less than the strike, get rid of that price path prices = np.delete( prices, np.where( prices[ 20, : ] < strike ), axis = 1 ) # Print all the terminal prices #print( np.vstack( prices[ 20 ] ) ) # Get the terminal payoffs payoffs = prices[ 20 ] - strike print( np.vstack( payoffs ) ) # What is the average terminal price of these winners? print( "\nAVERAGE PAYOFF:\n\n" + str( np.mean( payoffs ) ) ) print( "\nPRESENT VALUE OF THE AVERAGE:\n\n" + str( np.mean( payoffs ) * math.exp( -drift * 21 ) ) ) plt.plot( prices ) plt.show() 9.2 Value at Risk Risk is a very difficult concept to grasp. Here is the problem in a nutshell (as I see it): Let’s say you have a drawer with 3 red socks and 1 blue sock. What is the probability of picking the blue sock? Easy: 1 / 4 =.25 = 25%. But, that’s not risk. We know the probabilities beforehand. Say there is a drawer with socks, and you draw a green sock. © 2024 Ben Van Vliet 169 What is the probability of picking a blue sock? Uh….. If you lost 1% in the market today, which distribution did that return come from, the narrow one or the wider one? It is true that if we look at many past returns, that may tell us something. However, who’s to say we are picking returns from the same draw as yesterday? We have two perceptions of risk. 1. Risk is the probability and severity of loss. 2. Risk is the dispersion of returns, measured as the width of the distribution σ. 3. Portfolio managers construct their portfolios using the standard deviation as the measure of dispersion, as we have seen. 4. You can calculate the loss probability and severity if you know the distribution. Problem: Probability does not exist. Returns are not actually being drawn from a distribution. Models and probability theory are human creations. What if you don’t know what the distribution of returns looks like? 1. Will returns and correlations in the future be like those in the past? 2. Is the distribution in the future going to be normal? Probably not, especially when derivatives are involved. Ok, so what WILL it look like? 9.2.1 Risk Management What are the factors that affect the value of a portfolio? For large portfolios consisting of securities and derivatives, these are the usual suspects: Stock prices (usually the index), interest rates (or the yield curve), commodity prices, currency exchange rates, and What are the possible scenarios for these factors in the future? © 2024 Ben Van Vliet 170 What are the future correlations among these factors? How much money could we lose in the future given our portfolio? This is not easy to estimate. Typically, we generate all the possible future scenarios for each risk factor. Then, revalue our portfolio for each future scenario. Value at Risk (VaR) is a measure of the loss risk for a portfolio of financial instruments over some period of time. Given a probability (say, 5%), VaR is a measure of how much (say, X%) the portfolio could lose over some time period (say, one month). Firms use VaR to calculate the amount needed to cover possible losses. Regulators require many firms to calculate VaR at regular intervals. There are various ways to calculate VaR. What you’re trying to do is figure out what the distribution of returns will look like over some timeframe. 1. You could use the historical distributions of returns of the portfolio (from the covariance matrix), then you can calculate it directly. 2. You could use options implied volatilities to predict the future dispersion of returns. 3. If you know the exposures of the portfolio to factors (from a covariance matrix), you can forecast the possible changes in the factors, and then calculate the distribution of possible returns. 4. You could use theoretical distributions of returns for Monte Carlo simulation. This allows you to incorporate all kinds of non-linearities or non- normalities, including skewness, kurtosis (or fat-tails), jumps, even © 2024 Ben Van Vliet 171 risks that your models are wrong, or that there are bugs in your software. This is by far the most powerful method of calculating VaR. Conditional Value at Risk (CVaR), or expected tail loss, is a measure of the expected loss for a portfolio given that you’re in the p region. Given a probability (say, 5%), CVaR is a measure of how much you expect to lose (say, E(X%)) given that you end up in the 5% region over some time period (say, one month). import math import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm drift = 0.01 / 252 # Risk-free rate sigma = 0.01 # Std deviation of daily log return curtime = 1.0 # 1 day init_value = 1000000.0 # Initial portfolio value # Create an array 21 rows by 1000 columns values = np.zeros( ( 21, 1000 ) ) for i in range( 0, 1000 ): # All paths start at 1M values[ 0 ][ i ] = init_value for col in range( 0, 1000 ): for row in range( 1, 21 ): # Create 1000 21-day portfolio price paths according to geometric Brownian motion values[ row ][ col ] = values[ row - 1 ][ col ] * math.exp( drift * curtime - 0.5 * math.pow( sigma, 2 ) * curtime + sigma * np.random.normal( 0, 1, 1 ) ) # Get the terminal portoflio values and sort them terminal_values = values[ 20 ].copy() terminal_values.sort() © 2024 Ben Van Vliet 172 for index, value in enumerate( terminal_values ): print( index, value ) # Get the terminal value at index 49, the 5% value, and calculate the log return print( "\nTHE 5% Value-At-Risk IS:\n\n" + str( math.log( terminal_values[ 49 ] / init_value ) ) ) # Because we assumed the portfolio returns are normally distributed, we can find the # same number using the normal inverse cdf function, which in python is ppf() print( "\nTHE 5% Value-At-Risk IS:\n\n" + str( norm.ppf(.05, loc = 0.01 / 12.0, scale =.01 * math.sqrt( 21 ) ) ) ) # Calculate the expected tail loss tail_loss = np.mean( terminal_values[ 0:49 ] ) print( "\nTHE 5% EXPTECTED TAIL LOSS IS:\n\n" + str( math.log( tail_loss / init_value ) )) plt.plot( values ) plt.show() © 2024 Ben Van Vliet 173

Use Quizgecko on...
Browser
Browser