Your message dated Mon, 2 Aug 2010 06:24:18 -0500
with message-id <[email protected]>
and subject line Re: Bug#591276: r-cran-rquantlib: BinaryOption cash-put-euro 
not as  Haug
has caused the Debian Bug report #591276,
regarding r-cran-rquantlib: BinaryOption cash-put-euro not as Haug
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
591276: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591276
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: r-cran-rquantlib
Version: 0.2.8-1
Severity: normal

Hello Dirk,

# Haug via Eddelbeutel doesn't match

library(RQuantLib)

BinaryOption("cash", "put", "european",
    underlying = 100,
    dividendYield = 0,
    riskFreeRate = 0.06,
    maturity = 0.75,
    strike=80,
    volatility=0.35,
    cashPayoff = 10);

> BinaryOption("cash", "put", "european",
+     underlying = 100,
+     dividendYield = 0,
+     riskFreeRate = 0.06,
+     maturity = 0.75,
+     strike=80,
+     volatility=0.35,
+     cashPayoff = 10);
Concise summary of valuation for BinaryOption 
  value   delta   gamma    vega   theta     rho  divRho 
 2.2155 -0.0962  0.0033  8.6306 -1.3038 -8.8749  7.2132 

I checked QuantLib source and it references Haug with a value of 2.6710.

The "call" variant works.

-- System Information:
Debian Release: 5.0.5
  APT prefers stable
  APT policy: (700, 'stable'), (650, 'testing'), (600, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages r-cran-rquantlib depends on:
ii  libc6                   2.11.2-2         Embedded GNU C Library: Shared lib
ii  libgcc1                 1:4.3.2-1.1      GCC support library
ii  libquantlib-0.9.0       0.9.0.20071224-1 Quantitative Finance Library -- de
ii  libstdc++6              4.4.4-6          The GNU Standard C++ Library v3
ii  r-base-core             2.7.1-1+lenny1   GNU R core of statistical computin

r-cran-rquantlib recommends no packages.

r-cran-rquantlib suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Hi Walter

On 2 August 2010 at 10:33, Walter Eaves wrote:
| Dirk,
| 
| Jeez, thanks. I missed that.

No sweat, this can happen. Closing the non-bug now.
 
| Sorry about that. I do make use of it rquantlib and I would like to
| contribute. What should I do?

I am sitting on a version that is 98% ready (mostly just waiting for Khanh on
some details for the asianoption + arithmetic average code).  

This new version uses some newer Rcpp interfaces so we should start from
that.

One area where I should do more is validation and unit tests.  It is looking
ok on options (but could still do more) and I was wondering if you poke
around there.  In the easiest cases it is taking unit tests from QuantLib's
sources and re-using them here re-case as Rcpp calls.  That is something
relatively easy, relatively incremental yet it gets you to the code.  

But do start from SVN rather than the tarball on CRAN.

Does that make sense?

Cheers, Dirk
 
| Walter
| 
| On 1 August 2010 19:27, Dirk Eddelbuettel <[email protected]> wrote:
| 
| >
| > Hi Walter,
| >
| > Wow. I don't think I ever got a RQuantLib bug report.
| >
| > On 1 August 2010 at 18:08, Walter Eaves wrote:
| > | Hello Dirk,
| > |
| > | # Haug via Eddelbeutel doesn't match
| > |
| > | library(RQuantLib)
| > |
| > | BinaryOption("cash", "put", "european",
| > |     underlying = 100,
| > |     dividendYield = 0,
| > |     riskFreeRate = 0.06,
| > |     maturity = 0.75,
| > |     strike=80,
| > |     volatility=0.35,
| > |     cashPayoff = 10);
| > |
| > | > BinaryOption("cash", "put", "european",
| > | +     underlying = 100,
| > | +     dividendYield = 0,
| > | +     riskFreeRate = 0.06,
| > | +     maturity = 0.75,
| > | +     strike=80,
| > | +     volatility=0.35,
| > | +     cashPayoff = 10);
| > | Concise summary of valuation for BinaryOption
| > |   value   delta   gamma    vega   theta     rho  divRho
| > |  2.2155 -0.0962  0.0033  8.6306 -1.3038 -8.8749  7.2132
| > |
| > | I checked QuantLib source and it references Haug with a value of 2.6710.
| >
| > Yes, looking at QuantLib's code, the file test-suite/digitaloption.cpp has
| >
| >    DigitalOptionData values[] = {
| >        // "Option pricing formulas", E.G. Haug, McGraw-Hill 1998 - pag 88
| >        //        type, strike,  spot,    q,    r,    t,  vol,  value, tol
| >        { Option::Put,   80.00, 100.0, 0.06, 0.06, 0.75, 0.35, 2.6710, 1e-4
| > }
| >    };
| >
| > Now, you sent in
| >
| >
| > > library(RQuantLib)
| > > BinaryOption("cash", "put", "european", underlying = 100, dividendYield =
| > 0, riskFreeRate = 0.06, maturity = 0.75, strike=80, volatility=0.35,
| > cashPayoff = 10)
| > Concise summary of valuation for BinaryOption
| >  value   delta   gamma    vega   theta     rho  divRho
| >  2.2155 -0.0962  0.0033  8.6306 -1.3038 -8.8749  7.2132
| > >
| >
| > but the problem is that you have q=0 (div.yeild of zero) which the quotes
| > Huag example does not. If we correct that to
| >
| > > BinaryOption("cash", "put", "european", underlying = 100, dividendYield =
| > 0.06, riskFreeRate = 0.06, maturity = 0.75, strike=80, volatility=0.35,
| > cashPayoff = 10)
| > Concise summary of valuation for BinaryOption
| >  value   delta   gamma    vega   theta     rho  divRho
| >  2.6710 -0.1061  0.0031  8.1539 -1.7423 -9.9577  7.9545
| > >
| >
| > Things pan out as expected.  So ... no bug as best as I can tell.
| >
| > Thanks for your interest in RQuantLib. I appreciate the testing. If you are
| > interested in contributing more unit tests, I would welcome that and can
| > show
| > you how to contribute.
| >
| > Cheers, Dirk
| >
| > |
| > | The "call" variant works.
| > |
| > | -- System Information:
| > | Debian Release: 5.0.5
| > |   APT prefers stable
| > |   APT policy: (700, 'stable'), (650, 'testing'), (600, 'unstable')
| > | Architecture: i386 (i686)
| > |
| > | Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
| > | Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
| > | Shell: /bin/sh linked to /bin/bash
| > |
| > | Versions of packages r-cran-rquantlib depends on:
| > | ii  libc6                   2.11.2-2         Embedded GNU C Library:
| > Shared lib
| > | ii  libgcc1                 1:4.3.2-1.1      GCC support library
| > | ii  libquantlib-0.9.0       0.9.0.20071224-1 Quantitative Finance Library
| > -- de
| > | ii  libstdc++6              4.4.4-6          The GNU Standard C++ Library
| > v3
| > | ii  r-base-core             2.7.1-1+lenny1   GNU R core of statistical
| > computin
| > |
| > | r-cran-rquantlib recommends no packages.
| > |
| > | r-cran-rquantlib suggests no packages.
| > |
| > | -- no debconf information
| > |
| > |
| >
| > --
| > Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com
| >
| 
| 
| 
| -- 
| [email protected]          http://www.bigfoot.com/~Walter.Eaves
| <a href= "http://wikimediafoundation.org/wiki/Support_Wikipedia/en";><img
| border="0" alt="Wikipedia Affiliate Button" src="
| 
http://wikimediafoundation.org/w/extensions/skins/Donate/images/banners/Banner_88x31_0003_D.jpg";
| /></a>

-- 
Dirk Eddelbuettel | [email protected] | http://dirk.eddelbuettel.com


--- End Message ---

Reply via email to