INNER CODE UNIT · Python
r
paperswithbacktest/pwb-toolbox · pwb_toolbox/datasets/__init__.py:896
r = df.loc[mask, col] / 100.0 # percent -> fraction
df.loc[mask, col] = face_value / (1.0 + r) ** y
return df
def __extend_etfs(df_etfs):
mapping = {
"AGG": ["Bonds-Daily-Price", "US10Y"],
"EPP": ["Indices-Daily-Price", "HSI"],
"EWA": ["Indices-Daily-Price", "AS30"], # Australia
"EWO": ["Indices-Daily-Price", "ATX"], # Austria
"EWK": ["Indices-Daily-Price", "BEL20"], # Belgium
"EWZ": ["Indices-Daily-Price", "IBOV"], # Brazil
"EWC": ["Indices-Daily-Price", "SPTSX"], # Canada
"FXI": ["Indices-Daily-Price", "SSE50"], # China
"EWQ": ["Indices-Daily-Price", "CAC"], # France