




已阅读5页,还剩19页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter 4: Solving the American Option Numerically 4.1 Finding a Solution Numerically In the absence of any closed form formula for American options, now we are going to solve the American option numerically. And we know that the Black-Scholes partial differential equation (11) must be true for any American option assuming the underlying asset St is a stochastic process with driftand volatility, given riskless rate r. And in order to find the solution for the equation (11) only if we can impose a final condition and boundary condition. These conditions are very important in implementing the numerical methods, especially the binomial numerical methods.Furthermore the Black-Scholes equation can only be solved backward in time. It is obvious that from the no-arbitrage argument that the option can not have any other value at t = T than its payoff. Given the payoff V (ST, T) of the option, we can possible only recover the value for V (ST, T) for t T. Moreover, this PDE requires that we apply condition to the variable S, which has the second partial derivative, and one condition to the variable t, which has only the first partial derivative. The condition with relation to t is the payoff function. The boundary condition with relation to S must specify the value for V in the boundaries of domain of V. since S is defined for , the boundary condition must be specified for S = 0 and for the limit for each t d. Moreover, we assume the existence of a riskless asset with a constant yield r. Thus an investment of S0 at time t = 0 yields S0erT at time t = T. And we must require that S0d S0erT S0u, or d erT u. Furthermore, our goal is to replicate an option written on the risky asset in this assumption. Furthermore, we suppose that the option yields fu and fd if the underlying asset goes up or down, respectively. Consider a portfolio consisting ofunits of the risky asset and units of the risk-less asset forms a replicating portfolio when(27)This is a system of two equations with two unknowns (,). There is a unique solution if an only if, which is indeed from the no-arbitrage requirement of d u. and the solution is Since the option payoff here is arbitrary, any option is replicatable in this model. And also since the option payoff at t = T is equal to that of this portfolio, the value of the portfolio must be equal to that of the option. Denoting the present value of the option by V0:And we assume a new variable The value of the option at t = 0 can be expressed as (28)The no-arbitrage argument S0d S0 S0u means that 0 q 1. Therefore the above formula can be considered to be a certain kind of an expectation formula:(29)where the expectation is taken under the probability measure q. This measure has the special property that if VT is the value of the option at t = T, then using the values for fu; fd in the equation (27) we obtainThe expectation value of the option at future time point is the same as that of the risk-free asset: it is irrelevant whether we buy the option or invest an equivalent amount of money in the risk-free security: we can expect the investment grows at the risk-free rate in either case. Thus this probability measure is called the risk-neutral probability measure. Since the option is always replicatable, we can synthesize the option using long or short positions in the underlying asset and cash, and sell the option. The total value of this portfolio is zero if there is no arbitrage; a non-zero value would indicate an opportunity to make riskless profit.4.2.2 Multi-period modelConsider now a two-period model where the expiry of the option T is divided into two equal time steps T = 2t. As we mentioned before, the risky asset moves upward by a factor of u and downward by a factor of d. This is illustrated in the middle part of the picture 1. This recombining binomial tree has the end asset values (S0u2; S0ud; S0d2) at time t = T = 2t. Suppose now the option payoff function is f(S). Let the three possible values for the option at t = T be then, , Since the tree consists only binomial branches, we can expect to find a value or the option in each node, including the node at t = 0.Assuming no arbitrage and risk-neutrality we can apply the formula (28) to each of the individual branches in this tree to obtain value for the option step by step. At time t =t, the value of the option can be either of the two values, depending on whether the value of the asset jumped initially up or down.Applying the formula once again,(30)And after substituting and, we can rewrite this asIf we assume that we have a N-period binomial tree model, where T =Nt: the above formula becomes to (31)And the payoff at each end node in the N-period model can be expressed as functions of the payoffs in an N+1-period model:(32)4.3 Implementation of Binomial Method4.3.1 Binomial MethodThe binomial method can price the American option valuation relatively easily. When we do the pricing in a binomial tree, we have all possible values of (St, t) available. The decision of whether to exercise or hold the option can be decided at each node. And the option value at that node is then the maximum of the two possible values: 1, hold the optionthe risk-neutral expectation of the option price2, exercise the optionthe value of pay-offAs we discussed before, the present value of the American option in here is much like in the case of European options, which is a sort of a risk-neutral expectation of the yield of the option. Because in some case the binomial tree paths would tell us this is the optimal to exercise early, while others lead to the end nodes. Therefore, in here we could not use the expectation of final payoff alone.The setup is the same as in the case of valuing European options. We will use the same recombining tree model with n + 1 nodes at time t = nt. Letbe the value of the option as defined in. is the value ofAnd also the payoff function is denoted as f(St, t), so the pay off at node (j, n) is .(33)For a plain American put or call option with strike K Put option Call optionAt the end nodes ( at expiry T), the value of the option equation equal to the payoffs at expiry: (34)Thus the previous values at n-1 has two situations, first one is when the option at the expiry time T (end of the nodes), so the value of the option is; Secondly, if the time t = nt, as we mentioned before, we have , and we apply the formula (32), we can obtain the formula for previous value at :, .Chapter 5: Design of C+ Code for American Option5.1 The Basic concepts of implementation in C+Before we can start design the code, we need to fix the underlying mathematics. The point of view we adopt is that a tree is a method approximating the risk-neutral expectation. In particular, we assume that we are pricing a derivative on stock following geometric Brownian motion with a constant. We let the continuously compounding interest rate be r and the continuous dividend rate be d. The dynamics for the stock in the risk-neutral measure are thereforeThe value of a European option with expiry T is then e-rTE(C(S, T)where C(S, T) is the final pay-off.Furthermore, if we price on a binomial tree, we divide time into steps and across each step we assume that the underlying Brownian motion can only move fixed amount up or down. The dynamics of the stock price under geometric Brownian motion are such thatWish to discretize Wt. we have N steps to get from 0 to T. therefore, each time step is length T/N. across step l, we need to approximateThere is one random variable taking precisely two value which has the same mean and variable as N(0, 1) and this variable takeswith probability . We therefore take set of N independent random variable Xj with this distribution, and approximate WlT/N byThis approximation for SlT/N is thenWe notice that the critical point here that since the value of St does not depend on the path of Wt but solely upon its value at time t, it is only the value of Yl that matters not the value of each individual Xj. this is crucial because it means that our tree is recombining. It does not matter whether we go down then up, or up then down. This is not the case if we allow variable volatility, which is why we have assumed is constancy. The nature of martingale pricing means that the value at a given time step is equal to the discounted value at the next time step, thus if we let Sl,k be the value of the stock at time Tl/N if Yl is k, we have that We are going to approximate the continuous martingales with discrete random variables which are almost martingales.Furthermore, the way we calculate the value of C (SN,k) is easy to substitute k into pay-off function5.1.1 The Basic steps of implementation in C+In order to implement the program, there are five main steps we are going to perform in C+1. Create an array of final spot values which are of the form Where j ranges from N to N2. For each of these spot values evaluate the pay-off and store it 3. At the pervious time-slice compute the possible values of spot: these will be of the form Where j ranges from (N-1) to N-1.4. For each of these values of spot, compute the pay-off and take the maximum with the discounted pay-off of the two possible values of spot at the next time.5. we repeat procedures 3 and 4 until the time reach to zero5.2 The design of the C+ CodeAfter examine the mathematics and the algorithms, we are going to design the C+ code for pricing the European option and American option. The reason why we need to price both the European and American option is to make the comparison when we using the same rates.The main idea to design the code is to use the program create the “tree shape” after N steps, then we apply the binomial model to value the pay-off on the single period of the tree. Finally, we repeat the valuation of the binomial model again and again until we reach the time equal to zero.Moreover, there are three main goals we have to achieve, while designing the code:1. Discretisation of Wt2. Determine the final pay-off of the option3. Rule for deciding the value of an option at point in the tree given spot and the discounted future value of the option. The first of these concepts decides the shape of the tree, whereas the second and third are properties of the option. Therefore there is an obvious orthogonalization: first of all, we need to design a tree class which can handle the discretization. Secondly, we need a class which deals with the final pay-off and the rule at previous times. Thus, we define options on tree via an abstract base class which has three defining methods:1. Finaltime indicates the expiry time of the option.2. FianlPayoff gives the final pay-off as a function of spot.3. preFinalValue gives the value at a point in the tree as a function of spot, time and the discounted future value of the optionBy defining the option class in this fashion, we have not allowed the program to know anything about interest rates nor the process of the underlying. This means it can be used in any tree-like structure provided the structure is always in a position to let it know own discounted future value. Moreover, there are two aspects of the tree: the placement of the nodes of the tree and the computing of the option value at each of the nodes. Whilst we could further orthogonalize and define separate classes for each of these, we write a single class to do the binomial tree which takes in an option as an argument. An import point to note is that as the placement of the nodes does not depend upon the option, we can save ourselves time if we want to price several options by placing the nodes once and then pricing all the options on the same tree. Given this fact we design our tree class in such a way that the tree is built once and then any option can be valued on the tree via separate method. The way we write the codes is to define six classes first, which perform different kinds of the job. And every each class is sorted into to header file respectively. The reason is that if we put the code of large functions in the class definition can lead to some very large, unwieldy class definitions. Finally, we include all the header files together to complete the whole program for pricing. The program can be completed by five steps, and we are going to explain how the program code is built step by step.5.3.1 Step 1 Valuation classAs we discussed before, we decide to model the tree and price the option separately. We develop a class hierarchy for the options we can value on tree. And we are going to use an abstract base class to define an interface, the name of class we define is called Valuation. By writing a header at first, we write the FinalTime to be the only data member in the class, and we provide a GetFinalTime to allow its value to be read. Because of American option has an expiry time, therefore we need to design the program has a time of expiry, thus we are implicitly disallowing the perpetual option.The next thing we need to do is let the Valuation class become virtually copyable, and the method we are going to use is called a virtual copy constructor. The method is generally given the name clone. After using the clone, the Valuation class will become virtually copyable, and also the method ensures the absence of memory leaks after virtual copying. To perform this method, we simply add pure virtual method to the class by:Virtual Valuation* clone() const=0;And the remaining methods are pure virtual and specify the value of the product at expiry and at previous times as we discussed aboveThe header file of (Valuation.h) shown in the Appendix.5.3.2 Step 2 PayOff & PayOffBridge ClassAfter determine the value of the option, the next thing we need to do is the let the program to determine the pay-off function. And the class we are going to define is called PayOff. As the class name say, we use it to work out the value of pay-off. First of all, the implement of class would be use enum to distinguish different sorts of pay-offs. And the constructor in the class will be PayOff(double Strike_, OptionType TheOptionType_)Take in the strike of the option and the type of the option pay-off.Secondly, The main method we are going to use in this class is Double PayOff:operator()(double spot) constAnd the code we are using for determine the payoff of call or put are return max(spot-strike, 0.0)for call optionreturn max(strike-spot, 0.0)for put optionThe purpose of define the PayOff is that a value of spot, it returns the value of the pay-off.To call this method for an object thePayOff with spot given by S we would write the thePayOff(S). and we are going to define operator() to be const. this means that the method does not modify the state of the object, which means we compute the pay-off will not change the strike or the type of an option. There are two reasons why we use const. At first, it is safety enforcement mechanism. A second benefit is that by giving the compiler the extra information that objects are const, we allow it to make extra optimization.Furthermore, we use the clone method again to make the payoff class to be virtually copyable.For example the code for call pay-off is PayOff* PayOffCall:clone() constReturn new PayOffCall(*this)The statement new PayOffCall(*this), says create a copy of the object for which the clone method has been called, as the this pointer always points to the object being called. The call to clone is then a call to the copy constructor of PayOffCall which return a copy of the original PayOffCall, and because the operator new has been used, we can be sure that the object will continue to exist. Moreover we have made the return type of clone PayOff* which is a pointer to the base class object. We are able to change the return type of PayOffCall*, as it is permissible according to change the return type of a virtual function from a base class pointer to pointer to the inherited class. As inherited class pointers can always be converted into base class pointer. And the code of PayOff class are shown in Appendix.After defining the PayOff class, we have achieved that let the option to store its own copy of the pay-off. However, there is still one aspect of our implementation which is slightly annoyingwe need to write special code to handle assignment, construction and destruction. Every time we want to write a class with these properties, we will have to do the same thing again and again. What we would really like is a payoff class that has polymorphic feature that our class does, whilst taking care of its own memory manageme
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 哈尔滨施工方案汇报会
- 搪瓷花版饰花工专业技能考核试卷及答案
- 福州台江装修方案咨询
- 风电场施工合同履行风险分析报告
- 活动策划方案流程图片
- 户外建筑写生教学方案设计
- 江苏咖啡店营销方案模板
- 建筑亮化照明方案设计
- 药品质量安全培训考题课件
- 威宁景点活动策划方案范文
- 2024年指标房转让买卖合同范本
- 排球课教案完整版本
- 2024土建工程承包合同范
- 广东高职高考数学题分类
- 掘进支护安全培训课件
- 新概念二单词表
- 《雅思阅读技巧》课件
- 《建筑工程测量》教学教案
- 《影视美学教学》课件
- 小学道德与法治-主动拒绝烟酒与毒品(第一课时)教学设计学情分析教材分析课后反思
- 《工会固定资产管理办法》中华全国总工会办公厅印发
评论
0/150
提交评论