Created
April 25, 2020 19:35
-
-
Save sguzman/8b9e38dab96b6bac2bfb5a3c1e663574 to your computer and use it in GitHub Desktop.
Mathematica expression that converts nominal pricing for some time series (I use stock price) to today's dollars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
With[{data = Out[9]}, | |
Map[ | |
With[{modate = DateValue[First@#, {"Year", "Month", "Day"}]}, | |
{First@#, | |
Quantity[ | |
QuantityMagnitude@ | |
InflationAdjust[ | |
Quantity[QuantityMagnitude@Last@#, | |
DatedUnit["USDollars", modate]] | |
, Today], "USDollars"] | |
}] &, data] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment