[Rquantlib-commits] r276 - pkg/RQuantLib/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 21 06:23:25 CEST 2010


Author: knguyen
Date: 2010-07-21 06:23:24 +0200 (Wed, 21 Jul 2010)
New Revision: 276

Modified:
   pkg/RQuantLib/src/asian.cpp
Log:
change pricing engine for asian option

Modified: pkg/RQuantLib/src/asian.cpp
===================================================================
--- pkg/RQuantLib/src/asian.cpp	2010-07-18 20:13:04 UTC (rev 275)
+++ pkg/RQuantLib/src/asian.cpp	2010-07-21 04:23:24 UTC (rev 276)
@@ -91,11 +91,17 @@
             
         } else if (avgType=="arithmetic"){
             averageType = Average::Arithmetic;
+
             boost::shared_ptr<PricingEngine> engine =
-                MakeMCDiscreteArithmeticASEngine<LowDiscrepancy>(stochProcess)
-                .withSeed(3456789)
-                .withSamples(1023);
+                MakeMCDiscreteArithmeticAPEngine<LowDiscrepancy>(stochProcess)
+                .withSamples(2047)
+                .withControlVariate();
             
+            //boost::shared_ptr<PricingEngine> engine =
+            //    MakeMCDiscreteArithmeticASEngine<LowDiscrepancy>(stochProcess)
+            //    .withSeed(3456789)
+            //    .withSamples(1023);
+            
             Size fixings = Rcpp::as<double>(rparam["fixings"]);
             Time length = Rcpp::as<double>(rparam["length"]);
             Time first = Rcpp::as<double>(rparam["first"]);



More information about the Rquantlib-commits mailing list