Code:
stockquote ^GSPC, start_date(2021-01-01) end_date(2022-06-01)
Code:
loc stocks ^GSPC LSEG.L ^DJI ^IXIC ^N100 ^NYA ^VIX GD LMT NOC RTX clear cls set tr off foreach x of loc stocks { tempfile "`x'" stockquote `x', start_date(2021-01-01) end_date(2022-06-01) g stock = "`x'" keep date stock adjclose order stock date, first rename adj price mer m:1 stock using `stockdata', nogen qui sa ``x'', replace } foreach x of loc stocks { ap using ``x'' }
Code:
_"^GSPC invalid name r(198);
Code:
sa ^GSPC, replace emptyok
0 Response to Naming tempfiles
Post a Comment