[Rquantlib-commits] r233 - pkg/RQuantLib/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 22 03:21:38 CEST 2010


Author: edd
Date: 2010-04-22 03:21:38 +0200 (Thu, 22 Apr 2010)
New Revision: 233

Modified:
   pkg/RQuantLib/inst/unitTests/runitOptions.R
Log:
update binary option unit test to updated function interface


Modified: pkg/RQuantLib/inst/unitTests/runitOptions.R
===================================================================
--- pkg/RQuantLib/inst/unitTests/runitOptions.R	2010-04-21 03:00:06 UTC (rev 232)
+++ pkg/RQuantLib/inst/unitTests/runitOptions.R	2010-04-22 01:21:38 UTC (rev 233)
@@ -174,7 +174,7 @@
 ## Binary Options aka Digitals
 test.binary <- function() {
     ## cash or nothing European
-    rc <- BinaryOption("put", strike=80, underl=100, div=0.06, r=0.06, mat=0.75, vol=0.35, cash=10)
+    rc <- BinaryOption(binType="cash", type="put", excType="european", strike=80, underl=100, div=0.06, r=0.06, mat=0.75, vol=0.35, cash=10)
     checkEquals(rc$value, 2.671045684)
     checkEquals(rc[1:7],
                 list(value=2.671045, delta=-0.1060594, gamma=0.00310624, vega=8.153881, theta=-1.742309, rho=-9.9577, divRho=7.9544),



More information about the Rquantlib-commits mailing list