1. Trang chủ
  2. » Công Nghệ Thông Tin

Financial Toolbox For Use with MATLAB Computation Visualization Programming phần 4 pdf

40 426 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Financial Toolbox For Use With MATLAB Computation Visualization Programming Phần 4
Trường học University of XYZ
Chuyên ngành Finance
Thể loại bài báo
Năm xuất bản 2023
Thành phố Hanoi
Định dạng
Số trang 40
Dung lượng 176,74 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

2-22 VolatilityCurve required Curve of instantaneous yearly volatilities of the short rates.The curve isinterpolated to cover the time span of the bond.. risk-free interest rate is 11%,

Trang 1

2-22

VolatilityCurve (required) Curve of instantaneous yearly

volatilities of the short rates.The curve isinterpolated to cover the time span of the bond

Accuracy (required) Scalar that specifies the number of

steps in the tree per coupon period Largernumbers yield more accurate answers, but requiremore time and memory

CreditCurve (optional) Curve of rate spreads arising from

default risk The curve hasNCURVE3(date, basispoint) pairs.The curve is interpolated to cover thetime span of the bond

ComputeSensitivity (optional) Specify if bond sensitivity measures

(with and without options) are to be computed.1

indicates measure computed;0indicates notcomputed Sensitivities found by a finitedifference calculation The default is nosensitivities, only prices returned

ComputeSensitivity.Duration: (required) scalar

1or0

ComputeSensitivity.Convexity: (required)scalar1or0

ComputeSensitivity.Vega: (required) scalar1or

0

Trang 2

ZeroCurve, VolatilityCurve, Accuracy, CreditCurve, ComputeSensitivity) computes price and sensitivity measures of a bond withembedded call or put options Valuation is based on the Black-Derman-Toymodel for pricing interest rate options given an input yield curve (and possibly

a credit spread) and volatility curve

Priceis the value of the bond with and without the options

Price.OptionFreePrice: Scalar price of the bond without any options

Price.OptionEmbedPrice: Scalar price (value to the holder of the bond) of thebond with options

Price.OptionValue: scalar value of the options to the holder of the bond

Sensitivitiesrefer to the effect that changes in the yield curve and volatilityterm structure have on option-free and option-embedded bond prices

Sensitivities.Duration: Sensitivity of option-free bond price to parallelshifts of the yield curve

Sensitivities.EffDuration: Sensitivity of the option-embedded price toshifts in the yield curve

Sensitivities.Convexity: Sensitivity ofDurationto shifts in the yield curve

Sensitivities.EffConvexity: Sensitivity ofEffDurationto shifts in the yieldcurve

Sensitivities.Vega: Sensitivity of the option-embedded price to parallelshifts of the volatility curve

DiscTreeis the recombining binomial tree of the interest rate structure Thetree coversNPERIODStimes fromSettlementtoMaturity, where there are

Accuracysteps in each coupon period The short rate at settlement andbetween settlement and the first time is deterministic

DiscTree.Values:NSTATES-by-NPERIODSmatrix of short discount factors The

NPERIODScolumns ofValuescorrespond to successive times TheNSTATESrowscorrespond to states in the rate process Unused states are masked byNaN

Trang 3

2-24

Multiplication of a cash amount at timeDates(i)by the discountValues(j,i)

gives the price atDates(i-1)after traversing the(j,i)edge of the tree Theshort rateR(j,i)prevailing at node(j,i)satisfies:

( 1 + R(j,i)/Frequency)^(-(Times(j)-Times(j-1))) = Values(j,i) DiscTree.Times:1-by-NPERIODSvector of tree node times in units of couponintervals (Typehelp ftbTFactorsfor more information.)

DiscTree.Dates:1-by-NPERIODSvector of tree node times as serial datenumbers

DiscTree.Type:'Short Discount' DiscTree.Frequency: Compounding frequency of the input bond

DiscTree.ErrorFlag:(0or1) Set to1if any short rate becomes negative

PriceTreeis the recombining binomial tree of cash amounts at tree nodes

PriceTreeis computed from the bond cash flows and the option payoffs Theclean price of the bond is thePriceTreevalue minus the coupon payment andthe accrued interest

