I'm working with Financial Data and I'm using this code:

"CumulativeFractionalChange", {2000}], 
FinancialData["DAX", "CumulativeFractionalChange", {2000}]}, 
ImageSize -> Large, Joined -> True, Filling -> Bottom]

enter image description here

But, my aim is to compare the "cumulative fractional change", of the two time series, in the same currency values (for example all in euro, or all in dollar). Infact, "sp500" is denominated in Dollar, and Dax in Euro. How I can do to convert and plot both in the same currency ?

  • 2
    $\begingroup$ I'm not sure about this, but would a fractional change not imply that you have a ratio of say x/y where both x and y are in the same currency and currency unit cancels out? This might be a stupid question though. $\endgroup$
    – halirutan
    Feb 4, 2018 at 16:56
  • $\begingroup$ You can try this extremely slow Quantitiy stuff in mma. I think it proves probably @halirutan right. currency = {"USDollars", "Euros"}; convert[Rule[a_?(MemberQ[currency, #] &), b_?(MemberQ[currency, #] &)]][pair_] := If[Length@pair >= 1, With[{val = #}, ({#1, Evaluate@ CurrencyConvert[Quantity[#2, DatedUnit[a, #1]], DatedUnit[b, #1]]} & @@ val) /. Quantity[x_, y__] -> x] & /@ pair, $Failed]; $\endgroup$ Feb 4, 2018 at 17:35
  • $\begingroup$ Now plot it: {DateListPlot[{FinancialData["SP500","CumulativeFractionalChange",{2018}],convert[ "Euros"-> "USDollars"][FinancialData["DAX","CumulativeFractionalChange",{2018}]]},ImageSize->Large,Joined->True,Filling->Bottom],DateListPlot[{convert[ "USDollars"-> "Euros"][FinancialData["SP500","CumulativeFractionalChange",{2018}]],FinancialData["DAX","CumulativeFractionalChange",{2018}]},ImageSize->Large,Joined->True,Filling->Bottom]}//Row and compare them with your plot for year 2018. It seems units cancels out in this metric. $\endgroup$ Feb 4, 2018 at 17:37
  • $\begingroup$ @PlatoManiac I tried your code but, seems there's some problem due to inflation adjust in time. When I try the code appears this Message: InflationAdjust::insfferd: Cannot fetch exchange rate conversion data for Euros to USDollars for {.........}. Where in "......" there are a series of data (single event, not continuos) in the time when, I suppose, inflation was adjusted by the provider of the financial data. $\endgroup$ Feb 8, 2018 at 23:31