Jumat, 28 September 2012

Re: [ExcelVBA] ^VIX

 

Hi David,
 
I did some experiments where I copied out what the properties of the "Down load to Spreadsheet" to try and ID the string of the URL. What makes it hard is the fact that ^VIX has the ^ in front of it.
 
2 strings:
^VIX  =   strURL = "http://ichart.finance.yahoo.com/table.csv?s=%5EVIX&d=8&e=28&f=2012&g=d&a=0&b=2&c=1990&ignore=.cvs"
AA  =      strURL = "http://ichart.finance.yahoo.com/table.csv?s=AA&d=8&e=28&f=2012&g=d&a=0&b=2&c=1962&ignore=.csv"
 
So the Delta is after the first =  %5VIX compared to just AA, so it is the %5 for the VIX that is different. I do not see any easy way to figure this out except with an if on the Symbol looking for ^.
 
Thanks for your help.
 
David
 

________________________________
From: David Grugeon <yahoo@grugeon.com.au>
To: ExcelVBA@yahoogroups.com
Sent: Friday, September 28, 2012 3:15 PM
Subject: RE: [ExcelVBA] ^VIX


 

Put a line after you create the url
Msgbox strURL

Run it and have a good look at the string created. Copy it and paste it
into the browser and see if it works. Compare it with the browser string
that does work.

I think it would help if you converted numbers to strings so instead of
& 1 & "+" & 27 &
You use
& "1" & "+" & "27" &

Best Regards
David Grugeon
Excel VBA Group Moderator

-----Original Message-----
From: mailto:ExcelVBA%40yahoogroups.com [mailto:mailto:ExcelVBA%40yahoogroups.com] On Behalf
Of David
Sent: Saturday, 29 September 2012 3:10 AM
To: mailto:ExcelVBA%40yahoogroups.com
Subject: [ExcelVBA] ^VIX

Hello Every One,

Good day I Hope? I am using
Dim objXML As Object
Dim strURL As String
Dim Sym As String
Set objXML = CreateObject("MSXML2.XMLHTTP")

strURL = " http://finance.google.com/finance/historical?histperiod=daily&q=
" _
& Sym & "&startdate=Jan+1%2C+1975" & "&enddate=" _
& 1 & "+" & 27 & "%2C+" & 2010 & "&output=csv"

It brings in the most recent data and the dates do not make a difference.
What I an trying to do it bring in the price history for VOLATILITY S&P 500
(^VIX), but it is failing.

The Sym can not be ^VIX or any combination that I have tried. Any ideas what
I can use to get this to work?

Thanks,
David

------------------------------------

----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go
here: http://www.mousetrax.com/techtrax to enter the ezine, then search the
ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com/

----------------------------------Yahoo! Groups Links

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar