I think Noah was just proud like "I HAVE FOUND THE BUG" ! :)
A good tone is always highly recommended ..


On Tue, Nov 16, 2010 at 5:17 AM, Noah Silverman <noah@smartmediacorp.com>wrote:

> Josh,
>
> Responding in order of your comments:
>
> 1) Typo.  The symbol is "^XSP".  Regardless, it fails for options on any
> index.
>
> 2) I wasn't using a rude tone.  I am extremely appreciative and grateful
> for all the wonderful R people, code, and community.  I read through the
> code, tried a few things, and suggested a fix to the list.  Don't see how
> that's rude in any way.
>
> 3) I'm new to R, so don't know the proper protocol (or even how/where) to
> submit a patch.  That's why I asked the list.  Happy to contribute where I'm
> able, but need to know the proper way.
>
> Thanks,
>
> -N
>
>
> On 11/15/10 8:05 PM, Joshua Ulrich wrote:
>
>> Noah,
>>
>> On Mon, Nov 15, 2010 at 9:38 PM, Noah Silverman<noah@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@gmail.com>
>>>> Sender: r-sig-finance-bounces@stat.math.ethz.ch
>>>> Date: Mon, 15 Nov 2010 18:49:35
>>>> To: Noah Silverman<noah@smartmediacorp.com>
>>>> Reply-To: mdelvaux@gmail.com
>>>> Cc:<r-sig-finance@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@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@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@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@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@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.
>



-- 
Ulrich Staudinger
ustaudinger@activequant.org
http://www.activequant.org

	[[alternative HTML version deleted]]

