Momentum across exchanges
Momentum across exchanges: every exchange's stocks in one ranking, such as US and ASX stocks together. The run trades on the days any of their exchanges does, and each stock on its own exchange's days: an order waits for its stock's next session, over the other exchange's holidays too. It rebalances on the first day of each month that every exchange trades. A stock priced in another currency than the account's converts at the data's forex rates, so the data needs a pair for each currency.
Exchanges and currencies · world/rotation_across_exchanges.rvw
language 1
strategy "Momentum across exchanges" {
universe stocks
mom roc(close, lookback)
enter long when mom > 0 and close > sma(close, 200)
rank by mom
size equal weight, max 10 positions
rebalance monthly, band 20%
param lookback = 126 in 63..252 step 63
}
Functions it uses
Try it
These need data from more than one exchange or currency: stocks of other exchanges, a forex pair for each currency, and each currency’s interest rates for carry. stocks_and_forex.rvwp holds the market ETF strategy and the forex trend in sleeves of 70% and 30%, rebalanced each month. See Several exchanges’ days and Currencies and forex pairs.
File ▸ New Script from Example adds it to a project. The examples read the sample’s index label, SYN500, and market ETF, SYNSPY; when your data has neither, a sheet asks what to read instead, one of your index labels (or every stock and ETF) and a ticker, so the example runs on your data as it is.
Before you trust what it does on your data, see whether it’s luck: Is this result luck?