• using log directory '/data/gannet/tmp/ripley/R/packages/tests-Sun/tawny.Rcheck'
  • using R version 2.11.0 Under development (unstable) (2010-02-03 r51097)
  • using session charset: UTF-8
  • checking for file 'tawny/DESCRIPTION' ... OK
  • checking extension type ... Package
  • this is package 'tawny' version '1.1.0'
  • checking package dependencies ... OK
  • checking if this is a source package ... OK
  • checking for executable files ... OK
  • checking whether package 'tawny' 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 Rd contents ... WARNING
    Argument items with no description in Rd object 'plotPerformance':
    bg
  • checking data for non-ASCII characters ... OK
  • checking examples ... ERROR
    Running examples in 'tawny-Ex.R' failed.
    The error most likely occurred in:

    > ### * tawny-package
    >
    > flush(stderr()); flush(stdout())
    >
    > ### Name: tawny-package
    > ### Title: Provides various portfolio optimization strategies including
    > ### random matrix theory and shrinkage estimators
    > ### Aliases: tawny-package tawny
    > ### Keywords: package ts
    >
    > ### ** Examples
    >
    > ## High level use of package
    > # Select a portfolio using 200 total observations
    > data(sp500.subset)
    > h <- sp500.subset
    > # Optimize using a window of length 200 (there will be 51 total iterations)
    > ws <- optimizePortfolio(h, 150, getCorFilter.RMT() )
    > # Plot the performance of the resulting optimized portfolio
    > pf <- plotPerformance(h, ws, 150, y.min=-0.4)
    > # Compare the performance with a naive equal-weighted portfolio
    > ef <- compare.EqualWeighted(h, 150, y.min=-0.4)
    > # Also compare against the S&P 500
    > mf <- compare.Market('^GSPC',200,150, y.min=-0.4)
    >
    > # Generate weights based on the constant correlation shrinkage estimator
    > ws <- optimizePortfolio(h, 150, getCorFilter.Shrinkage())
    > pf <- plotPerformance(h, ws, 150, y.min=-0.4)
    >
    >
    > ## Low level use of the package
    > # View the theoretical Marcenko-Pastur distribution of eigenvalues of a
    > # random matrix
    > mp.theory(Q=4.2, sigma=1.1)
    [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [7] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [13] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [19] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [25] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [31] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [37] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [43] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [49] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [55] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [61] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [67] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [73] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [79] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [85] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [91] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [97] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [103] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [109] 0.0000000 0.0000000 0.0000000 0.0000000 2.7616041 4.7795321
    [115] 5.9878466 6.8547701 7.5179043 8.0421590 8.4647697 8.8095914
    [121] 9.0930320 9.3269491 9.5202275 9.6797112 9.8107881 9.9177749
    [127] 10.0041804 10.0728915 10.1263080 10.1664425 10.1949964 10.2134174
    [133] 10.2229449 10.2246458 10.2194430 10.2081380 10.1914302 10.1699316
    [139] 10.1441797 10.1146480 10.0817548 10.0458706 10.0073242 9.9664082
    [145] 9.9233834 9.8784829 9.8319150 9.7838665 9.7345051 9.6839812
    [151] 9.6324306 9.5799751 9.5267250 9.4727796 9.4182286 9.3631530
    [157] 9.3076264 9.2517151 9.1954791 9.1389730 9.0822461 9.0253431
    [163] 8.9683044 8.9111668 8.8539635 8.7967245 8.7394771 8.6822459
    [169] 8.6250532 8.5679191 8.5108617 8.4538974 8.3970407 8.3403049
    [175] 8.2837017 8.2272416 8.1709341 8.1147874 8.0588088 8.0030048
    [181] 7.9473809 7.8919420 7.8366923 7.7816352 7.7267736 7.6721100
    [187] 7.6176462 7.5633836 7.5093232 7.4554656 7.4018111 7.3483595
    [193] 7.2951104 7.2420631 7.1892167 7.1365700 7.0841215 7.0318696
    [199] 6.9798125 6.9279481 6.8762742 6.8247886 6.7734887 6.7223720
    [205] 6.6714355 6.6206766 6.5700922 6.5196792 6.4694345 6.4193547
    [211] 6.3694365 6.3196765 6.2700712 6.2206168 6.1713098 6.1221464
    [217] 6.0731228 6.0242350 5.9754792 5.9268513 5.8783472 5.8299629
    [223] 5.7816940 5.7335363 5.6854855 5.6375372 5.5896870 5.5419302
    [229] 5.4942622 5.4466785 5.3991743 5.3517447 5.3043849 5.2570899
    [235] 5.2098545 5.1626738 5.1155423 5.0684549 5.0214060 4.9743901
    [241] 4.9274016 4.8804347 4.8334834 4.7865418 4.7396037 4.6926628
    [247] 4.6457125 4.5987464 4.5517575 4.5047389 4.4576834 4.4105835
    [253] 4.3634318 4.3162202 4.2689408 4.2215851 4.1741444 4.1266099
    [259] 4.0789722 4.0312216 3.9833481 3.9353414 3.8871905 3.8388841
    [265] 3.7904104 3.7417570 3.6929109 3.6438587 3.5945859 3.5450777
    [271] 3.4953182 3.4452907 3.3949776 3.3443601 3.2934186 3.2421320
    [277] 3.1904777 3.1384319 3.0859690 3.0330615 2.9796799 2.9257925
    [283] 2.8713649 2.8163599 2.7607371 2.7044524 2.6474577 2.5897001
    [289] 2.5311213 2.4716568 2.4112350 2.3497757 2.2871890 2.2233734
    [295] 2.1582133 2.0915764 2.0233103 1.9532372 1.8811483 1.8067949
    [301] 1.7298779 1.6500311 1.5667988 1.4796014 1.3876829 1.2900256
    [307] 1.1852016 1.0710983 0.9443461 0.7989331 0.6218870 0.3702913
    [313] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [319] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [325] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [331] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [337] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [343] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [349] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [355] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [361] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [367] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [373] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [379] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [385] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [391] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [397] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [403] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [409] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [415] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
    [421] 0.0000000 0.0000000 0.0000000 0.0000000
    >
    > # Calculate the density of eigenvalues for a matrix of portfolio returns
    > h <- getRandomMatrix(20, 100)
    > hist <- mp.density.kernel(h)
    >
    > # Fit an empirical distribution to a theoretical curve
    > hint <- c(6,2)
    > o <- optim(hint, mp.fit.kernel(hist))
    Error in optim(hint, mp.fit.kernel(hist)) :
    function cannot be evaluated at initial parameters
    Execution halted
    Time 3:04.73, 114.30 + 6.03