PriceTree.Values:NSTATES-by-NPERIODSmatrix of price states

PriceTree.Times:1-by-NPERIODSvector of tree node times in units of couponintervals (Typehelp ftbTFactorsfor more information.)

PriceTree.Dates:1-by-NPERIODSvector of tree node times as serial datenumbers

PriceTree.AccrInt:1-by-NPERIODSvector of accrued interest payable at eachtime

PriceTree.Coupons:1-by-NPERIODSvector of coupon payments at each time

Trang 4

Specify an American put option on the bond Make the bond putable by the

holder between 15-Jan-1997 and maturity for a strike of 98

Trang 5

[Price, Sensitivities, DiscTree, PriceTree] =

bdtbond(OptBond, ZeroCurve, VolCurve, Accuracy, CreditCurve, SensChoice);

Price = OptionFreePrice: 96.5565OptionEmbedPrice: 97.1769OptionValue: 0.6204 Sensitivities = Duration: 1.3959 EffDuration: 0.6848 Convexity: NaN EffConvexity: NaN Vega: -0.0194

To look at the rate and clean price trees, use thebdttransfunction

bdttrans(DiscTree)bdttrans(PriceTree)

Trang 6

Rate tree, or a Price tree structure to a Clean Price tree The output is a matrix

of tree node values and a vector of node times

TreeMatis anNSTATES-by-NTIMESconverted matrix of Short Rate or CleanPrice values at points on the tree Time layers are columns containing thedifferent states Unused entries of the matrix are screened withNaNs

TreeTimesis a1-by-NTIMESvector of times corresponding to layers ofTreeMat

Ifbdttransis called without output arguments, it plots the translated treeagainst the time axis in coupon intervals

Trang 7

Run thebdtbondfunction.

[Price, Sensitivities, DiscTree, PriceTree] = bdtbond(OptBond, ZeroCurve, VolCurve, Accuracy);

Convert the discount tree to a short rate tree

DiscTree = Values: [6x7 double]

Times: [0 0.5000 1 1.5000 2 2.5000 3]

Dates: [729221 729313 729405 729496 729586 729678 729770]

ErrorFlag: 0Type: 'Short Discount'Frequency: 2

[ShortRateMat, TreeTimes] = bdttrans(DiscTree)ShortRateMat =

TreeTimes =

0 0.5000 1.0000 1.5000 2.0000 2.5000 3.0000

0.0500 0.0500 0.0447 0.0399 0.0357 0.0319 0.0285NaN NaN 0.0554 0.0494 0.0442 0.0395 0.0353NaN NaN NaN 0.0613 0.0548 0.0489 0.0437NaN NaN NaN NaN 0.0679 0.0607 0.0542NaN NaN NaN NaN NaN 0.0753 0.0672

Trang 8

Convert the Price tree to a Clean Price tree

PriceTree = Values: [6x7 double]

Times: [0 0.5000 1 1.5000 2 2.5000 3]

Dates: [729221 729313 729405 729496 729586 729678 729770]

ErrorFlag: 0AccrInt: [0 1.7500 0 1.7597 0 1.7500 0]

Coupons: [0 0 3.5000 0 3.5000 0 3.5000]

Type: 'Price'[CleanPriceMat, TreeTimes] = bdttrans(PriceTree)CleanPriceMat =

Trang 9

2-30

2beytbill

be earlier than or equal tomd

md Maturity date Enter as serial date number or date string

disc Discount rate of the Treasury bill Enter as decimal fraction

Treasury bill

is August 6, 1992, and the discount rate is 3.77% The bond equivalent yield:

y = beytbill('2/10/1992', '8/6/1992', 0.0377)

y = 0.0389

Trang 10

2binprice

x Option exercise price A scalar

r Risk-free interest rate A scalar Enter as a decimal fraction

t The option’s time until maturity in years A scalar

dt The time increment withint A scalar.dtis adjusted so that the length

of each interval is consistent with the maturity time of the option (dtisadjusted so thattdivided bydtequals an integer number of

increments.)

sig The asset’s volatility A scalar

