是否可以使用 Finance::Quote 获取交易所的索引?
我需要获取像纳斯达克这样的交易所的指数,而不是该交易所特定股票的价格。我想 Finance::Quote 会来救援,但经过快速浏览文档,我发现使用该模块进行查询的方式如下:
%info = $q->fetch("australia","CML")
这意味着查询中应该指定交易所和股票。那么问题是:指数本身是否可以被视为股票并具有可以在查询中使用的代码名称?
当然,如果您有其他方式可以满足我的需求而不是使用Finance::Quote,请随时写下您的解决方案。
I need to get the index of a exchange like NASDAQ rather than the price of a specific stock in that exchange. I suppose that Finance::Quote will come to the rescue , but after a quick go-through of the document, I find it the way one can use the module for query is like:
%info = $q->fetch("australia","CML")
which means both the exchange and the stock should be specified in the query. then the question is: does the index itself can be treated as a stock and has a symbol name which can be used in the query?
Of course, if you have other way can meet my needs rather than using Finance::Quote, please feel free to write down your solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的问题的问题在于您假设特定交易所只有一个索引。虽然很可能存在一个占主导地位的特定指数(例如,对于主要在伦敦证券交易所交易的股票,富时 100 可能被视为主要指数;类似地,对于纽约证券交易所来说,它将是道琼斯工业平均指数),但其他交易所可能会在其相关指数集合中没有明确的领先者(例如,对于澳大利亚证券交易所而言,S&P/ASX 200 和所有普通股指数都经常在晚间广播新闻中并排引用)。
股票、指数、期权链、期货等的符号学是金融IT中相当复杂的领域。许多符号标准都得到数据供应商(例如路透社、彭博社)的支持,并且使用其标准需要商业许可。另一方面,还有其他旨在使符号学更加开放的努力(彭博本身是其中一项努力)。
我不熟悉您引用的 Finance::Quote 包的数据源,但如果您真的想访问市场数据(即准备付费)但不需要成本/复杂性/速度来自路透社、彭博社等的解决方案,您可能会做的比查看 Xignite 以市场方式提供的内容更糟糕通过网络服务可访问的数据。
The problem with your question is that you are assuming that there is just one index for a particular exchange. Whilst there may well be a particular index that is dominant (eg. for stocks primarily traded on the London Stock Exchange, the FTSE 100 might be considered the main index; similarly for the NYSE it would be the Dow Jones Industrial Average) other exchanges may have a less clear leader in their collection of associated indicies (eg. for the Australian Stock Exchange, the S&P/ASX 200 and the All Ordinaries index are both frequently quoted side-by-side in the evening broadcast news).
Symbology of stocks, indicies, option chains, futures, etc is quite a complicated field in financial IT. Many of the symbology standards are backed by a data vendor (eg. Reuters, Bloomberg) and use of their standards requires a commercial license. On the other hand there are other efforts aiming to make symbology more open (Bloomberg themselves are behind one of these efforts).
I'm not familiar with the data sources of the Finance::Quote package you reference, but if you are serious about accessing market data (ie. prepared to pay for it) but don't need the cost/complexity/speed of a solution from Reuters, Bloomberg, etc, you could do alot worse than check out what Xignite offers in the way of market data accessible via web services.
纳斯达克综合指数的符号是“^IXIC”。对于 nyse 复合材料,它是“^NYA”。
不过,每个报价提供者可能有不同的语法。
the symbol for the nasdaq composite is "^IXIC". For nyse composite it's "^NYA".
each quote provider might have a different syntax though.