Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
SOS: Option chain and implied volatility (Bloomberg)

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: Qiusi

Date: 14 Jun, 2011 22:00:05

Message: 1 of 11

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 !!

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: reza

Date: 15 Jun, 2011 00:18:31

Message: 2 of 11

On Jun 14, 6:00 pm, "Qiusi " <qzh...@3twelvecapital.com> wrote:
> 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 !!

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

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: Qiusi

Date: 15 Jun, 2011 15:18:07

Message: 3 of 11

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 ...?

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: reza

Date: 15 Jun, 2011 23:31:59

Message: 4 of 11

On Jun 15, 11:18 am, "Qiusi " <qzh...@3twelvecapital.com> wrote:
> 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 ...?

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

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: Zoe

Date: 16 Jun, 2011 16:37:04

Message: 5 of 11

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!

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: Steven_Lord

Date: 16 Jun, 2011 20:25:37

Message: 6 of 11



"Zoe " <em5357@hotmail.com> wrote in message
news:itdbfg$rp$1@newscl01ah.mathworks.com...
> 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!

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
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: Jeremy Long

Date: 17 Aug, 2012 23:27:13

Message: 7 of 11

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

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: Zoe Zhang

Date: 18 Aug, 2012 19:25:08

Message: 8 of 11

"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')

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: Zoe Zhang

Date: 18 Aug, 2012 19:27:07

Message: 9 of 11

"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}}

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: Jeremy Long

Date: 22 Aug, 2012 21:38:07

Message: 10 of 11

"Zoe Zhang" <qzhang@3twelvecapital.com> wrote in message <k0oqab$lbt$1@newscl01ah.mathworks.com>...
> "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}}


Thank you for the help. Is there a way to get the option chains from yahoo finance?
Thanks,
Jeremy

Subject: SOS: Option chain and implied volatility (Bloomberg)

From: Zoe Zhang

Date: 22 Aug, 2012 21:51:07

Message: 11 of 11

"Jeremy Long" wrote in message <k13jfv$35s$1@newscl01ah.mathworks.com>...
> "Zoe Zhang" <qzhang@3twelvecapital.com> wrote in message <k0oqab$lbt$1@newscl01ah.mathworks.com>...
> > "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}}
>
>
> Thank you for the help. Is there a way to get the option chains from yahoo finance?
> Thanks,
> Jeremy

That I am not sure. I just use BBG.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us