Skip to content
All library documents

Compounding a Treasury Bill Rate into an Investment Value Series

Article Quant Q&A · Author: Nictorn

Summary

The document shows how to turn a monthly Treasury bill rate series into a hypothetical value path for an initial investment. It describes carrying the prior month’s value forward and multiplying it by one plus the current rate expressed as a decimal, then plotting the resulting time series. The example uses monthly observations over the period stated in the question and an initial investment of 100 dollars.

This is a simple illustration of compounding, not a comparison of bond prices or a complete total-return calculation. The example does not discuss whether the rate series is annualized, how to convert it to a monthly return, or how to handle reinvestment conventions. Applying an annualized quoted rate directly each month may therefore misstate growth; the rate definition and period conversion should be checked before interpreting the plotted value as an investment return.

Key ideas

  • A value series can be built by repeatedly applying each period’s return to the previous period’s value.
  • The example converts the quoted rate from a percentage to a decimal before compounding.
  • The resulting series can be plotted against the monthly observation dates.
  • The rate’s annualization and monthly conversion must be checked before treating the result as an accurate investment return.

Tags

Full text
# Calculating and visualising the future value of 100USD invested in fixed income securities and bonds in R


# Calculating and visualising the future value of 100USD invested in fixed income securities and bonds in R












I have uploaded TB3MS to R and would like to visualise the future value if i invest 100USD in it. The interval is from 2014 to 2019, monthly frequency.

I would like it to be comparable to a plot i have made of some stocks, which looks like this:

Someone who can help with this? Thanks.

## Answer by Robert (score 1)

https://quant.stackexchange.com/a/49641

This is one way. Invest 100 and carry over time assuming you get interest every month.

```
require(xts)
TB3MS = xts(TB3MS$TB3MS,order.by =as.Date(TB3MS$DATE) )
TB3MS = TB3MS['2014::']
TB3MS100 = 100
for (i in 2:length(TB3MS))TB3MS100[i] <- TB3MS100[i-1]*(1+TB3MS[i]/100)
TB3MS100 = as.xts(TB3MS100, order.by=index(TB3MS))
plot(TB3MS100,ylim=c(20,180),col=4)
```

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.