[R-SIG-Finance] 3d implied volatility surface

R. Michael Weylandt michael.weylandt at gmail.com
Wed Oct 26 22:21:40 CEST 2011


Perhaps you should load the lattice package first with
library(lattice)....I just confirmed it has 2 3d examples in it.

As to specific formatting advice, I'd usually prefer delta/moneyness
than straight strike if you were preparing the graph for me. Otherwise
there's one very large source of variance unaccounted for in your
graph should you start to compare over different points in time.

Other than that, I don't think there's too much to know beyond the
usual caveats for financial data: smoothing only if appropriate, make
sure prices are clean and correspond to something actionable (i.e.,
make sure you aren't using prints that are just old and discovering
"arbitrages").

Michael

On Wed, Oct 26, 2011 at 3:38 PM, financial engineer
<fin_engr at hotmail.com> wrote:
> thanks for your response, Michael
>
> I didn't find any demo(lattice) but I did look at the demo(persp). however,
> being new to R, I was trying to get a better understanding of how to
> organize the data.
>
> I can post to the general list, but I figured since the folks on the
> financial side would understand the implied vol reference, I could get some
> good guidance faster  and perhaps any additional suggestions, if similar
> stuff has been done by the others :-)
>
> Best,
> BA
>
>> From: michael.weylandt at gmail.com
>> Date: Wed, 26 Oct 2011 15:26:53 -0400
>> Subject: Re: [R-SIG-Finance] 3d implied volatility surface
>> To: fin_engr at hotmail.com
>> CC: r-sig-finance at r-project.org
>>
>> This isn't specifically financial so any follow up is perhaps better
>> done on the general R-help list, but try demo(persp) to see some
>> example code that's built in. If I remember correctly, demo(lattice)
>> also has at least one 3d example.
>>
>> Michael
>>
>> On Wed, Oct 26, 2011 at 1:43 PM, financial engineer
>> <fin_engr at hotmail.com> wrote:
>> >
>> > hi,
>> >
>> > I'd like to be able to plot a 3-d vol surface using option strike vs.
>> > expiration(as yrs to maturity) vs. implied volatility.
>> >
>> > I have the historical trade-date, expiration-date, strike, option price,
>> > option symbol, option type, implied vol. etc. data for each option,
>> > so I ran the following query:
>> > OpQuotes <- dbGetQuery(con,"SELECT strike,iv,ytm FROM greeks WHERE
>> > trade_date='2011-10-07' AND symbol like 'MCO%'and type='C';")
>> >
>> > I am trying to figure out if I need to convert the above into a list or
>> > have individual matrices, or set it up as a seq. Would appreciate some
>> > help/direction/suggestion/example code on that.
>> >
>> > I'd like to be able to use "persp" or "lattice" to plot this.
>> >
>> > thanks!
>> >
>> >        [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > R-SIG-Finance at r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only. If you want to post, subscribe first.
>> > -- Also note that this is not the r-help list where general R questions
>> > should go.
>> >
>



More information about the R-SIG-Finance mailing list