finance

Programmatically access currency exchange rates [closed]

半城伤御伤魂 提交于 2019-11-26 21:09:21
I'm setting up an online ordering system but I'm in Australia and for international customers I'd like to show prices in US dollars or Euros so they don't have to make the mental effort to convert from Australian dollars. Does anyone know if I can pull up to date exchange rates off the net somewhere in an easy-to-parse format I can access from my PHP script ? UPDATE: I have now written a PHP class which implements this. You can get the code from my website . Greg You can get currency conversions in a simple format from yahoo: For example, to convert from GBP to EUR: http://download.finance

processing negative number in “accounting” format

此生再无相见时 提交于 2019-11-26 21:03:48
I have dataset, which negative value is presented with a bracket around the number i.e. (10)==-10 , it is in csv format, how can I process it so that R will interpret the (10) as -10 ? Thank you. UPDATE I know I can work it out by replacing ( as - , remove ) , and use as.numeric afterwards, but is there a more elegant way for this issue? If you create an "as.acntngFmt" method for the accounting format, you can read (or perhaps re-read with a text connection using colClasses("acnt"). setClass("acntngFmt") # [1] "acntngFmt" setAs("character", "acntngFmt", function(from) as.numeric( gsub("\\)", "

Stock ticker symbol lookup API [closed]

若如初见. 提交于 2019-11-26 18:03:38
Is there any sort of API that just offers a simple symbol lookup service? i.e., input a company name and it will tell you the ticker symbol? I've tried just screen-scraping Google Finance, but after a little while it rate limits you and you have to enter a CAPTCHA. I'm trying to batch-lookup about 2000 ticker symbols. Any ideas? Jalmarez You can use yahoo's symbol lookup like so: http://d.yimg.com/autoc.finance.yahoo.com/autoc?query=yahoo&callback=YAHOO.Finance.SymbolSuggest.ssCallback Where query is the company name. You'll get something like this in return: YAHOO.Finance.SymbolSuggest

How to get a matplotlib Axes instance to plot to?

泄露秘密 提交于 2019-11-26 16:07:03
问题 I need to make a candlestick chart (something like this) using some stock data. For this I want to use the function matplotlib.finance.candlestick(). To this function I need to supply quotes and " an Axes instance to plot to ". I created some sample quotes as follows: quotes = [(1, 5, 6, 7, 4), (2, 6, 9, 9, 6), (3, 9, 8, 10, 8), (4, 8, 8, 9, 8), (5, 8, 11, 13, 7)] I now also need an Axes instance though, at which I am a bit lost. I created plots before using matplotlib.pyplot. I think I now

Yahoo Finance All Currencies quote API Documentation

若如初见. 提交于 2019-11-26 15:24:06
问题 I've being using this feed for a long time, I believe Apple does it as well in one of the mac widgets. but what is really curious is that I simply can't find any documentation for it, I've tried google and everything. http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote I can see people using different parameters like view=basic date=Ymd; currency=true but it's horrible there isn't anything official. For now I am using these parameters: format=json and callback=list sometimes...

Yahoo! Finance CSV file will not return Dow Jones (^DJI)

左心房为你撑大大i 提交于 2019-11-26 10:31:02
问题 I am trying to retrieve market data from Yahoo! finance and the script has worked fine for years, but recently, it stopped showing The Dow Jones data. Here is the URL: http://download.finance.yahoo.com/d/quotes.csv?s=^DJI,^IXIC,^GSPC,^TNX&f=snl1d1t1c1ohg The URL should return data on: Dow Jones NASDAQ S&P 10 Year Bonds It actually doesn\'t get returned into the CSV for me, I have tried everything I can think of, but to no avail, and I haven\'t seen anyone having the same problem online. Any

Programmatically access currency exchange rates [closed]

陌路散爱 提交于 2019-11-26 07:52:26
问题 I\'m setting up an online ordering system but I\'m in Australia and for international customers I\'d like to show prices in US dollars or Euros so they don\'t have to make the mental effort to convert from Australian dollars. Does anyone know if I can pull up to date exchange rates off the net somewhere in an easy-to-parse format I can access from my PHP script ? UPDATE: I have now written a PHP class which implements this. You can get the code from my website. 回答1: You can get currency

processing negative number in “accounting” format

≡放荡痞女 提交于 2019-11-26 07:49:44
问题 I have dataset, which negative value is presented with a bracket around the number i.e. (10)==-10 , it is in csv format, how can I process it so that R will interpret the (10) as -10 ? Thank you. UPDATE I know I can work it out by replacing ( as - , remove ) , and use as.numeric afterwards, but is there a more elegant way for this issue? 回答1: If you create an "as.acntngFmt" method for the accounting format, you can read (or perhaps re-read with a text connection using colClasses("acnt").

Decimal vs Double Speed

二次信任 提交于 2019-11-26 07:25:24
问题 I write financial applications where I constantly battle the decision to use a double vs using a decimal. All of my math works on numbers with no more than 5 decimal places and are not larger than ~100,000. I have a feeling that all of these can be represented as doubles anyways without rounding error, but have never been sure. I would go ahead and make the switch from decimals to doubles for the obvious speed advantage, except that at the end of the day, I still use the ToString method to

Stock ticker symbol lookup API [closed]

拥有回忆 提交于 2019-11-26 06:10:08
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Is there any sort of API that just offers a simple symbol lookup service? i.e., input a company name and it will tell you the ticker