how can I get currency exchange from yahoo finance and google finance?

for example ticker='EURUSD=X' I tried fetch, but it only gives the current price, historical data is not available I tried dftool, it's the same, anyone has solution for this? thanks a lot!

回答 (2 件)

Sean de Wolski
Sean de Wolski 2014 年 6 月 11 日

0 投票

You'll want to specify the date ranges to yahoo's fetch:
Example:
y = yahoo;
x = fetch(y,'SAM','Close','Aug 1 2012','Mar 20 2014')

3 件のコメント

Xiang
Xiang 2014 年 6 月 11 日
I tried: x = fetch(y,'EURUSD=X','Close','Aug 1 2013','Mar 20 2014') I got: Unable to return historical data for given security.
Sean de Wolski
Sean de Wolski 2014 年 6 月 11 日
That's apparently not a valid security or at least not in the expected format.
Xiang
Xiang 2014 年 6 月 12 日
I tried x = fetch(y,'EURUSD=X') I got the current price, but no historical price

サインインしてコメントする。

Josh Perry
Josh Perry 2015 年 8 月 16 日

0 投票

yahoo and google will only give you today's information for currencies. To get historical data you must use another data feed service.

質問済み:

2014 年 6 月 11 日

回答済み:

2015 年 8 月 16 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by