[R-SIG-Finance] But in quantmod function
Joshua Ulrich
josh.m.ulrich at gmail.com
Tue Nov 16 05:13:09 CET 2010
Marc,
On Mon, Nov 15, 2010 at 9:59 PM, Marc Delvaux <mdelvaux at gmail.com> wrote:
> Jeffrey Ryan is the main author and maintainer of quantmod (even if I think
> Joshua Ulrich is working on the yahoo scraping code). Taping help(quantmod)
I haven't done anything with the options web-scraping code.
> will give you that information (same as for any package). Quantmod is
> hosted on r-forge where you can find more information if needed
> https://r-forge.r-project.org/projects/quantmod/ And of course Jeffrey is
> active on his mail list.
>
Actually, Jeff already patched the issue with symbols that start with
a carat. There may be other issues though...
Best,
--
Joshua Ulrich | FOSS Trading: www.fosstrading.com
> Author(s)
>
> Jeffrey A. Ryan
>
> Maintainer: Jeffrey A. Ryan <jeff.a.ryan at gmail.com>
>
>
> On Mon, Nov 15, 2010 at 7:38 PM, Noah Silverman <noah at smartmediacorp.com>wrote:
>
>> OK,
>>
>> Bad example. But try it for the ticker "^RUT" (Russel index)
>>
>> There ARE options: http://finance.yahoo.com/q/op?s=^RUT+Options
>>
>> Also options for the S&P mini "^XAP"
>> http://finance.yahoo.com/q/op?s=^XSP+Options
>>
>> getOptionChain("^XSP", NULL)
>>
>> Error in from:to : NA/NaN argument
>>
>> I'VE FOUND THE BUG. But don't know how/where to submit it.
>>
>> Look carefully at the URLs used by yahoo.
>>
>> For a stock
>>
>> For an index
>>
>> Notice that with an index, the "+options" part is there. Try calling the
>> page without it and it fails. The current code in quantmod doesn't add
>> this.
>>
>> I think we just need add one line: Symbols <- paste(Symbols,
>> "+options", sep="")
>>
>> -N
>>
>>
>>
>>
>>
>>
>> On 11/15/10 7:03 PM, Cedrick Johnson wrote:
>>
>>> There are technically SPX cash optns. I am not in front of my comp to look
>>> them up but they do exist indeed. SPY and DIA options do exist for the
>>> ETF's....
>>>
>>> -c
>>> Sent from my BlackBerryŽ
>>>
>>> -----Original Message-----
>>> From: Marc Delvaux<mdelvaux at gmail.com>
>>> Sender: r-sig-finance-bounces at stat.math.ethz.ch
>>> Date: Mon, 15 Nov 2010 18:49:35
>>> To: Noah Silverman<noah at smartmediacorp.com>
>>> Reply-To: mdelvaux at gmail.com
>>> Cc:<r-sig-finance at stat.math.ethz.ch>
>>> Subject: Re: [R-SIG-Finance] But in quantmod function
>>>
>>> That is because there are no options on these specific tickers, as you can
>>> see by the grayed out "options" link on the corresponding yahoo page.
>>>
>>> For options on the S&P, you need to use "SPY", and "^DJX" for the DJIA.
>>>
>>> On Mon, Nov 15, 2010 at 5:06 PM, Noah Silverman<noah at smartmediacorp.com
>>> >wrote:
>>>
>>> Hi,
>>>>
>>>> I think I've found a bug in the quantmod library.
>>>>
>>>> The function "getOptionChain" fails when fetching the chain of an index
>>>> (S&P, DJIA, etc.)
>>>> (Note: It works beautifully for options on stocks.)
>>>>
>>>> chain<- getOptionChain("^GSPC", Exp=NULL)
>>>> Error in strsplit(opt, "<tr.*?>")[[1]] : subscript out of bounds
>>>>
>>>> chain<- getOptionChain("^RUT", Exp=NULL)
>>>> Error in from:to : NA/NaN argument
>>>>
>>>>
>>>> Any ideas?
>>>>
>>>> -N
>>>>
>>>> _______________________________________________
>>>> R-SIG-Finance at stat.math.ethz.ch 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.
>>>>
>>>> [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-SIG-Finance at stat.math.ethz.ch 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.
>>>
>>
>>
>
> [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch 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