2016-07-15 6 views
0

의 데이터를 반환하지 않았습니다. quantmod::getOptionChain()을 통해 옵션 체인을 가져올 수 없었으며 다른 누군가가 동일한 문제를 겪고 있거나 문제를 해결할 수 있는지 알고 싶었습니다 ...getOptionChain()은 지난 날에

library("quatmod") 
getOptionChain("AAPL") 

반환 : 자료는 G에서 옵션 체인을 다운로드 할 수있는 대안으로

sessionInfo()

R version 3.3.0 (2016-05-03) 
Platform: x86_64-apple-darwin13.4.0 (64-bit) 
Running under: OS X 10.11.5 (El Capitan) 

locale: 
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 

attached base packages: 
[1] parallel stats  graphics grDevices utils  datasets methods base  

other attached packages: 
[1] rvest_0.3.2     xml2_0.1.2     RCurl_1.95-4.8    bitops_1.0-6     
[5] jsonlite_0.9.21    quantstrat_0.9.1739   blotter_0.9.1741    RQuantLib_0.4.2    
[9] XML_3.98-1.4     Quandl_2.8.0     data.table_1.9.6    PortfolioAnalytics_1.0.3636 
[13] pbapply_1.2-1     FinancialInstrument_1.2.0  highfrequency_0.4    doParallel_1.0.10    
[17] iterators_1.0.8    foreach_1.4.3     stringr_1.0.0     forecast_7.1     
[21] timeDate_3012.100    DEoptim_2.2-3     lubridate_1.5.6    plyr_1.8.4     
[25] tseries_0.10-35    PerformanceAnalytics_1.4.3541 quantmod_0.4-5    TTR_0.23-1     
[29] xts_0.9-7      zoo_1.7-13     

loaded via a namespace (and not attached): 
[1] Rcpp_0.12.5  tools_3.3.0  gtable_0.2.0  lattice_0.20-33 httr_1.1.0  grid_3.3.0  nnet_7.3-12  R6_2.1.2   
[9] ggplot2_2.1.0 magrittr_1.5  scales_0.4.0  codetools_0.2-14 colorspace_1.2-6 fracdiff_1.4-2 quadprog_1.5-5 stringi_1.0-1 
[17] munsell_0.4.3 chron_2.3-47 
+0

이것은 [알려진 문제 (https://github.com/joshuaulrich/quantmod/issues/92). –

+0

Google에서 R로 옵션 체인을 다운로드하려면 [이 블로그 게시물] (https://www.r-bloggers.com/downloading-option-chain-data-from-google-finance-in-r-an- update /) – hvollmeier

답변

2

named list() oogle은 flipsideR 패키지를 사용합니다. 데이터는 puts 및 호출의 큰 테이블 하나에 반환됩니다.

install_github("DataWookie/flipsideR") 

는 AAPL의 데이터를 얻을 :

library(flipsideR) 
AAPL = getOptionChain("AAPL") 
both(AAPL) 
    symbol type  expiry strike premium bid ask volume open.interest 
1 AAPL Call 2016-08-12  75  NA 33.6 34.05  NA    0 
2 AAPL Call 2016-08-12  80 25.66 28.6 29.05  NA    0 
3 AAPL Call 2016-08-12  85  NA 23.6 24.05  NA    0 
      retrieved 
1 2016-08-10 13:41:48 
2 2016-08-10 13:41:48 
3 2016-08-10 13:41:48 
    symbol type  expiry strike premium bid ask volume open.interest 
890 AAPL Put 2018-01-19 170 63.5 62.00 62.65  NA   4304 
891 AAPL Put 2018-01-19 175 78.0 66.45 67.50  NA   2133 
892 AAPL Put 2018-01-19 180 75.6 71.25 72.35  NA   2898 
       retrieved 
890 2016-08-10 13:41:50 
891 2016-08-10 13:41:50 
892 2016-08-10 13:41:50 
> dim(AAPL) 
[1] 892 10 
+0

이제 마지막 거래 가격을 어떻게 가져 오면 FlipSideR에서 getOptionChain을 quantmod masks 마스크로 볼 수 있습니까? –