IndoPhilip <- c("EIDO", "EPHE") %>%
  tq_get(get = "stock.prices", 
         from = "2017-01-01", 
         to = "2022-10-1") %>%
  group_by(symbol) %>%
  tq_transmute(select = adjusted, 
               mutate_fun = periodReturn, 
               period = "quarterly", 
               col_rename = "Returns")
IndoPhilip %>% 
  ggplot(aes(x=date, y=Returns, color = symbol))+
  geom_line()+
  scale_x_date(date_labels = "%Y", date_breaks = "1 year") +
  labs(
    x = "Date",
    y = "Adjusted Returns",
    title = "Indonesia and Philippines ETFs Trend", 
    subtitle = "Comparing Two Major Emerging Countries in Southeast Asia's ETFs from 2017 to 2022", 
    caption = "Data Source: TidyQuant", 
    color = ""  ) +
  theme_pander()

The two emerging markets ETF trend is similar. How the political factors in China (mainland) could affect investors/businesses decision of investing in Hong Kong? How did withdrew of investors/businesses from Hong Kong affect the returns of ETFs? Would investors invest in Indonesia instead?

IndoHK <- c("EIDO", "EWH") %>%
  tq_get(get = "stock.prices", 
         from = "2017-01-01", 
         to = "2022-10-1") %>%
  group_by(symbol) %>%
  tq_transmute(select = adjusted, 
               mutate_fun = periodReturn, 
               period = "quarterly", 
               col_rename = "Returns")
IndoHK %>% 
  ggplot(aes(x=date, y=Returns, color = symbol))+
  geom_line()+
  scale_x_date(date_labels = "%Y", date_breaks = "1 year") +
  labs(
    x = "Date",
    y = "Adjusted Returns",
    title = "Indonesia and Hong Kong ETFs Quarterly Trend", 
    subtitle = "Comparing Hong Kong and Indonesia ETFs Returns 2017 to 2022 (Quarterly)", 
    caption = "Data Source: TidyQuant", 
    color = ""  ) +
  theme_pander()

The trend does diverge after 2020, so want to take a closer look at the yearly data from 2020 to 2022 comparing Hong Kong data and Indonesia data.

IndoHK <- c("EIDO", "EWH") %>%
  tq_get(get = "stock.prices", 
         from = "2020-01-01", 
         to = "2022-10-1") %>%
  group_by(symbol) %>%
  tq_transmute(select = adjusted, 
               mutate_fun = periodReturn, 
               period = "yearly", 
               col_rename = "Returns")
IndoHK %>% 
  ggplot(aes(x=date, y=Returns, color = symbol))+
  geom_line()+
  scale_x_date(date_labels = "%Y", date_breaks = "1 year") +
  labs(
    x = "Date",
    y = "Adjusted Returns",
    title = "Indonesia and Hong Kong Yearly ETFs Trend", 
    subtitle = "Comparing Yearly ETFs between Indonesia and Hong Kong 2020 to 2022", 
    caption = "Data Source: TidyQuant", 
    color = ""  ) +
  theme_pander()

The yearly trend of returns of ETFs in Indonesia is better than that of the Hong Kong’s.