0

AAPl で 2 日分のコール/プット オプションを取得しようとしています。

このコマンドを使用してcsvとして保存していますが、現在2日分の情報が必要です:

AAPL.csv <- getOptionChain("AAPL")

別の関数からのコマンドをマージしようとしましたが、うまくいかないようです。以下のコード:

getOptionChain("AAPL",what=yahooQF(c("Bid","Ask")),from = as.Date("2013-01-30"), to = as.Date("2013-01-31" )、EOD_time = "9:30:00" から EOD_time = "15:00:00" まで)

2 日分のオプションとエクイティ データを取得する方法について何か提案はありますか?

4

1 に答える 1

3

AFAIK yahoo doesn't provide historical data for options. If it does, getOptionChain isn't intended to be used that way.

getOptionChain is more like getQuote than getSymbols. It gets quotes for an option chain. You can get quotes for multiple expirations and strikes, but you can't get a time series of prices.

The Value section of help("getOptionChain") tells you what the function returns:

A named list containing two data.frames, one for calls and one for puts. If more than one expiration was requested, this two-element list will be contained within list of length length(Exp). Each element of this list will be named with the expiration month and year (for Yahoo sourced data).

If Exp is set to NULL, all expirations will be returned. Not explicitly setting will only return the front month.

于 2013-02-05T02:16:10.043 に答える