optionchain
Retrieve Money.Net option symbols
Syntax
Description
Examples
Retrieve Option Symbols for Specified Symbol
Create Money.Net connection c
using
a user name and password.
username = 'user@company.com'; pwd = '999999'; c = moneynet(username,pwd);
Retrieve option symbols o
for the symbol IBM®.
s = 'IBM';
o = optionchain(c,s);
o
is a cell array of character vectors. Each
character vector is an option symbol.
Display the first three option symbols.
o(1:3)
ans = 3×1 cell array 'O:IBM\16Q13\130 .0' 'O:IBM\16E27\148 .0' 'O:IBM\16Q20\138 .0'
Retrieve current data for the first option symbol o(1)
and
display it. Specify fields f
for describing the
option symbol:
Option symbol description
Option symbol strike
Option symbol expiration date
symbol = o(1); f = {'Description','Strike','Expiration'}; d = getdata(c,symbol,f)
d = Symbol Description Strike Expiration ____________________ ___________________________ ______ __________ 'O:IBM\16F24\131 .0' 'IBM Call 06/24/2016 131.0' 131 06/24/16
d
is a table with one row of data. The data
contains the option symbol name in the first column and a column for
each specified field f
.
To retrieve intraday data, use timeseries
.
Close the Money.Net connection.
close(c)
Input Arguments
c
— Money.Net connection
connection object
Money.Net connection, specified as a connection object created
using moneynet
.
s
— Money.Net symbol
character vector | cell array of character vector | string scalar
Money.Net symbol, specified as a character vector, cell array of a character vector, or string scalar to denote one symbol.
Example: "IBM"
Data Types: char
| cell
| string
Output Arguments
o
— Option symbols
cell array of character vectors
Option symbols, returned as a cell array of character vectors.
Each character vector specifies one option symbol. The total number
of option symbols depends on the symbol s
.
Version History
Introduced in R2016b
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi 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)