{"action":"created","issue":{"url":"https://api.github.com/repos/eddelbuettel/rquantlib/issues/91","repository_url":"https://api.github.com/repos/eddelbuettel/rquantlib","labels_url":"https://api.github.com/repos/eddelbuettel/rquantlib/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/eddelbuettel/rquantlib/issues/91/comments","events_url":"https://api.github.com/repos/eddelbuettel/rquantlib/issues/91/events","html_url":"https://github.com/eddelbuettel/rquantlib/issues/91","id":247551344,"number":91,"title":"BKTree option in AffineSwaption","user":{"login":"imunir23","id":30673742,"avatar_url":"https://avatars1.githubusercontent.com/u/30673742?v=4","gravatar_id":"","url":"https://api.github.com/users/imunir23","html_url":"https://github.com/imunir23","followers_url":"https://api.github.com/users/imunir23/followers","following_url":"https://api.github.com/users/imunir23/following{/other_user}","gists_url":"https://api.github.com/users/imunir23/gists{/gist_id}","starred_url":"https://api.github.com/users/imunir23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imunir23/subscriptions","organizations_url":"https://api.github.com/users/imunir23/orgs","repos_url":"https://api.github.com/users/imunir23/repos","events_url":"https://api.github.com/users/imunir23/events{/privacy}","received_events_url":"https://api.github.com/users/imunir23/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2017-08-02T23:26:49Z","updated_at":"2017-08-03T23:57:00Z","closed_at":"2017-08-03T17:52:28Z","body":"Hello, I'm simply trying to recreate the example included in the guide for AffineSwaption, but rather than use the G2Analytic method, I'd like to use the BKTree:\r\n\r\nparams <- list(tradeDate=as.Date('2016-2-15'),\r\n               settleDate=as.Date('2016-2-17'),\r\n               startDate=as.Date('2017-2-17'),\r\n               maturity=as.Date('2022-2-17'),\r\n               payFixed=TRUE,\r\n               european=FALSE,\r\n               dt=.25,\r\n               strike=.06,\r\n               method= \"BKTree\",\r\n               interpWhat=\"discount\",\r\n               interpHow=\"loglinear\")\r\n\r\ntsQuotes <- list(d1w  =0.0382,\r\n                 d1m  =0.0372,\r\n                 fut1=96.2875,\r\n                 fut2=96.7875,\r\n                 fut3=96.9875,\r\n                 fut4=96.6875,\r\n                 fut5=96.4875,\r\n                 fut6=96.3875,\r\n                 fut7=96.2875,\r\n                 fut8=96.0875,\r\n                 s3y  =0.0398,\r\n                 s5y  =0.0443,\r\n                 s10y =0.05165,\r\n                 s15y =0.055175)\r\n\r\n\r\nswaptionMaturities <- c(1,2,3,4,5)\r\n\r\nswapTenors <- c(1,2,3,4,5)\r\n\r\nvolMatrix <- matrix(\r\n  c(0.1490, 0.1340, 0.1228, 0.1189, 0.1148,\r\n    0.1290, 0.1201, 0.1146, 0.1108, 0.1040,\r\n    0.1149, 0.1112, 0.1070, 0.1010, 0.0957,\r\n    0.1047, 0.1021, 0.0980, 0.0951, 0.1270,\r\n    0.1000, 0.0950, 0.0900, 0.1230, 0.1160),\r\n  ncol=5, byrow=TRUE)\r\n\r\nlegparams=list(dayCounter=\"Thirty360\",\r\n               fixFreq=\"Annual\",\r\n               floatFreq=\"Semiannual\")\r\n\r\nsetEvaluationDate(as.Date(\"2016-2-16\"))               \r\ntimes<-times <- seq(0,14.5,.25)\r\ndcurve <- DiscountCurve(params, tsQuotes, times=times,legparams)\r\n\r\npricing <- AffineSwaption(params, dcurve,swaptionMaturities, swapTenors, volMatrix,legparams)\r\nsummary(pricing)\r\n\r\nI receive an error everytime, \"Unknown method in AffineSwaption\"\r\n\r\nThe guide includes BKTree as a selectable option so I'm not sure what the problem here is.\r\n\r\nThank you!\r\n"},"comment":{"url":"https://api.github.com/repos/eddelbuettel/rquantlib/issues/comments/320120471","html_url":"https://github.com/eddelbuettel/rquantlib/issues/91#issuecomment-320120471","issue_url":"https://api.github.com/repos/eddelbuettel/rquantlib/issues/91","id":320120471,"user":{"login":"eddelbuettel","id":673121,"avatar_url":"https://avatars1.githubusercontent.com/u/673121?v=4","gravatar_id":"","url":"https://api.github.com/users/eddelbuettel","html_url":"https://github.com/eddelbuettel","followers_url":"https://api.github.com/users/eddelbuettel/followers","following_url":"https://api.github.com/users/eddelbuettel/following{/other_user}","gists_url":"https://api.github.com/users/eddelbuettel/gists{/gist_id}","starred_url":"https://api.github.com/users/eddelbuettel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddelbuettel/subscriptions","organizations_url":"https://api.github.com/users/eddelbuettel/orgs","repos_url":"https://api.github.com/users/eddelbuettel/repos","events_url":"https://api.github.com/users/eddelbuettel/events{/privacy}","received_events_url":"https://api.github.com/users/eddelbuettel/received_events","type":"User","site_admin":false},"created_at":"2017-08-03T23:57:00Z","updated_at":"2017-08-03T23:57:00Z","body":"It's a little complicated.  10-15 years ago CRAN kept a QuantLib library on Windows allowing me to build against it.  Now they don't, and the only way to tell CRAN not to build on Windows is that flag.\r\n\r\nIf you actually have QuantLib built (using R's compiler, this matters) then you can just override that.  I could walk you through this but it is still a lot of work....\r\n\r\n"}}
{"actor":{"display_login":"eddelbuettel"}}