8.1 Data
The Flow-Percentage Daily Fixed-Income Strategy developed by EPFR is based on the percentage flow into fixed-income asset classes via funds reporting Premium Daily flows. In this section, the reader will gain an understanding of the aggregations which can be used to create the signal as well as the methodology behind daily percentage flow calculations.
8.1.1 Aggregations
The first step is defining a subset of data to capture in calculating our signal.
This strategy requires:
Premium Daily Fixed-Income Fund Flow Data. To ensure that we can effectively use the signal to trade at market open, we will use 7 AM EST. cut of premium daily data.
Funds with a geographic mandate confined to the country or region of interest (e.g. for the US fixed-income market, we look only at funds that have a mandate to invest in the United States).
8.1.2 Daily Percentage Flow
To begin calculating the daily percentage flow, we start with our subset of Premium Daily Fixed-Income Funds which have a geographic mandate confined to our country or region of interest. To calculate the total dollar flow into an asset class, sum the flows into the funds investing in that asset class.
\[\text{Total Flow}_{a,t} = \sum^{N}_{i=m} \text{Flow}_{i,a,t}\] Where:
- \(\text{Total Flow}\) = the total dollar flow into an asset class \(a\), across all funds in our universe \(i\), for day \(t\)
To normalize this figure, we repeat the process across the same fund’s Assets under Management (AuM) to get the total AuM held in the asset class.
\[\text{Total AuM}_{a,t} = \sum^{N}_{i=m} \text{AuM}_{i,a,t}\] Where:
- \(\text{Total AuM}\) = the total assets held in an asset class \(a\), across all funds in our universe \(i\), for day \(t\)
Finally, to get the daily percentage flow for an asset class, we divide the total dollar flow by the total AuM held in an asset class.
\[\text{Percentage Flow}_{a,t} = 100 \times \frac{\text{Total Flow}_{a,t}}{{\text{Total AuM}_{a,t}}}\] Where:
- \(\text{Percentage Flow}\) = the scaled flow as a percentage into an asset class \(a\), across all funds in our universe \(i\), for day \(t\)
We repeat this across all different asset classes for the entire history.
8.1.3 Aggregate Flow File
Users may create flow percentages for their desired asset class aggregations using the methodology described in the previous section.
Users also have the option to use the readily available Premium Daily Flow-Percentage Fixed-Income Strategy file EPFR provides, which are available in the user’s EPFR FTP connection under the PremiumDaily Fund Flows Strategies folder. The strategy file contains aggregate percentage flow data for the following list of fixed-income asset classes categorized by duration, corporate/sovereign, quality, and style:
| Duration - Short: | Duration - Intermediate: | Duration - Long: | Quality: | Style: |
|---|---|---|---|---|
| Short Term Bond | Intermediate Term | Long Term Bond | High Yield | Bank Loan |
| Short Term Corporate | Intermediate Term Corporate | Long Term Corporate | Inflation Protected | |
| Short Term Government | Intermediate Term Government | Long Term Government | Mortgage Backed | |
| Total Return |
For this demonstration, we will be using the file FloPctBond-US-PremDaily700.csv, which can be downloaded from the user’s FTP under the folder PremiumDailyFundFlows/Strategies/PremDaily and can be stored in the user’s local folder under EPFR/PremDaily.
Below shows a snippet of what the files contain:
PremiumDailyFundFlows/Strategies/PremDaily/FloPctBond-US-PremDaily700.csv
| Bank Loan | High Yield | Inflation Protected | Intermediate Term | Intermediate Term Corporate | Intermediate Term Government | Long Term Bond | Long Term Corporate | Long Term Government | Mortgage Backed | Short Term Bond | Short Term Corporate | Short Term Government | Total Return | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 20230201 | 0.1836310 | 0.1929212 | -0.0971693 | 0.1186617 | 0.1130243 | 0.0855356 | 0.0447080 | 0.5962806 | -0.9581940 | 0.2402161 | 0.0780067 | -0.0463523 | -0.1463537 | 0.2008935 |
| 20230202 | -0.0117408 | 0.6353015 | -0.0680494 | 0.0026641 | 0.1649227 | 0.4094269 | 0.0202825 | -0.3418080 | 0.3193136 | 0.0834837 | -0.0966520 | -0.1456450 | 0.1065072 | 0.0113280 |
| 20230203 | -0.0218654 | -0.3839466 | -0.2486920 | 0.0231541 | 0.0617302 | -0.1828118 | 0.1510689 | 0.8521460 | 0.4402582 | 0.1288934 | -0.0615493 | -0.0494237 | -0.4343966 | 0.0953736 |
| 20230206 | -0.0317222 | -0.3295717 | -0.1642024 | -0.1078678 | -0.0865859 | 0.0710580 | 0.0611091 | 0.0547083 | -0.0022680 | 0.0876904 | -0.0906320 | 0.0930718 | -0.2099392 | 0.1593086 |
| 20230207 | -0.1420902 | 0.1629358 | -0.1588086 | 0.1042206 | -0.0393643 | 0.2269358 | -0.0117878 | -0.9237513 | 0.4944916 | 0.0642555 | -0.1202199 | -0.2440847 | 0.1651146 | 0.0368734 |
| 20230208 | -0.0583384 | -0.0487813 | 0.0058634 | 0.1161807 | 0.0193067 | 0.0545304 | 0.2836733 | 0.3901266 | 0.0504965 | 0.0531934 | -0.0663551 | 0.0101742 | -0.2204929 | 0.1127592 |
For convenience, save the path to the flow file you choose to use as flow.file. Example shown below:
8.1.4 Return File
The return file for this strategy should contain open to open daily fixed-income ETF returns for the respective asset classes contained in the flow file, over the period of time the user wants to backtest. For convenience, save the path to the return file you choose to use as ret.file. Example shown below:
The following ETFs were used to measure the daily performance for each of the US Bond asset classes.
| Category | Ticker | Name |
|---|---|---|
| Bank Loan | BKLN | Invesco Senior Loan ETF |
| High Yield | JNK | SPDR Bloomberg Barclays High Yield Bond ETF |
| Inflation Protected | TIP | iShares TIPS Bond ETF |
| Intermediate Term | IUSB | iShares Core Total USD Bond Market ETF |
| Intermediate Term Corporate | IGIB | iShares Intermediate-Term Corporate Bond ETF |
| Intermediate Term Government | IEI | iShares 3-7 Year Treasury Bond ETF |
| Long Term Bond | AGG | iShares Core U.S. Aggregate Bond ETF |
| Long Term Corporate | IGLB | iShares Long-Term Corporate Bond ETF |
| Long Term Government | TLH | iShares 10-20 Year Treasury Bond ETF |
| Mortgage Backed | MBB | iShares MBS ETF |
| Short Term Bond | SHY | iShares 1-3 Year Treasury Bond ETF |
| Short Term Corporate | IGSB | iShares Short-Term Corporate Bond ETF |
| Short Term Government | SHV | iShares Short Treasury Bond ETF |
| Total Return | BND | Vanguard Total Bond Market ETF |
To conduct our analysis we were able to use library(quantmod) to extract historical daily returns for each of these ETFs from www.yahoofinance.com.
library(quantmod)
library(dplyr)
etf_tickers <- data.frame(
"BKLN" = "Bank Loan",
"JNK" = "High Yield",
"TIP" = "Inflation Protected",
"IUSB" = "Intermediate Term",
"IGIB" = "Intermediate Term Corporate",
"IEI" = "Intermediate Term Government",
"AGG" = "Long Term Bond",
"IGLB" = "Long Term Corporate",
"TLH" = "Long Term Government",
"MBB" = "Mortgage Backed",
"SHY" = "Short Term Bond",
"IGSB" = "Short Term Corporate",
"SHV" = "Short Term Government",
"BND" = "Total Return"
)
etf_data <- NULL
# Loop through each ETF and retrieve the data
for (ticker in names(etf_tickers)) {
# Fetch data from Yahoo Finance
etf <- getSymbols.yahoo(ticker, auto.assign = FALSE)
# Extract the "Open" prices
etf_open_prices <- Op(etf)
# Calculate daily returns (open to open)
etf_returns <- 100 * (etf_open_prices / lag(etf_open_prices) - 1)
names(etf_returns) <- etf_tickers[ticker]
# Add the returns to the data frame
if (is.null(etf_data)) {
etf_data <- data.frame(Date = index(etf_returns), etf_returns, check.names = F)
} else {
etf_data <- merge(etf_data, data.frame(Date = index(etf_returns), etf_returns, check.names = F), by = "Date", all.x = TRUE)
}
}
# format date
etf_data$Date <- txt.replace(etf_data$Date, "-", "")
# write output to desired destination
mat.write(etf_data, ret.file, "\t", F)Below shows a snippet of what the output file contains:
| Bank Loan | High Yield | Inflation Protected | Intermediate Term | Intermediate Term Corporate | Intermediate Term Government | Long Term Bond | Long Term Corporate | Long Term Government | Mortgage Backed | Short Term Bond | Short Term Corporate | Short Term Government | Total Return | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 20230201 | 0.3800472 | 0.0859865 | 0.1102358 | -0.0215528 | 0.1358162 | 0.0512012 | 0.0299509 | 0.2807440 | 0.2610926 | -0.0417241 | -0.1223373 | -0.0395344 | -0.3083028 | 0.0539678 |
| 20230202 | 0.0473272 | 1.8041240 | 0.6331389 | 0.9271244 | 1.0463106 | 0.6141259 | 0.8483865 | 1.7917116 | 1.1892385 | 0.8765484 | 0.2572257 | 0.4745930 | 0.0363843 | 0.8629981 |
| 20230203 | 0.0946095 | -0.8122408 | -0.9483003 | -1.0681478 | -1.1121799 | -0.7968824 | -1.0787846 | -2.1268790 | -1.8529605 | -0.9310040 | -0.3054368 | -0.4329880 | 0.0000000 | -1.0427893 |
| 20230206 | -0.0472601 | -0.7763434 | -0.7640562 | -0.6262166 | -0.6399031 | -0.7007347 | -0.6403196 | -0.7118791 | -0.9964225 | -1.0128366 | -0.3063726 | -0.4348710 | -0.0181890 | -0.6889956 |
| 20230207 | 0.0472824 | -0.3322671 | 0.0092713 | -0.1521071 | -0.2732303 | -0.1118737 | -0.1611077 | -0.4716981 | -0.2825106 | -0.0738393 | -0.0245810 | -0.0198498 | 0.0181923 | -0.1632468 |
| 20230208 | -0.1417802 | 0.3118625 | 0.4359533 | 0.0000000 | -0.0782722 | 0.0000000 | -0.0100879 | -0.1706164 | -0.2301855 | 0.2111231 | 0.0000000 | 0.0198537 | 0.0181821 | 0.0000000 |