[R-SIG-Finance] But in quantmod function
Joshua Ulrich
josh.m.ulrich at gmail.com
Tue Nov 16 05:05:21 CET 2010
Noah,
On Mon, Nov 15, 2010 at 9: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
>
Which is it "^XAP" or "^XSP"?
> 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
>
Submit bugs to the package maintainer, preferably with patches. Using
a rude tone doesn't improve the chances of someone helping you.
Especially when *both* the software and the data are free.
> 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="")
>
Why don't you try this, test it, and submit a patch?
> -N
>
>
--
Joshua Ulrich | FOSS Trading: www.fosstrading.com
>
>
>
> 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.
>
> _______________________________________________
> 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