[Rquantlib-devel] AsianOption(“arithmetic”… crashes R

Dirk Eddelbuettel edd at debian.org
Thu Oct 30 22:32:41 CET 2014


On 29 October 2014 at 22:33, Jess Thorvall Aunsbjørn wrote:
| Have encountered constant 'crash' of R when calling the AsianOption function
| with type “arithmetic”.
| 
| Posted on StackOverflow yesterday and Dirk asked my to post here instead.

Yes, thanks for that. 
 
|     Hi I'm trying to use RQuantLib to evaluate arithmetic Asian options on a
|     windows 64 bit platform.
| 
|     Using the geometric pricer the codes executes correct, but using arithmetic
|     crashes R. Have tried in Rstudie and through R-term with both x86 and x64
|     executable.
| 
|     library('RQuantLib')
| 
|     R version 3.1.1 (2014-07-10)
|     Platform: x86_64-w64-mingw32/x64 (64-bit)
| 
|     locale:
|     [1] LC_COLLATE=Danish_Denmark.1252  LC_CTYPE=Danish_Denmark.1252
|     [3] LC_MONETARY=Danish_Denmark.1252 LC_NUMERIC=C
|     [5] LC_TIME=Danish_Denmark.1252
| 
|     attached base packages:
|     [1] stats     graphics  grDevices utils     datasets  methods   base
| 
|     other attached packages:
|     [1] RQuantLib_0.3.12   fOptions_3010.83   fBasics_3010.86    MASS_7.3-35        timeSeries_3010.97
|     [6] timeDate_3011.99
| 
|     loaded via a namespace (and not attached):
|     [1] packrat_0.4.1.1  Rcpp_0.11.3      stabledist_0.6-6 tools_3.1.1
| 
|     GeomOption  <- AsianOption("geometric", "put", underlying=80, strike=85, div=0, riskFree=0.005,maturity=1.25, vol=0.2)
| 
|     ArithOption <- AsianOption("arithmetic", "put", underlying=80, strike=85, div=0, riskFree=0.005, maturity=1.25, vol=0.2)
| 
|     I have tried building QuantLib through VS2010 but this makes no difference
|     as expected, since RQuantLib on Windows do not require this.
| 
| ​Have later tried the same call on a virtual linux mint version.
| And in contrast to Dirk's expectation, R also crashed on this computer when
| using 'arithmetric' type.

Beg to differ, our Travis CI checks triggered from GH also run it as we skip
the (many years old) test only on Windows.

| [cleardot]
| 
| 
|     R version 2.15.1 (2012-06-22)
|     Platform: i686-pc-linux-gnu (32-bit)
| 
|     locale:
|      [1] LC_CTYPE=da_DK.UTF-8       LC_NUMERIC=C              
|      [3] LC_TIME=en_US.UTF-8        LC_COLLATE=da_DK.UTF-8    
|      [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=da_DK.UTF-8   
|      [7] LC_PAPER=C                 LC_NAME=C                 
|      [9] LC_ADDRESS=C               LC_TELEPHONE=C            
|     [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
| 
|     attached base packages:
|     [1] stats     graphics  grDevices utils     datasets  methods   base     
| 
|     loaded via a namespace (and not attached):
|     [1] tools_2.15.1
|| 
| 
| So the problem seems to be more general then the effect of a different package
| setup on Windows vs Linux.
| 
| I have tried building QuantLib on windows with succes, but only through VS2010,

You cannot mix VS2010 and g++ for C++, don't try that.

| the MinGW howto's I have found havn't given me enough information to compile,
| and I havn't either been able to build RQuantLib, but this seems to be a
| problem with the correct setup of configuration files.
| 
| ​What are your ideas as how to proceed?

If you can, please build local versions and debug.  I don't do Windows so I
am unlikely to get to it.

We can help you get QL built using the R toolchain.

Dirk

| 
| Kind regards
| Jess Aunsbjørn ​
|| 
| --
| --
| Jess Thorvall Aunsbjørn
| Thorvall at gmail.com
| 
| 
| _______________________________________________
| Rquantlib-devel mailing list
| Rquantlib-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rquantlib-devel

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rquantlib-devel mailing list