title: “Taiwan ETF Adjusted Prices” author: “Your Name” date: “2026-09-29” output: html_document —
This report presents the daily adjusted prices of three Taiwan ETFs: 0050 Yuanta Taiwan 50, 0052 Fubon Technology, and 0056 Yuanta High Dividend.
The sample period is from January 1, 2010 to September 22, 2026.
library(dplyr)
library(tidyr)
library(xts)
data <- read.csv("20260922_20100101.csv",
fileEncoding = "UTF-8-BOM",
check.names = FALSE)
head(data)
## CO_ID Date Close(NTD)
## 1 0050 Yuanta Taiwan Top50 20100104 8.4501
## 2 0052 FB Technology 20100104 2.9216
## 3 0056 PTD 20100104 8.4679
## 4 0050 Yuanta Taiwan Top50 20100105 8.4501
## 5 0052 FB Technology 20100105 2.9256
## 6 0056 PTD 20100105 8.4318
data2 <- data %>%
mutate(
Date = as.Date(as.character(Date), format = "%Y%m%d"),
Code = substr(CO_ID, 1, 4)
)
etf_wide <- data2 %>%
mutate(
ETF = case_when(
Code == "0050" ~ "0050 元大台灣50",
Code == "0052" ~ "0052 富邦科技",
Code == "0056" ~ "0056 元大高股息"
)
) %>%
select(Date, ETF, `Close(NTD)`) %>%
pivot_wider(
names_from = ETF,
values_from = `Close(NTD)`
) %>%
arrange(Date)
etf_ts <- xts(
etf_wide[, -1],
order.by = etf_wide$Date
)
head(etf_ts)
## 0050 元大台灣50 0052 富邦科技 0056 元大高股息
## 2010-01-04 8.4501 2.9216 8.4679
## 2010-01-05 8.4501 2.9256 8.4318
## 2010-01-06 8.6072 2.9936 8.5579
## 2010-01-07 8.5847 2.9616 8.4859
## 2010-01-08 8.6371 2.9528 8.5760
## 2010-01-11 8.6595 2.9696 8.6660
etf_ts["2020-01-02/2020-01-09"]
## 0050 元大台灣50 0052 富邦科技 0056 元大高股息
## 2020-01-02 19.8573 8.1422 16.9530
## 2020-01-03 19.8573 8.0922 17.0054
## 2020-01-06 19.6031 8.0033 16.8772
## 2020-01-07 19.5421 7.9755 16.7199
## 2020-01-08 19.4506 7.9144 16.6091
## 2020-01-09 19.7149 8.0477 16.7257
The daily adjusted price data for ETFs 0050, 0052, and 0056 were successfully imported from TEJ, transformed into a wide format, and converted into an xts time series object in R.