Assembla home | Assembla project page
 

Changeset 196

Show
Ignore:
Timestamp:
05/29/08 05:38:40 (5 months ago)
Author:
snovik
Message:

Fix: Beleive it or not but European Option now works in Monte Carlo

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/QLNet/QLNet/Pricingengines/vanilla/mceuropeanengine.cs

    r195 r196  
    9595            if(samples_ != 0) 
    9696                throw new ApplicationException("number of samples already set"); 
    97             if (PseudoRandom.allowsErrorEstimate != 0) 
     97            if (PseudoRandom.allowsErrorEstimate == 0) 
    9898                throw new ApplicationException("chosen random generator policy does not allow an error estimate"); 
    9999            tolerance_ = tolerance; 
  • trunk/QLNet/QLNet/Pricingengines/vanilla/mcvanillaengine.cs

    r194 r196  
    6262            seed_ = seed; 
    6363 
    64             if (!(timeSteps>0)
     64            if (timeSteps < 0
    6565                throw new ApplicationException("timeSteps must be positive, " + timeSteps + " not allowed"); 
    66             if (!(timeStepsPerYear>0)
     66            if (timeStepsPerYear < 0
    6767                throw new ApplicationException("timeStepsPerYear must be positive, " + timeStepsPerYear + " not allowed"); 
    6868