Hello! I just upgraded Mathematica from v. 12.1 to 14.1, and I have a quite basic problem with currency conversion! Formerly, the code hereunder
Clear["Global`*"];
port = {"NASDAQ:COST", "NASDAQ:NFLX", "NYSE:LMT", "PA:SU",
"NASDAQ:AMZN", "PA:AM"};
EnClair = Map[FinancialData[#, "Name"] &, port]
début = DayRound[DatePlus[{-18, "Month"}], "BusinessDay"]
Prix = CurrencyConvert[
FinancialData[#, "Price", {début, Date[]}, "DateValue"],
"USDollars"] & /@ port;
\[Eta] = 0.9;
Fractiles = Map[QuantityMagnitude@Quantile[#, \[Eta]] &, Prix];
Print@MapThread[
DateListPlot[#1, Frame -> True, Filling -> #2, PlotRange -> All,
PlotLabel -> #3 <> " ; \[Eta]=" <> ToString@\[Eta]] &, {Prix,
Fractiles, EnClair}];
resulted in a plot of time series, but this doesn’t work in v14, because “Prix” cannot be computed anymore (this is endless). What should I do?
Best regards, Claude.
hansmilton
(Hans Milton)
December 3, 2024, 5:58pm
2
I have tried your example in 12.3 where it works as expected. But 14.0 and 14.1 seems unable to handle Schneider Electric and Dassault Aviation . Removing them returns a result:
port = {"NASDAQ:COST", "NASDAQ:NFLX", "NYSE:LMT", "NASDAQ:AMZN"};
EnClair = Map[FinancialData[#, "Name"] &, port]
début = DayRound[DatePlus[{-18, "Month"}], "BusinessDay"]
Prix = CurrencyConvert[
FinancialData[#, "Price", {début, Date[]}, "DateValue"],
"USDollars"] & /@ port;
\[Eta] = 0.9;
Fractiles = Map[QuantityMagnitude@Quantile[#, \[Eta]] &, Prix];
Print@MapThread[
DateListPlot[#1, Frame -> True, Filling -> #2, PlotRange -> All,
PlotLabel -> #3 <> " ; \[Eta]=" <> ToString@\[Eta]] &, {Prix,
Fractiles, EnClair}]
Thanks for your answer, Hans.
But, excepted both these cases, all the assets of the list are labelled in $, while Schneider Electric and Dassault Aviation are labelled in € and need a conversion.
Regards,
Claude