# basketbyju

Price European basket options using Nengjiu Ju approximation model

## Description

## Examples

### Price European Basket Options Using Nengjiu Ju Approximation Model

Find a European call basket option of two stocks. Assume that the stocks are currently trading at $10 and $11.50 with annual volatilities of 20% and 25%, respectively. The basket contains one unit of the first stock and one unit of the second stock. The correlation between the assets is 30%. On January 1, 2009, an investor wants to buy a 1-year call option with a strike price of $21.50. The current annualized, continuously compounded interest rate is 5%. Use this data to compute the price of the call basket option with the Nengjiu Ju approximation model.

Settle = datetime(2009,1,1); Maturity = datetime(2010,1,1); % Define the RateSpec. Rate = 0.05; Compounding = -1; RateSpec = intenvset('ValuationDate', Settle, 'StartDates', ... Settle, 'EndDates', Maturity, 'Rates', Rate, 'Compounding', Compounding); % Define the Correlation matrix. Correlation matrices are symmetric and % have ones along the main diagonal. Corr = [1 0.30; 0.30 1]; % Define the BasketStockSpec. AssetPrice = [10;11.50]; Volatility = [0.2;0.25]; Quantity = [1;1]; BasketStockSpec = basketstockspec(Volatility, AssetPrice, Quantity, Corr); % Compute the price of the call basket option. OptSpec = {'call'}; Strike = 21.5; PriceCorr30 = basketbyju(RateSpec, BasketStockSpec, OptSpec, Strike, Settle, Maturity)

PriceCorr30 = 2.1221

Compute the price of the basket instrument for these two stocks with a correlation of 60%. Then compare this cost to the total cost of buying two individual call options.

Corr = [1 0.60; 0.60 1]; % Define the new BasketStockSpec. BasketStockSpec = basketstockspec(Volatility, AssetPrice, Quantity, Corr); % Compute the price of the call basket option with Correlation = -0.60 PriceCorr60 = basketbyju(RateSpec, BasketStockSpec, OptSpec, Strike, Settle, Maturity)

PriceCorr60 = 2.2757

The following table summarizes the sensitivity of the option to correlation changes. In general, the premium of the basket option decreases with lower correlation and increases with higher correlation.

Compute the cost of two vanilla 1-year call options using the Black-Scholes (BLS) model on the individual assets:

```
StockSpec = stockspec(Volatility, AssetPrice);
StrikeVanilla= [10;11.5];
PriceVanillaOption = optstockbybls(RateSpec, StockSpec, Settle, Maturity,...
OptSpec, StrikeVanilla)
```

`PriceVanillaOption = `*2×1*
1.0451
1.4186

Find the total cost of buying two individual call options.

sum(PriceVanillaOption)

ans = 2.4637

The total cost of purchasing two individual call options is $2.4637, compared to the maximum cost of the basket option of $2.27 with a correlation of 60%.

## Input Arguments

`BasketStockSpec`

— `BasketStock`

specification

structure

`BasketStock`

specification, specified using `basketstockspec`

.

**Data Types: **`struct`

`OptSpec`

— Definition of option

character vector with values `'call'`

or
`'put'`

| cell array of character vectors with values `'call'`

or
`'put'`

Definition of the option as `'call'`

or
`'put'`

, specified as a character vector or a
`2`

-by-`1`

cell array of character
vectors.

**Data Types: **`char`

| `cell`

`Strike`

— Option strike price value

scalar numeric | vector

Option strike price value, specified as one of the following:

For a European or Bermuda option,

`Strike`

is a scalar (European) or`1`

-by-`NSTRIKES`

(Bermuda) vector of strike prices.For an American option,

`Strike`

is a scalar vector of the strike price.

**Data Types: **`double`

`Settle`

— Settlement or trade date

datetime scalar | string scalar | date character vector

Settlement or trade date for the basket option, specified as a scalar datetime, string, or date character vector.

To support existing code, `basketbyju`

also
accepts serial date numbers as inputs, but they are not recommended.

`Maturity`

— Maturity date

datetime scalar | string scalar | date character vector

Maturity date for the basket option, specified as a scalar datetime, string, or date character vector.

To support existing code, `basketbyju`

also
accepts serial date numbers as inputs, but they are not recommended.

## Output Arguments

`Price`

— Expected price for basket option

numeric

Expected price for basket option, returned as a numeric.

## More About

### Basket Option

A *basket option* is an option on a portfolio
of several underlying equity assets.

Payout for a basket option depends on the cumulative performance of the collection of the individual assets. A basket option tends to be cheaper than the corresponding portfolio of plain vanilla options for these reasons:

If the basket components correlate negatively, movements in the value of one component neutralize opposite movements of another component. Unless all the components correlate perfectly, the basket option is cheaper than a series of individual options on each of the assets in the basket.

A basket option minimizes transaction costs because an investor has to purchase only one option instead of several individual options.

For more information, see Basket Option.

## References

[1] Nengjiu Ju. “Pricing
Asian and Basket Options Via Taylor Expansion.” *Journal of Computational
Finance.* Vol. 5, 2002.

## Version History

**Introduced in R2009b**

### R2022b: Serial date numbers not recommended

Although `basketbyju`

supports serial date numbers,
`datetime`

values are recommended instead. The
`datetime`

data type provides flexible date and time
formats, storage out to nanosecond precision, and properties to account for time
zones and daylight saving time.

To convert serial date numbers or text to `datetime`

values, use the `datetime`

function. For example:

t = datetime(738427.656845093,"ConvertFrom","datenum"); y = year(t)

y = 2021

There are no plans to remove support for serial date number inputs.

## MATLAB 명령

다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.

명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

## How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

### Americas

- América Latina (Español)
- Canada (English)
- United States (English)

### Europe

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)