Winter 2024
Prof. Ke Pang
Data Assignment
(Due February 7 at noon in MyLS dropbox)
The data assignment is worth 15% of the course grade. You can work individually or in a team of two to three
students. If you work in a team, only one team member needs to submit the assignment in MyLS. You can choose
any statistical software to use. Please

• hand in one static PDF file in which you explain how the calculations are done and answer all the questions;
• submit one data file for each question which contains all the data used in that question;
• detailed calculations can be included in the individual data file for each question or handed in separately
depending on the software used; the goal is that TA and I can easily duplicate your results;
• name your files starting with the last name(s) followed by the file description:
e.g., LastName(s)_
Data.xls, LastName(s)_
For students who work individually, include your full name and student number on the cover of the PDF file. For
students who work in teams, include the full names and student numbers of all team members on the cover of
the PDF file.
1. Part A:
1) Visit BEA’s International Data page
https://apps.bea.gov/iTable/?ReqID=62&step=1#eyJhcHBpZCI6NjIsInN0ZXBzIjpbMSwyXSwiZGF0YSI6W1
siUHJvZHVjdCIsIjEiXV19 and download Table 1.1 and Table 5.1 (in millions of current dollars at annual
frequency for 2022).
2) Visit BEA’s National Data page
(in millions of current dollars at annual frequency for 2022).
3) Replicate Table 1.1 in Chapter 1 using U.S. 2022 data. Show figures in both current dollars (in billions)
and as a percentage of GDP.
4) Compare your table with Table 1.1. in the textbook. Describe what you find.
Part B:
1) Visit Statistics Canada at https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=3610001401 and
download Table 36-10-0014-01 (in millions of current dollars at annual frequency for 2022).
2
2) Visit Statistics Canada at https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=3610022201 and
download Table 36-10-0222-01 (in millions of current dollars at annual frequency for 2022).
3) Replicate Table 1.1 in Chapter 1 using Canadian 2022 data.
4) Compare your table in A (3) with your table in B (3). Describe what you find and highlight the
2. Download the External Wealth of Nations database at EWN-dataset (10-31-2023). For each of the
following 25 countries (top 25 economies, ranked by GDP in current US\$ in 2022; together they account
for about 83% of world GDP in 2022 according to the World Bank),
United States, China, P.R. (Mainland), Japan, Germany, India, United Kingdom, France, Russia, Canada,
Italy, Brazil, Australia, South Korea, Mexico, Spain, Indonesia, Saudi Arabia, Netherlands, Turkey,
Switzerland, Poland, Argentina, Sweden, Norway, Belgium
1) Calculate the cumulative current account balances from the earliest date available to the latest date
available.
2) Find the change in the NIIP over the entire period. For NIIP use Net IIP excl gold as it has a longer
time series.
3) Calculate the cumulative valuation changes over the entire period.
4) Plot the change in the net foreign asset position against the cumulated current account balances.
5) Comment on whether cumulative current account balances represent a good measure of global
imbalances.
6) What is the quantitative importance of valuation changes for most countries in your sample?
3. Use the External Wealth of Nations database EWN-dataset (10-31-2023). For NIIP use Net IIP excl gold as
it has a longer time series.
Part A:
Recreate Figure 1.6 and Figure 1.8 with the 1970-2022 U.S. data.
Part B:
Exercise 1.15 in the tetbook. Use 1981-2022 data for China, P.R. (Mainland).
4. Visit Statistics Canada at https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=3610045401 and
download Table 36-10-0454-01 (in millions of current dollars at quarterly frequency for the period of
2018Q1 – 2023Q3).
3
Part A:
1) Calculate the cumulative change in the total asset position from the beginning of 2018Q1 to the end
of 2023Q3.
2) Calculate the cumulative changes in the total asset position due to financial account transactions,
due to exchange rate changes, due to market price changes, and due to data revisions (i.e., all other
changes to position), respectively, over the entire sample period.
3) Calculate the cumulative change in the total liability position from the beginning of 2018Q1 to the
end of 2023Q3.
4) Calculate the cumulative changes in the total liability position due to financial account transactions,
due to exchange rate changes, due to market price changes, and due to data revisions (i.e., all other
changes to position), respectively, over the entire sample period.
5) Calculate the cumulative change in the net international investment position from the beginning of
2018Q1 to the end of 2023Q3.
6) Calculate the cumulative changes in the net international investment position due to financial
account transactions, due to exchange rate changes, due to market price changes, and due to data
revisions (i.e., all other changes to position), respectively, over the entire sample period.
7) Create a bar chart and comment on the importance of cumulative financial account transactions,
exchange rate changes, market price changes, and data revisions (i.e., all other changes to position)
in determining the cumulative changes in total asset position, total liability position, and net
international investment position from the beginning of 2018Q1 to the end of 2023Q3.
Part B:
1) For each year between 2018 and 2022, calculate the annual change in the total asset position from
the beginning of the year to the end of the year.
2) For each year between 2018 and 2022, calculate the annual changes in the total asset position due
to financial account transactions, due to exchange rate changes, due to market price changes, and
due to data revisions (i.e., all other changes to position), respectively, from the beginning of the year
to the end of the year.
3) For each year between 2018 and 2022, calculate the annual change in the total liability position
from the beginning of the year to the end of the year.
4) For each year between 2018 and 2022, calculate the annual changes in the total liability position
due to financial account transactions, due to exchange rate changes, due to market price changes,
and due to data revisions (i.e., all other changes to position), respectively, from the beginning of the
year to the end of the year.
5) For each year between 2018 and 2022, calculate the annual change in the net international
investment position from the beginning of the year to the end of the year.
6) For each year between 2018 and 2022, calculate the annual changes in the net international
investment position due to financial account transactions, due to exchange rate changes, due to
4
market price changes, and due to data revisions (i.e., all other changes to position), respectively,
from the beginning of the year to the end of the year.
7) Create three seperate bar charts, which show the importance of financial account transactions,
exchange rate changes, market price changes, and data revisions (i.e., all other changes to position)
in determining the annual changes in total asset position, total liability position, and net
international investment position, respectively, for each year over the period of 2018-2022.
8) Comment on the potential driving factors on the annual changes observed.
5. Visit BEA at
https://apps.bea.gov/iTable/?ReqID=62&step=1#eyJhcHBpZCI6NjIsInN0ZXBzIjpbMSwyXSwiZGF0YSI6W1
siUHJvZHVjdCIsIjEiXV19 and download Table 1.1. U.S. International Transactions for the period of 1976-
2022 (in millions of current dollars at annual frequency).
U.S. Net International Investment Position at the End of the Period for the period of 1976-2022 (in
millions of current dollars at annual frequency).
1) Calculate the net investment income of each year.
2) Construct a time series of dark matter using the methodology explained in subsection 1.7.1. Assume
r=0.05, which is about the average real rate of return on equities in the U.S over the past 50 years.
3) Construct a time series of return differential (i.e., 𝑟𝑟𝐴𝐴
− 𝑟𝑟𝐿𝐿) using the methodology explained in
subsection 1.7.2. Assume that 𝑟𝑟𝐿𝐿 is equal to the rate of return on one-year U.S. treasury bonds