Estratégia Financeira

Part 2 - ch.10 Capital Markets and the Pricing of Risk

Henrique C. Martins

19-02-2024

Chapter outline

10.1 Risk and Return: Insights from History

10.2 Common Measures of Risk and Return

10.3 Historical Returns of Stocks and Bonds

10.4 The Historical Trade-Off Between Risk and Return

10.6 Diversification in Stock Portfolios

10.7 Measuring Systematic Risk

10.8 Beta and the Cost of Capital

10.1 Risk & Return: Insights from History

10.1 Risk & Return: Insights from History

10.1 Risk & Return: Insights from History

Some Insights:

  • Small stocks had the highest long-term return, while T-Bills had the lowest.

  • Small stocks had the largest fluctuations in price, while T-Bills had the lowest.

    • Higher risk requires a higher return.
  • But, few people ever make an investment for so many years.

  • More realistic investment horizons and different initial investment dates can greatly influence each investment’s risk and return.

Notice the volatility next slide.

10.1 Risk & Return: Insights from History

Insights from Brazil (1995-2023).

R
library(downloader)
library(dplyr)
library(GetQuandlData)
library(ggplot2)
library(ggthemes)
library(PerformanceAnalytics)
library(plotly)
library(readxl)
library(roll)
library(tidyr)
library(tidyquant)
library(yfR)

#Ibov
stock<-'^BVSP' 
start<-'1995-01-01' 
end   <- Sys.Date() 
ibov <- yf_get(tickers = stock,first_date = start,last_date = end)
ibov<- ibov[order(as.numeric(ibov$ref_date)),]
# Cumulative return Ibov
ibov$Ibov_return <- ibov$cumret_adjusted_prices -1

#Selic - Download manually from ipeadata "Taxa de juros: Overnight / Selic"
selic <- read_excel("files/selic.xls")
names(selic) <- c("ref_date", "selic")
selic$ref_date <- as.Date(selic$ref_date , format = "%d/%m/%Y")
selic <- na.omit(selic)
selic$selic <- selic$selic / (252* 100)

# Cumulative return Selic
return_selic <- data.frame(nrow(selic):1)
colnames(return_selic)<- "selic_return"
for(i in (2:nrow(selic))) {
return_selic[i,1] <- Return.cumulative( selic$selic[1:i] )
}

# Merging dataframes
selic <- cbind(selic, return_selic)
df <- merge(ibov ,selic, by=c("ref_date"))
df$selic_return[1] <- NA
df$Ibov_return[1] <- NA
# Graph cumulated return CDI and IBOV
p <- ggplot(df, aes(ref_date)) +
geom_line(aes(y = Ibov_return, colour = "Ibov")) +
geom_line(aes(y = selic_return, colour = "Selic")) +
labs(y='Cumulative return (daily)') + theme_solarized() +
  ggtitle("Cumulative Returns  Ibov, and Selic (1995-2023)")
ggplotly(p)