dailyDataSuite

所属分类:matlab编程
开发工具:matlab
文件大小:84KB
下载次数:1
上传日期:2017-02-27 10:23:05
上 传 者threepeople
说明:  此存档包含从Google和Yahoo! Finance下载每日股价信息以及有用的实用功能的功能。它还包含使用MATLAB的功能单元测试框架创建的单元测试工具的一个(基本但体面的)示例。
(Download This archive contains daily stock information and useful practical features Google and Yahoo! Finance function. A unit testing tool also includes functional unit testing framework created using MATLAB (basic but decent) examples.)

文件列表:
UnitTesting\Data_test_calculateAdjustedClose.mat (6718, 2013-09-26)
UnitTesting\test_calculateAdjustedClose.m (1814, 2013-09-26)
UnitTesting\script_recreateDailyData.m (1611, 2013-09-26)
UnitTesting\test_getGoogleDailyData.m (2828, 2013-09-26)
UnitTesting\test_getYahooDailyData.m (2220, 2013-09-26)
UnitTesting\test_convertGoogleToYahooTickers.m (2013, 2013-09-26)
UnitTesting\test_convertYahooToGoogleTickers.m (2036, 2013-09-26)
UnitTesting\Data_test_DailyData.mat (63046, 2013-09-26)
calculateAdjustedClose.m (1903, 2013-09-26)
convertGoogleToYahooTickers.m (2416, 2013-09-26)
convertGoogleToYahooTickers_BUG.m (2682, 2013-09-26)
convertYahooToGoogleTickers.m (2281, 2013-09-26)
getGoogleDailyData.m (6170, 2014-01-10)
getYahooDailyData.m (3274, 2013-09-26)
runAllTests.m (500, 2013-09-26)
license.txt (1315, 2014-02-12)

This archive contains functions for downloading daily stock price information from both Google and Yahoo! Finance as well as helpful utility functions. It also contains a (basic but decent) example of a unit test harness created using MATLAB's functional unit test framework. The price downloading commands and the unit test functions require features that appeared in MATLAB release 2013b. If you are using an older version of MATLAB, then the unit tests will not work. The rest of the functionality will work, but the price downloading commands will require Statistics Toolbox and will return dataset arrays instead of tables. Both Google and Yahoo! seem to allow the use of financial data for PERSONAL, INFORMATIONAL use ONLY and do not warrant against inaccuracies. These discrepancies are fairly common and are the main reason that this suite uses both Yahoo! AND Google data-- only if both sources agree on a price of data should you begin to trust it. For questions and discussion, go to www.quantsupport.com. List of primary functions: getGoogleDailyData: Downloads OHLC and volume info for one or more tickers from Google for a given range of dates. Also downloads dividend information and uses that to calculate adjusted closing prices. getYahooDailyData: Download OHLC, volume, and adjusted closing price info for one or more tickers from Yahoo! for a given range of dates. convertGoogleToYahooTickers: Converts ticker symbols formatted for Google finance to those that are recognised by Yahoo! finance. (This is crucial for non-US stocks and can be important even for US stocks.) convertGoogleToYahooTickers: The reverse of the above. calculateAdjustedClose: Uses raw closing price and dividend information to calculate the adjusted closing price. It called automatically within getGoogleDailyData so that it returns the same fields as getYahooDailyData. Unit testing functions: These are all the files in the UnitTesting folder as well as the following: runAllTests: A helper script that sets the appropriate path information and then all unit test functions for this suite. Look at it for the proper syntax of calling any given unit test individually. convertGoogleToYahooTickers_BUG: A buggy version of convertGoogleToYahooTickers-- it contains a subtle bug (_very_ subtle, in fact) and as a result will fail the test_convertGoogleToYahooTickers unit test. To make it the active file so you can see what a failed unit test looks like, change the name of convertGoogleToYahooTickers to something else and change its name to convertGoogleToYahooTickers. Don't forget to change the names back when you're done! UnitTesting/script_recreateDailyData: It's the nature of financial data to be subject to revision, so we would expect some of the unit root tests to fail afer a while simply because either Yahoo! or Google changed the historical record. If you are certain that this is the reason the tests are failing (and not because of a bug in the code), then you can run this function to overwrite the stored "expected" answers used by test_getGoogleDailyData and test_getYahooDailyData. Use with caution!

近期下载者

相关文件


收藏者