This strategy is very similar to the Buy and Hold: CBOT-TY futures. Please read that blog for more information. This is the description of the strategy:
- Buy $10 MM worth of the EUR.
- Hold it until the end of the simulation.
The are two alternative strategies used: one accounting for currency rolls, and the other one without the rolls.
Without rolls
- The strategy script is the following:
var K = 10000000;
function event_OpenBook() {
context.AddBookTag("RollCurrencyPairs", "OFF");
context.AddCapital(K, "Initial K");
var q_EUR = Math.Floor(K / vars.Close);
context.AddTrade(null, "EUR", q_EUR, vars.Close, "Buy");
}
function event_CloseDay() {
context.AddMark("EUR", vars.Close);
}
function event_CloseBook() {
context.Liquidate("Liquidate");
}
- The returns from this strategy are the following:
- When compared to a total return index we find a close match:
With rolls
So far we have not taken into account the rolls. All we need to do to tell SAMOA to estimate the currency rolls for us is turning on the flag:
context.AddBookTag("RollCurrencyPairs", "ON");
- With this flag on, when we run the simulation we can see that SAMOA accounts for the rolls:
- Now the returns are:
- This produces a worse match to the index, which lead me to believe that the ML index that I’m using does not include carry.
Comparing the Index to the monthly returns from prices
We’ve seen from the exercises explained above, that a strategy without carry seems to match the index better than one with carry. To confirm these results, we’ll compare the index returns to the monthly returns calculated from prices. This should yield exactly the same results as the strategy without carry, and in fact it does:
![]()