\[ r = \frac{ln(FV/PV)}{t} \\ doubles = \frac{ln(FV/PV)}{ln(2)} \]
PV <- 100000
FV <- 2000000
t <- 30
r <- round(log(FV/PV)/t,4) # Calculation for Annual Rate of Return
double <- round(log(FV/PV)/log(2),2) # Equation to determine the number of doubles
The annual rate of return for the investment club portfolio is 0.0999. The investment has doubled 4.32 times.
tm <- 70/5
It will take the investment approximately 14 years for the investment to double.
PV = 100000 # Present Value
mult = 64 # 2^6Value of 1 doubling six times
FV1 = mult*PV
rate <- round(log(mult)/30,3) # Rate required for the investment to double 6 times in 30 years.
carbon <- read.table("https://raw.githubusercontent.com/tjdevine/EC255/refs/heads/main/co2.txt",header=TRUE)
names(carbon)
## [1] "year" "CO2"
plot(carbon$CO2 ~ carbon$year, type = "l", main = "CO2 over time")
ln_co2 <- log(carbon$CO2)
plot(ln_co2 ~ carbon$year,type="l",main = "Log_CO2 over time")
# 66 Years
start_carbon <- carbon$CO2[1]
end_carbon <- carbon$CO2[66]
rate <- log(end_carbon/start_carbon)/66 # Find c.c. rate
Read the data into R and create a line plot of CO2 Level against year. Comment on the shape of the relationship.
Create a new variable that is the log transformation of CO2. Plot the log transformed CO2 level against year.
Assuming continuous compounding, what is the annual percentage change in carbon emissions?
The annual percentage change in carbon emissions is 0.0044772
Q5_a <- exp(5.966403)
Q5_b <- log(400)
start_lnco2 <- 5.966403
end_lnco2 <- 6.042823
# years = 14
Q5_c <- round((end_lnco2 - start_lnco2)/14)
What was the concentration of CO2 in 2010? 390.0999545
It was recommended to try and keep CO2 concentrations below 400 PPM. What year did CO2 concentrations climb above 400 for the first time? The log transformed carbon values in 2010 are5.9914645. Carbon concentrations above that value are above 400 PPM. In 2015, carbon concentrations cross that threshold.
Assuming CO2 concentrations are growing at a continuous rate (identical to continuous compounding), what is the average annual percentage increase in CO2 from 2010 to 2023?
0
There are a couple ways to show this. You can plot it out to visualize the maximum. Or, you can use calculus or the optim function.
\[\begin{align*} \pi = -Q^{2} + 15Q - 10 \end{align*}\]
q <- seq(from = 0, to = 15, by = 1)
pi <- -q^2 + 15*q - 10
plot(pi ~ q, type = "l")
q_max <- -15/(-2)
pi_max <- -q_max^2 + 15*q_max - 10
q_max
## [1] 7.5
pi_max
## [1] 46.25
pi_fun <- function(x) {
-x^{2} + 15*x - 10
}
optimize(pi_fun,maximum = TRUE, interval = c(0,25))
## $maximum
## [1] 7.5
##
## $objective
## [1] 46.25
The quantity that maximizes profits is 7.5 with a profit level of 46.25