Let’s use SAMOA to simulate a buy-and-hold strategy using 3 month T-Bills. For more information please make sure you read the following related blogs:
Our strategy will buy a 13w TBill using an initial capital of $10,000,000, and will roll the position to the newest issue whenever there is a new auction. We chose to roll on issue date of the newest TBill.
- First, we need a list of rolls:
NOTES:
- OTR, PriceOTR: The On-The-Run 13W TBill on DateS, with it’s price
- Switch: “YES” when a roll needs to be made
- OLD, PriceOLD: The old 13W, with it’s price (on the day of the switch)
- Now we can define the strategy with the language JScript as follows:
var K = 10000000;
function event_OpenBook() {
context.AddBookTag("RepoLongs","OFF");
context.AddCapital(K, "Initial K");
//Initial Buy
var q = Math.Floor( K / (vars.PriceOTR/100) );
context.AddTrade(null, vars.OTR, q, vars.PriceOTR, "Initial Buy");
}
function event_OpenDay() {
//Mark the book
context.AddMark(vars.OTR, vars.PriceOTR);
if (vars.PriceOLD!=null) context.AddMark(vars.OLD, vars.PriceOLD);
}
function event_CloseDay() {
if (vars.Switch == "YES") {
context.Liquidate("Switch: sell");
//Switch: buy
var q = Math.Floor( book.NAV / (vars.PriceOTR/100) );
context.AddTrade(null, vars.OTR, q, vars.PriceOTR, "Switch: buy");
}
}
function event_CloseBook() {
context.Liquidate("Liquidate");
}
NOTES:
- The line: context.AddBookTag("RepoLongs","OFF") turns off the automatic financing of longs in the repo market.
- The rolls are executed inside the event “event_CloseDay”.
- When fed into ssRunStrategyS(…) we get the following trades:
NOTES:
- One “Initial Buy” trade, followed by “Switch:sell” / “Switch:buy” rolls, followed by a “Liquidate” trade
- Note that we the NAV grows, so does the Q (so that we stay fully invested)
- The returns are the following:
- When compared to a 3M TBill Total return index, we get an almost perfect match (for the months where the index is available):
NOTES:
- The differences hover between –9 bps and 7 bps, which can be attributed to discrepancies in the dates chosen for the rollings.
- If we modified the strategy to roll always the same amount (and not stay fully invested), we would get the following differences with the index:
NOTES:
- As expected the index outperforms (-1 bp to 40 bps), b/c the index stays fully invested.
[...] Buy and Hold: US 3M T-Bills [...]