Economic Data - Frequency I obtained the historical CPI data available in monthly and quarterly format from a data repository. It seems that the Q1, Q2, etc. data are the average of the monthly data.

I thought that if I were to get quarterly data from monthly data, I can just take the March, June, Sept, and December closing figures. If I were to get the quarterly data for stock price or stock index, should I can just take the 4 month closing price or would I have to take the average of 3 months in each quarter?
Given that this is a macroeconomic study, the cost to write a script to average your data is simple and effectively costless. If you obtain your variables based off of monthly formats, then it would be wise to also obtain your other variables also in the same format.

Each time you simplify, you may potentially lose small but significant outliers in your data that are averaged out as part of your calculations. But if you have more granular data at hand, you can revisit your figures and revise your analysis as needed.

In other words, if you can do your analysis month-by-month I would recommend that you do so, it is relatively simple to scale up and analyze it by quarter as needed; it is however difficult to 'scale' down, don't mix and match two variables measured by different time segments.