[R-SIG-Finance] Spread Approx Option question

stefano iacus stefano.iacus at unimi.it
Fri Jun 11 14:22:51 CEST 2010


I didn't check myself, but Rmetrics (as in Haug) defin his own approx for the CDF of the gaussian law (i.e. CND), here you use pnorm()

just a hint, may the original authors can explain.

stefano


On 11 Jun 2010, at 03:13, Sarbo wrote:

> Hi Ben- I responded directly to Benji, who was trying to post on the
> forum earlier but couldn't for some reason (although it appears that his
> original query went through to the list now). Anyway, it does appear
> that the code in the fExoticOptions package is a little off. I'm too
> short on time (and sleep) right now to examine it closely, but I've got
> code from back in my Jurassic days that is essentially an R
> implementation of Haug's implementation of the Kirk approximation for a
> spread option on two forward/futures contracts. The code is enclosed
> below. Feel free to test it and see if it works.
> 
> KirkSpreadOption <- function(F1, F2, K, v1, v2, r, tau, rho, cp){
> 
> F <- F1/(F2 + K)
> F3 <- F2/(F2 + K)
> v <- sqrt(v1^2 + (v2*F3)^2 - 2*rho*v1*v2*F3)
> 
> d1 <- (log(F) + 0.5*v^2*tau)/(v*sqrt(tau))
> d2 <- d1 - v*sqrt(tau)
> 
> f <- ifelse(cp == 'c', (F2 + K)*exp(-r*tau)*(F*pnorm(d1) - pnorm(d2)),
> (F2 + K)*exp(-r*tau)*(pnorm(-d2) - F*pnorm(-d1)))
> return(f)
> }
> 
> On Thu, 2010-06-10 at 17:12 -0400, Ben Cooper wrote:
> 
>> Hi,
>> 
>> I'm asking a question for a friend who couldn't post for to the site today.
>> 
>> He was trying to use the function Spread Approx Option from the
>> package fExoticOptions. The example he showed me was,
>> 
>> SpreadApproxOption(TypeFlag = "c", S1 = 28, S2 = 20, X = 7, Time = 1,
>> r = .05, sigma1 = 0, sigma2 = 0, rho = 1)
>> 
>> This is returning an option price of 0.9048. Shouldn't the option
>> price be the simple PV of 1 at the .05 rate? What is the math that
>> causes the difference here?
>> 
>> We've also run this same example through the Haug excel model that
>> comes with his book, and am getting a value of .9512. This is more in
>> line with what I'd expect.
>> 
>> Thanks
>> 
>> Ben
>> 
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch 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.
>> 
> 
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch 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.


-----------------------------------
Stefano M. Iacus
Department of Economics,
Business and Statistics
University of Milan
Via Conservatorio, 7
I-20123 Milan - Italy
Ph.: +39 02 50321 461
Fax: +39 02 50321 505
http://www.economia.unimi.it/iacus
------------------------------------------------------------------------------------
Please don't send me Word or PowerPoint attachments if not 
absolutely necessary. See:
http://www.gnu.org/philosophy/no-word-attachments.html



More information about the R-SIG-Finance mailing list