Up and out call option matlab

Up and out call option matlab

Posted: inkorisa On: 21.07.2017

Translated by Mouseover text to see original. Click the button below to return to the English verison of the page. This page has been translated by MathWorks.

Please click here To view all translated materals including this page, select Japan from the country navigator on the bottom of this page. The automated translation of this page is provided by a general purpose third party translator tool. MathWorks does not warrant, and disclaims all liability for, the accuracy, suitability, or fitness for purpose of the translation. Calculate barrier option prices or sensitivities using finite difference method.

Calculate the Price , Delta , and Theta of a European Down and Out call option using the finite difference method. Interest-rate term structure annualized and continuously compounded , specified by the RateSpec obtained from intenvset. For information on the interest-rate specification, see intenvset.

Price European barrier options using Black-Scholes option pricing model - MATLAB barrierbybls - MathWorks France

Stock specification for the underlying asset. For information on the stock specification, see stockspec. For example, for physical commodities the price is StockSpec. Asset , the volatility is StockSpec. Sigma , and the convenience yield is StockSpec. Definition of an option as 'call' or 'put' , specified as a character vector or string object with values 'call' or 'put'.

Settlement or trade date for the barrier option, specified as a serial date number, a date character vector, or a datetime object. Option exercise dates, specified as a nonnegative scalar integer, a date character vector, or datetime object:. For a European option, use a 1 -by- 1 vector of dates.

For a European option, there is only one ExerciseDates on the option expiry date which is the maturity of the instrument. For an American option, use a 1 -by- 2 vector of exercise date boundaries. The option can be exercised on any date between or including the pair of dates on that row. If only one non- NaN date is listed, or if ExerciseDates is a 1 -by- 1 vector of serial date numbers or a cell array of date character vectors, the option can be exercised between Settle and the single listed date in ExerciseDates.

This option becomes effective when the price of the underlying asset passes above the barrier level. Note, barrierbyfd does not support American knock-in barrier options. This option terminates when the price of the underlying asset passes above the barrier level. Usually, with an up-and-out option, the rebate is paid if the spot price of the underlying reaches or exceeds the barrier level. This option becomes effective when the price of the underlying stock passes below the barrier level. With a down-and-in option, the rebate is paid if the spot price of the underlying does not reach the barrier level during the life of the option.

This option terminates when the price of the underlying security passes below the barrier level. Usually the option holder receives a rebate amount if the option expires worthless. Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value.

Name must appear inside single quotes ' '. You can specify several name and value pair arguments in any order as Name1,Value1, Rebate value, specified as a scalar integer.

Calculate barrier option prices or sensitivities using finite difference method - MATLAB barriersensbyfd - MathWorks France

For Knock In options, the rebate is paid at expiry. For Knock Out options, the rebate is paid when the barrier is reached. Define outputs, specifying a NOUT - by- 1 or a 1 -by- NOUT cell array of character vectors with possible values of 'Price' , 'Delta' , 'Gamma' , 'Vega' , 'Lambda' , 'Rho' , 'Theta' , and 'All'. This is the same as specifying OutSpec to include each sensitivity.

Option type, specified as NINST -by- 1 positive integer scalar flags with values:. Expected prices or sensitivities defined using OutSpec for barrier options, returned as a NINST -by- 1 matrix.

The number of columns does not have to be equal to the TimeGridSize , because ex-dividend dates in the StockSpec are added to the time grid. Prices of the asset defined by the StockSpec corresponding to the first dimension of PriceGrid , returned as a vector.

Times corresponding to the second dimension of the PriceGrid , returned as a vector. A rebate is a fixed amount that is paid if the option cannot be exercised because the barrier level has been reached or not reached. The payoff for this type of option depends on whether the underlying asset crosses the predetermined trigger value barrier level , indicated by Barrier , during the life of the option. Options, Futures and Other Derivatives. Prentice Hall, , pp. Run the command by entering it in the MATLAB Command Window.

Web browsers do not support MATLAB commands.

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: Contacts Comment acheter Se connecter. Documentation Home Financial Instruments Toolbox Examples Functions and Other Reference Release Notes PDF Documentation. This is machine translation Translated by. Select Language Bulgarian Catalan Chinese Simplified Chinese Traditional Czech Danish Dutch English Estonian Finnish French German Greek Haitian Creole Hindi Hmong Daw Hungarian Indonesian Italian Japanese Korean Latvian Lithuanian Malay Maltese Norwegian Polish Portuguese Romanian Russian Slovak Slovenian Spanish Swedish Thai Turkish Ukrainian Vietnamese Welsh.

Examples collapse all Calculate Price and Sensitivities for a Barrier Down and Out Call Option Using Finite Difference Method. Maturity, 'Rates' ,Rate, 'Compounding' ,-1, 'Basis' ,Basis.

Maturity, BarrierSpec,Barrier, 'Outspec' ,OutSpec. Input Arguments collapse all RateSpec — Interest-rate term structure structure. StockSpec — Stock specification for underlying asset structure. OptSpec — Definition of option character vector with values 'call' or 'put' string object with values 'call' or 'put'.

Strike — Option strike price value integer. Option strike price value, specified as an integer. Settle — Settlement or trade date serial date number date character vector datetime object.

ExerciseDates — Option exercise dates nonnegative scalar integer date character vector datetime object. Option exercise dates, specified as a nonnegative scalar integer, a date character vector, or datetime object: BarrierSpec — Barrier option type character vector with values: Barrier option type, specified as a character vector with the following values: Barrier — Barrier value scalar integer.

Barrier value, specified as a scalar integer. Size of the asset grid used for a finite difference grid, specified as a positive scalar.

up and out call option matlab

Size of the time grid used for a finite difference grid, specified as a positive scalar. Option type, specified as NINST -by- 1 positive integer scalar flags with values: Output Arguments collapse all PriceSens — Expected prices or sensitivities values for barrier options matrix. PriceGrid — Grid containing prices calculated by finite difference method grid. AssetPrices — Prices of the asset defined by StockSpec vector. Times — Times corresponding to second dimension of PriceGrid vector.

Limitations barriersensbyfd does not support American knock-in barrier options. More About collapse all Barrier Option A Barrier option has not only a strike price but also a barrier level and sometimes a rebate. See Also barrierbybls barrierbyfd barrierbyls barriersensbybls barriersensbyls Topics Barrier Option Supported Equity Derivatives. You clicked a link that corresponds to this MATLAB command: Was this topic helpful? Select Your Country Choose your country to get translated content where available and see local events and offers.

Americas Canada English United States English. Financial Instruments Toolbox Documentation Examples Functions and Other Reference Release Notes PDF Documentation. Other Documentation MATLAB Financial Toolbox Risk Management Toolbox Statistics and Machine Learning Toolbox Optimization Toolbox Documentation Home. Support MATLAB Answers Installation Help Bug Reports Product Requirements Software Downloads.

Rating 4,7 stars - 525 reviews
inserted by FC2 system