flag Specifies whether the option is a call (flag = 1) or a put (flag = 0) Ascalar

q The dividend rate, as a decimal fraction A scalar Default =0 If youenter a value forq, setdivandexdiv=0or do not enter them If youenter values fordivandexdiv, setq=0

div The dividend payment at an ex-dividend date,exdiv A 1-by-N vector.For each dividend payment, there must be a corresponding ex-dividenddate Default =0 If you enter values fordivandexdiv, setq=0

exdiv Ex-dividend date, specified in number of periods A 1-by-N vector

Default =0

prices an option using a binomial pricing model

interest rate is 10%, option matures in 5 months, volatility is 40%, and there isone dividend payment of $2.06 in 3-1/2 months:

[pr, opt] = binprice(52, 50, 0.1, 5/12, 1/12, 0.4, 0, 0, 2.06, 3.5)

Trang 11

2-32

returns the asset price and option value at each node of the binary tree:

pr = 52.0000 58.1367 65.0226 72.7494 79.3515 89.0642

Trang 12

2blkprice

You can extend Black’s model to interest-rate derivatives (call and putoptions embedded in bonds) by calculating the forward price from theequation

f = (B - I) * exp(r*t)

whereBis the face value of the bond andIis the present value of thecoupons during the life of the option

x Strike or exercise price of the options Must be greater than 0

r Risk-free interest rate (plus storage costs less any convenience yield)

Must be greater than or equal to 0

t Time until maturity of option in years Must be greater than 0

sig Volatility of the price of the underlying asset Must be greater than orequal to 0

option and returns thecallandputoption prices

Note: This function usesnormcdf, the normal cumulative distributionfunction in the Statistics Toolbox

risk-free interest rate is 11%, the time to maturity of the option is 3 years, andthe volatility of the bond price is 2.5%

[call, put] = blkprice(95, 98, 0.11, 3, 0.025)call =

0.4162 (or $0.42)

put = 2.5729 (or $2.57)

Trang 14

2blsdelta

[cd, pd] = blsdelta(so, x, r, t, sig)

x Exercise price

r Risk-free interest rate Enter as a decimal fraction

t Time to maturity of the option, in years

sig Standard deviation of the annualized continuously compounded rate ofreturn of the stock, also known as volatility

q Dividend rate or foreign interest rate where applicable Enter as adecimal fraction Default =0

value to change in the underlying security price Delta is also known as thehedge ratio cdis the delta of a call option, andpdis the delta of a put option

Note: This function uses normcdf, the normal cumulative distributionfunction in the Statistics Toolbox

cd = 0.5955

pd = -0.4045

Trang 15

2-36

2blsgamma

g = blsgamma(so, x, r, t, sig)

x Exercise price

r Risk-free interest rate Enter as a decimal fraction

t Time to maturity of the option in years

sig Standard deviation of the annualized continuously compounded rate ofreturn of the stock (also known as the volatility)

q Dividend rate Enter as a decimal fraction Default= 0

delta to change in the underlying security price

Note: This function usesnormpdf, the normal probability density function inthe Statistics Toolbox

g = 0.0512

Trang 16

2blsimpv

v = blsimpv(so, x, r, t, call)

x Exercise price

r Risk-free interest rate Enter as a decimal fraction

t Time to maturity in years

call Call option value

maxiter Maximum number of iterations used in solving forvusing Newton’s

method Default =50

of an underlying asset, using Newton’s method

Note: This function usesnormcdfandnormpdf, the normal cumulativedistribution and normal probability density functions in the StatisticsToolbox

interest rate is 7.5%, the time to maturity of the option is 0.25 years, and thecall option has a value of $10.00

v = blsimpv(100, 95, 0.075, 0.25, 10)

v = 0.3130 (or 31.3%)

Trang 17

2-38

2blslambda

[lc, lp] = blslambda(so, x, r, t, sig)

x Exercise price

r Risk-free interest rate Enter as a decimal fraction

t Time to maturity of the option in years

sig Standard deviation of the annualized continuously compounded rate ofreturn of the stock (also known as the volatility)

q Dividend rate Enter as a decimal fraction Default= 0

