[R-SIG-Finance] How to download options data in R from a csv list of underlying stock symbols?

G See gsee000 at gmail.com
Mon Sep 29 04:33:06 CEST 2014


getOptionChain() only provides the most recent quote, not historical
time series data.  That's why I didn't answer your question on SO. ;-)

Sorry,
Garrett

On Sun, Sep 28, 2014 at 9:27 PM, Liu <carloslewlew at gmail.com> wrote:
> Hello G See,
> May I ask about the usage of getOptionChain? If I want to download a whole
> month options EOD data, what do I do? I tried:
> AA<-getOptionChain(tick[1],from="2014-09-01",to="2014-09-28")
> but it only returns 1 day option chain data, which is same as:
> AA<-getOptionChain(tick[1])
>
> Thank you
> Carlos
>
> On Sun, Sep 28, 2014 at 10:05 PM, G See <gsee000 at gmail.com> wrote:
>>
>> Please don't cross post:
>>
>> http://stackoverflow.com/questions/26091219/how-to-download-options-data-in-r-from-a-csv-list-of-underlying-stock-symbols
>>
>> On Sun, Sep 28, 2014 at 8:11 PM, Liu <carloslewlew at gmail.com> wrote:
>> > Hello everyone,
>> >
>> >
>> > I've recently joined this mailing list for quantstrat. I hope not to ask
>> > repetitive question but I haven't googled any effective solutions yet.
>> >
>> >
>> > I have a csv file containing 100 stock symbols. I want to download the
>> > option chains of each underlying including price, volume, IV, HV etc.
>> > Hopefully with greeks too. EOD data from yahoo finance would be adequate
>> > for now. I’m using R 3.1.1 on Windows 8, 64 bit.
>> >
>> >
>> >
>> > At first, I tried “quantmod” using “getSymbols”, as a result I have got
>> > a
>> > vector of stock symbols.
>> >
>> >
>> >
>> >     ticker<-read.csv("C:/User/User/Documents/equity ticker.csv")
>> >
>> >     getSymbols(ticker, from=”2014-09-01”, to=Sys.date())
>> >
>> >
>> >
>> > But it is not numerical options data, but just character symbols. (I
>> > might
>> > understand it wrongly, please correct if I misuse "getSymbols" or other
>> > functions)
>> >
>> >
>> >
>> > Then I tried “yahoo_opt” <
>> > http://page.math.tu-berlin.de/~mkeller/index.php?target=rcode>, but this
>> > script requires “fCalander” which is no longer available in CRAN. I
>> > downloaded the achive from here <
>> > http://cran.r-project.org/src/contrib/Archive/fCalendar/ > But I
>> > couldn’t
>> > install it. The last version of “fCalander” seemed to be compatible with
>> > R
>> > 2.2, therefore I was unable to run the R file.
>> >
>> >
>> >
>> > Please help with using quantmod/quantstrat more effectively, or other
>> > available methods to download those options data. By the way how can I
>> > search the old posts in this mailing list? Thank you.
>> >
>> >
>> > Carlos
>> >
>> >         [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > R-SIG-Finance at r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only. If you want to post, subscribe first.
>> > -- Also note that this is not the r-help list where general R questions
>> > should go.
>
>



More information about the R-SIG-Finance mailing list