• using R version 2.11.0 Under development (unstable) (2010-01-14 r50981)
  • using session charset: UTF-8
  • checking for file 'fOptions/DESCRIPTION' ... OK
  • this is package 'fOptions' version '2100.76'
  • checking package dependencies ... OK
  • checking if this is a source package ... OK
  • checking for executable files ... OK
  • checking whether package 'fOptions' can be installed ... OK
  • checking package directory ... OK
  • checking for portable file names ... OK
  • checking for sufficient/correct file permissions ... OK
  • checking DESCRIPTION meta-information ... OK
  • checking top-level files ... OK
  • checking index information ... OK
  • checking package subdirectories ... OK
  • checking R files for non-ASCII characters ... OK
  • checking R files for syntax errors ... OK
  • checking whether the package can be loaded ... OK
  • checking whether the package can be loaded with stated dependencies ... OK
  • checking whether the package can be unloaded cleanly ... OK
  • checking for unstated dependencies in R code ... OK
  • checking S3 generic/method consistency ... OK
  • checking replacement functions ... OK
  • checking foreign function calls ... OK
  • checking R code for possible problems ... OK
  • checking Rd files ... OK
  • checking Rd metadata ... OK
  • checking Rd cross-references ... OK
  • checking for missing documentation entries ... OK
  • checking for code/documentation mismatches ... OK
  • checking Rd \usage sections ... OK
  • checking line endings in C/C++/Fortran sources/headers ... OK
  • checking line endings in Makefiles ... OK
  • checking for portable compilation flags in Makevars ... OK
  • checking for portable use of $BLAS_LIBS ... OK
  • checking examples ... ERROR
    Running examples in 'fOptions-Ex.R' failed.
    The error most likely occurred in:

    > ### * MonteCarloOptions
    >
    > flush(stderr()); flush(stdout())
    >
    > ### Name: MonteCarloOptions
    > ### Title: Monte Carlo Valuation of Options
    > ### Aliases: MonteCarloOptions wienerMCPath plainVanillaMCPayoff
    > ### arithmeticAsianMCPayoff MonteCarloOption
    > ### Keywords: programming
    >
    > ### ** Examples
    >
    > ## How to perform a Monte Carlo Simulation?
    >
    > ## First Step:
    > # Write a function to generate the option's innovations.
    > # Use scrambled normal Sobol numbers:
    > sobolInnovations = function(mcSteps, pathLength, init, ...) {
    + # Create Normal Sobol Innovations:
    + innovations = rnorm.sobol(mcSteps, pathLength, init, ...)
    + # Return Value:
    + innovations }
    >
    > ## Second Step:
    > # Write a function to generate the option's price paths.
    > # Use a Wiener path:
    > wienerPath = function(eps) {
    + # Note, the option parameters must be globally defined!
    + # Generate the Paths:
    + path = (b-sigma*sigma/2)*delta.t + sigma*sqrt(delta.t)*eps
    + # Return Value:
    + path }
    >
    > ## Third Step:
    > # Write a function for the option's payoff
    >
    > # Example 1: use the payoff for a plain Vanilla Call or Put:
    > plainVanillaPayoff = function(path) {
    + # Note, the option parameters must be globally defined!
    + # Compute the Call/Put Payoff Value:
    + ST = S*exp(sum(path))
    + if (TypeFlag == "c") payoff = exp(-r*Time)*max(ST-X, 0)
    + if (TypeFlag == "p") payoff = exp(-r*Time)*max(0, X-ST)
    + # Return Value:
    + payoff }
    >
    > # Example 2: use the payoff for an arithmetic Asian Call or Put:
    > arithmeticAsianPayoff = function(path) {
    + # Note, the option parameters must be globally defined!
    + # Compute the Call/Put Payoff Value:
    + SM = mean(S*exp(cumsum(path)))
    + if (TypeFlag == "c") payoff = exp(-r*Time)*max(SM-X, 0)
    + if (TypeFlag == "p") payoff = exp(-r*Time)*max(0, X-SM)
    + # Return Value:
    + payoff }
    >
    > ## Final Step:
    > # Set Global Parameters for the plain Vanilla / arithmetic Asian Options:
    > TypeFlag <<- "c"; S <<- 100; X <<- 100
    > Time <<- 1/12; sigma <<- 0.4; r <<- 0.10; b <<- 0.1
    >
    > # Do the Asian Simulation with scrambled random numbers:
    > mc = MonteCarloOption(delta.t = 1/360, pathLength = 30, mcSteps = 5000,
    + mcLoops = 50, init = TRUE, innovations.gen = sobolInnovations,
    + path.gen = wienerPath, payoff.calc = arithmeticAsianPayoff,
    + antithetic = TRUE, standardization = FALSE, trace = TRUE,
    + scrambling = 2, seed = 4711)

    Monte Carlo Simulation Path:


    Loop: No
    Loop: 1 : NA NA
    Loop: 2 : NA NA
    Loop: 3 : NA NA
    Loop: 4 : Inf NA
    Loop: 5 : NA NA
    Loop: 6 : NA NA
    Loop: 7 : NA NA
    Loop: 8 : NA NA
    Loop: 9 : NA NA
    Loop: 10 : NA NA
    Loop: 11 : NA NA
    Loop: 12 : NA NA
    Loop: 13 : NA NA
    Loop: 14 : NA NA
    Loop: 15 : NA NA
    Loop: 16 : NA NA
    Loop: 17 : NA NA
    Loop: 18 : NA NA
    Loop: 19 : NA NA
    Loop: 20 : NA NA
    Loop: 21 : NA NA
    Loop: 22 : NA NA
    Loop: 23 : NA NA
    Loop: 24 : NA NA
    Loop: 25 : NA NA
    Loop: 26 : NA NA
    Loop: 27 : NA NA
    Loop: 28 : NA NA
    Loop: 29 : NA NA
    Loop: 30 : NA NA
    Loop: 31 : NA NA
    Loop: 32 : NA NA
    Loop: 33 : NA NA
    Loop: 34 : NA NA
    Loop: 35 : NA NA
    Loop: 36 : NA NA
    Loop: 37 : NA NA
    Loop: 38 : NA NA
    Loop: 39 : NA NA
    Loop: 40 : NA NA
    Loop: 41 : NA NA
    Loop: 42 : NA NA
    Loop: 43 : NA NA
    Loop: 44 : NA NA
    Loop: 45 : NA NA
    Loop: 46 : NA NA
    Loop: 47 : NA NA
    Loop: 48 : NA NA
    Loop: 49 : NA NA
    Loop: 50 : NA NA
    >
    > # Plot the MC Iteration Path:
    > par(mfrow = c(1, 1))
    > mcPrice = cumsum(mc)/(1:length(mc))
    > plot(mcPrice, type = "l", main = "Arithmetic Asian Option",
    + xlab = "Monte Carlo Loops", ylab = "Option Price")
    Warning in min(x) : no non-missing arguments to min; returning Inf
    Warning in max(x) : no non-missing arguments to max; returning -Inf
    Error in plot.window(...) : need finite 'ylim' values
    Calls: plot -> plot -> plot.default -> localWindow -> plot.window
    Execution halted