option lcis the call option elasticity or leverage factor, andlpis the put optionelasticity or leverage factor Elasticity (the leverage of an option position)measures the percent change in an option price per one percent change in theunderlying stock price

Note: This function usesnormcdf, the normal cumulative distributionfunction in the Statistics Toolbox

lc = 8.1274

lp = -8.6466

Trang 18

2blsprice

[call, put] = blsprice(so, x, r, t, sig)

x Exercise price

r Risk-free interest rate Enter as a decimal fraction

t Time to maturity of the option in years

sig Standard deviation of the annualized continuously compounded rate ofreturn of the asset (also known as the volatility)

q Dividend rate of the asset Enter as a decimal fraction Default= 0

and put options using the Black-Scholes pricing formula

Note: This function usesnormcdf, the normal cumulative distributionfunction in the Statistics Toolbox

risk-free interest rate is 10%, the time to maturity of the option is 0.25 years,and the standard deviation of the asset is 50%

[call, put] = blsprice(100, 95, 0.1, 0.25, 0.5)call =

13.70put =

Trang 19

2-40

2blsrho

[cr, pr]= blsrho(so, x, r, t, sig, q)

x Exercise or strike price

r Interest rate Enter as a decimal fraction

t Time to maturity of the option in years

sig Standard deviation of the annualized continuously compounded rate ofreturn of the security (also known as the volatility)

q Dividend rate of the security Enter as a decimal fraction Default= 0

and the put option rhopr Rho is the rate of change in value of securities withrespect to interest rates

Note: This function usesnormcdf, the normal cumulative distributionfunction in the Statistics Toolbox

cr = 6.6686

pr = -5.4619

Trang 20

2blstheta

[ct, pt] = blstheta(so, x, r, t, sig)

x Exercise price

r Risk-free interest rate Enter as a decimal fraction

t Time to maturity of the option in years

sig Standard deviation of the annualized continuously compounded rate ofreturn of the stock (also known as the volatility)

q Dividend rate Enter as a decimal fraction Default= 0

ct, and the put option thetapt Theta is the sensitivity in option value withrespect to time

Note: This function usesnormpdf, the normal probability density functionandnormcdf, the normal cumulative distribution function in the StatisticsToolbox

ct = -8.9630

pt = -3.1404

Trang 21

2-42

2blsvega

vega = blsvega(so, x, r, t, sig)

x Exercise price

r Risk-free interest rate Enter as a decimal fraction

t Time to maturity of the option in years

sig Standard deviation of the annualized continuously compounded rate ofreturn of the stock (also known as the volatility)

q Dividend rate Enter as a decimal fraction Default= 0

the option value with respect to the volatility of the underlying asset

Note: This function usesnormpdf, the normal probability density function inthe Statistics Toolbox

vega = 9.6035

Trang 22

2bndprice

Period, Basis, EndMonthRule, IssueDate, FirstCouponDate, LastCouponDate, StartDate, Face)

numbers or date strings Fill unspecified entries in input vectors withNaN.Optional arguments can be passed as the empty matrix[]

Yield (required) Bond equivalent yield to maturity with

semi-annual compounding

CouponRate (required) Decimal number indicating the annual

percentage rate used to determine the couponspayable on a bond

Settle (required) Settlement date A vector of serial date

numbers or date strings.Settlemust be earlier than

or equal toMaturity

Maturity (required) Maturity date A vector of serial date

numbers or date strings

Period Coupons per year of the bond A vector of integers

Allowed values are1,2,3,4,6, and12 Default =2

Basis Day-count basis of the bond A vector of integers

0= actual/actual (default),1= 30/360,2= actual/360,

3= actual/365

EndMonthRule End-of-month rule A vector This rule applies only

whenMaturityis an end-of-month date for a monthhaving 30 or fewer days.0= ignore rule, meaning that

a bond’s coupon payment date is always the samenumerical day of the month.1= set rule on (default),meaning that a bond’s coupon payment date is alwaysthe last actual day of the month

IssueDate Date when a bond was issued

Ngày đăng: 12/08/2014, 16:22

TỪ KHÓA LIÊN QUAN