Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SOS: Option chain and implied volatility (Bloomberg)

509 views
Skip to first unread message

Qiusi

unread,
Jun 14, 2011, 6:00:05 PM6/14/11
to
1. How to get option chain?
In excel :
A1: SPY US Equity
=BDS(A1,"OPT_CHAIN","cols=1;rows=1720")
gives me all the options on SPY as the following:

SPY US 06/18/11 C20 Equity
SPY US 06/18/11 C25 Equity
SPY US 06/18/11 C30 Equity
SPY US 06/18/11 C35 Equity
SPY US 06/18/11 C40 Equity
SPY US 06/18/11 C45 Equity
SPY US 06/18/11 C50 Equity
...

How can I do that in Matlab with Bloomberg (Datafeed)?

2. How can I get the 30 day implied vol (for ATM options) in Matlab with Bloomberg (Datafeed)?


Thanks in advance !!

reza

unread,
Jun 14, 2011, 8:18:31 PM6/14/11
to

Warning:
This is from memory since I dont have access to bloomberg to test.


first open a channel to bloomberg:

c = bloomberg(); % depending on your version of matlab you may need to
use blp()

1.

>> oc = fetch(c, 'SPY US Equity', 'GetData','OPT_CHAIN');

2.

>> vol = fetch(c, oc.OPT_CHAIN, ,'GetData',{'OPT_STRIKE_PX','OPT_PUT_CALL',...
'OPT_EXPIRE_DT','OPT_IMPLIED_VOLATILITY_MID'});

/reza

Qiusi

unread,
Jun 15, 2011, 11:18:07 AM6/15/11
to
Thanks, it helps a lot !

Another thing is that is fetch a current or both current and historial?

So if I add a date in the end of the fetch option, could it work? And in what format?

'06/13/2011' or ...?

reza

unread,
Jun 15, 2011, 7:31:59 PM6/15/11
to

fetch() arguments are too rich to explain here. Goto matlab gui help
by typing helpwin

in the gui help search for bloomberg, in the "See Also" section click
on fetch.bloomberg

You can also use a GUI by typing dftool in matlab to Historical, live
tick data.

/reza

Zoe

unread,
Jun 16, 2011, 12:37:04 PM6/16/11
to
Ok, thanks. I get the format of the date.

But now I have an emergency, is there possible to get historical data (no matter using fetch or history) and return a structure (instead of cells).

Our company is running tests to choose the best fit software, plz reply asap, thanks a lot!

Steven_Lord

unread,
Jun 16, 2011, 4:25:37 PM6/16/11
to

"Zoe " <em5...@hotmail.com> wrote in message
news:itdbfg$rp$1...@newscl01ah.mathworks.com...

I don't know how many experts there are on the Bloomberg interface in
Datafeed Toolbox on CSSM. You should send a description of what you're
trying to do to Technical Support; they should be able to describe what to
do to accomplish your goal.

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Jeremy Long

unread,
Aug 17, 2012, 7:27:13 PM8/17/12
to
I attempted this, but am told that "OPT_CHAIN" is an invalid field requested. Am I missing something? (I do have the datafeed toolbox).

Thanks,
Jeremy

Zoe Zhang

unread,
Aug 18, 2012, 3:25:08 PM8/18/12
to
"Jeremy Long" wrote in message <k0mk0h$98a$1...@newscl01ah.mathworks.com>...
> I attempted this, but am told that "OPT_CHAIN" is an invalid field requested. Am I missing something? (I do have the datafeed toolbox).
>
> Thanks,
> Jeremy

chain = getdata(c,'SPX Index','OPT_CHAIN')

Zoe Zhang

unread,
Aug 18, 2012, 3:27:07 PM8/18/12
to
"Jeremy Long" wrote in message <k0mk0h$98a$1...@newscl01ah.mathworks.com>...
> I attempted this, but am told that "OPT_CHAIN" is an invalid field requested. Am I missing something? (I do have the datafeed toolbox).
>
> Thanks,
> Jeremy


>> chain = getdata(c,'SPX Index','OPT_CHAIN')

chain =

OPT_CHAIN: {{1814x1 cell}}

Jeremy Long

unread,
Aug 22, 2012, 5:38:07 PM8/22/12
to
"Zoe Zhang" <qzh...@3twelvecapital.com> wrote in message <k0oqab$lbt$1...@newscl01ah.mathworks.com>...
Thank you for the help. Is there a way to get the option chains from yahoo finance?
Thanks,
Jeremy

Zoe Zhang

unread,
Aug 22, 2012, 5:51:07 PM8/22/12
to
"Jeremy Long" wrote in message <k13jfv$35s$1...@newscl01ah.mathworks.com>...
That I am not sure. I just use BBG.
0 new messages