MATLAB 도움말 센터
Retrieve Money.Net option symbols
o = optionchain(c,s)
o = optionchain(c,s) returns the option symbols using the Money.Net connection c and symbol s.
o
c
s
example
collapse all
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:
o(1)
f
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.
d
To retrieve intraday data, use timeseries.
timeseries
Close the Money.Net connection.
close(c)
Money.Net connection, specified as a connection object created using moneynet.
moneynet
Money.Net symbol, specified as a character vector, cell array of a character vector, or string scalar to denote one symbol.
Example: "IBM"
"IBM"
Data Types: char | cell | string
char
cell
string
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.
Introduced in R2016b
moneynet | getdata | timeseries | close
getdata
close
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의