# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

# stockoptspec

Specify European stock option structure

## Syntax

```[StockOptSpec] = stockoptspec(OptPrice,Strike,Settle,Maturity,OptSpec,InterpMethod) ```

## Arguments

 `OptPrice` `NINST`-by-`1` vector of European option prices. `Strike` `NINST`-by-`1` vector of strike prices. `Settle` Scalar date marking the settlement date. `Maturity` `NINST`-by-`1` vector of maturity dates. `OptSpec` `NINST`-by-`1` cell array of character vectors `'call'` or `'put'`. `InterpMethod` (Optional) Method of interpolation to use for option prices. `InterpMethod` is `[{'price'} | 'vol']`. The default is `'price'`. By specifying `'vol'`, implied volatilities are used for interpolation purposes. The interpolated values are then used to calculate the implicit interpolated prices.

## Description

`[StockOptSpec] = stockoptspec(OptPrice,Strike,Settle,Maturity,OptSpec,InterpMethod)` creates a structure encapsulating the properties of a stock option structure.

## Examples

collapse all

This example shows how to specify a European stock option structure using the following data quoted from liquid options in the market with varying strikes and maturity.

```Settle = '01/01/06'; Maturity = ['07/01/06'; '07/01/06'; '07/01/06'; '07/01/06'; '01/01/07'; '01/01/07'; '01/01/07'; '01/01/07'; '07/01/07'; '07/01/07'; '07/01/07'; '07/01/07'; '01/01/08'; '01/01/08'; '01/01/08'; '01/01/08']; Strike = [113; 101; 100; 88; 128; 112; 100; 78; 144; 112; 100; 69; 162; 112; 100; 61]; OptPrice =[ 0; 4.807905472659144; 1.306321897011867; 0.048039195057173; 0; 2.310953054191461; 1.421950392866235; 0.020414826276740; 0; 5.091986935627730; 1.346534812295291; 0.005101325584140; 0; 8.047628153217246; 1.219653432150932; 0.001041436654748]; OptSpec = { 'call'; 'call'; 'put'; 'put'; 'call'; 'call'; 'put'; 'put'; 'call'; 'call'; 'put'; 'put'; 'call'; 'call'; 'put'; 'put'}; StockOptSpec = stockoptspec(OptPrice, Strike, Settle, Maturity, OptSpec)```
```StockOptSpec = struct with fields: FinObj: 'StockOptSpec' OptPrice: [16x1 double] Strike: [16x1 double] Settle: 732678 Maturity: [16x1 double] OptSpec: {16x1 cell} InterpMethod: 'price' ```

## See Also

#### Introduced in R2007a

Was this topic helpful?

Download ebook