Created
March 28, 2021 03:20
-
-
Save sguzman/a6d3bbd67ea2f170a349ff078b621922 to your computer and use it in GitHub Desktop.
Precache sp500 closing prices for all stocks
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[{items = EntityList@EntityClass["Financial", "SP500"]}, | |
finhash[str_] := finhash[str] = FinancialData[str, "Close", All]; | |
Monitor[ | |
Table[ | |
finhash[items[[n]]] | |
, {n, 1, Length@items} | |
] | |
, ProgressIndicator[n, {1, Length@items}] | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment