Changeset 198
- Timestamp:
- 05/29/08 18:13:15 (3 months ago)
- Files:
-
- trunk/QLNet/Examples/EquityOption/EquityOption.cs (modified) (1 diff)
- trunk/QLNet/QLNet/Methods/montecarlo/earlyexercisepathpricer.cs (added)
- trunk/QLNet/QLNet/Methods/montecarlo/longstaffschwartzpathpricer.cs (added)
- trunk/QLNet/QLNet/Pricingengines/mclongstaffschwartzengine.cs (added)
- trunk/QLNet/QLNet/Pricingengines/vanilla/mcamericanengine.cs (added)
- trunk/QLNet/QLNet/QLNet.csproj (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/QLNet/Examples/EquityOption/EquityOption.cs
r197 r198 252 252 //// Monte Carlo Method: MC (Longstaff Schwartz) 253 253 //method = "MC (Longstaff Schwartz)"; 254 // boost::shared_ptr<PricingEngine> mcengine3;255 // mcengine3 = MakeMCAmericanEngine<PseudoRandom>(bsmProcess)256 // .withSteps(100)257 // .withAntitheticVariate()258 // .withCalibrationSamples(4096)259 // .withTolerance(0.02)260 // .withSeed(mcSeed);254 //IPricingEngine mcengine3 = new MakeMCAmericanEngine<PseudoRandom>(bsmProcess) 255 // .withSteps(100) 256 // .withAntitheticVariate() 257 // .withCalibrationSamples(4096) 258 // .withTolerance(0.02) 259 // .withSeed(mcSeed) 260 // .value(); 261 261 //americanOption.setPricingEngine(mcengine3); 262 //std::cout << std::setw(widths[0]) << std::left << method 263 // << std::fixed 264 // << std::setw(widths[1]) << std::left << "N/A" 265 // << std::setw(widths[2]) << std::left << "N/A" 266 // << std::setw(widths[3]) << std::left << americanOption.NPV() 267 // << std::endl; 268 269 //// End test 262 //Console.Write("{0,-" + widths[0] + "}", method); 263 //Console.Write("{0,-" + widths[1] + ":0.000000}", "N/A"); 264 //Console.Write("{0,-" + widths[2] + ":0.000000}", "N/A"); 265 //Console.WriteLine("{0,-" + widths[3] + ":0.000000}", americanOption.NPV()); 266 267 // End test 270 268 271 269 Console.WriteLine(" \nRun completed in {0}", DateTime.Now - timer); trunk/QLNet/QLNet/QLNet.csproj
r194 r198 219 219 <Compile Include="Methods\lattices\tree.cs" /> 220 220 <Compile Include="Methods\montecarlo\brownianbridge.cs" /> 221 <Compile Include="Methods\montecarlo\earlyexercisepathpricer.cs" /> 222 <Compile Include="Methods\montecarlo\longstaffschwartzpathpricer.cs" /> 221 223 <Compile Include="Methods\montecarlo\mctraits.cs" /> 222 224 <Compile Include="Methods\montecarlo\montecarlomodel.cs" /> … … 250 252 <Compile Include="Pricingengines\CapFloor\BlackCapFloorEngine.cs" /> 251 253 <Compile Include="Pricingengines\Greeks.cs" /> 254 <Compile Include="Pricingengines\mclongstaffschwartzengine.cs" /> 252 255 <Compile Include="Pricingengines\mcsimulation.cs" /> 253 256 <Compile Include="Pricingengines\Swap\Discountingswapengine.cs" /> … … 268 271 <Compile Include="Pricingengines\vanilla\Integralengine.cs" /> 269 272 <Compile Include="Pricingengines\vanilla\Juquadraticengine.cs" /> 273 <Compile Include="Pricingengines\vanilla\mcamericanengine.cs" /> 270 274 <Compile Include="Pricingengines\vanilla\mceuropeanengine.cs" /> 271 275 <Compile Include="Pricingengines\vanilla\mcvanillaengine.cs" />