shadowfolio

Guides

How to test a momentum rotation strategy

A momentum rotation ranks a list by recent return, holds the top few and swaps them on a schedule, for example "the 5 S&P 500 stocks with the best 6-month return, rebalanced monthly". Shadowfolio runs exactly that in ChatGPT over the last 12 months, with equal or inverse-volatility weights, and reports return, drawdown, Sharpe ratio and turnover against a benchmark.

Updated · The Open Apps, Inc.

Step by step

  1. Pick the list. Your own tickers (up to 50), the S&P 500, one S&P 500 sector, or about 100 popular ETFs.
  2. Pick the ranking. Return over 1, 3, 6 or 12 months (or any number of days up to 252); you can also rank by lowest volatility, RSI or closeness to a high.
  3. Pick how many and how often. Hold the top N, rebalanced weekly, monthly or quarterly.
  4. Add a filter if you want one. For example "only while SPY is above its 200-day average, otherwise BIL".
  5. Run and save. Check the result, then save it to see how the same rules do from today.

A caveat on index lists

The S&P 500 preset uses today's members for the whole year. Stocks that were removed after falling aren't in it, which makes past results look better than they were (survivorship bias). Shadowfolio says so on every result that uses a preset; the forward test from the day you save has no such bias.

Ways to do it

Shadowfolio in ChatGPTSpreadsheetCode (Python and a data library)Asking ChatGPT alone
You describe the rulesIn plain English; it asks for anything you left openAs formulas, one column per ruleAs a programIn plain English
PricesEnd-of-day prices for US stocks and ETFs, refreshed dailyYou download and paste themYou fetch themNone: it can't run your rules on real prices without a tool
ResultsReturn, max drawdown, Sharpe, win rate, trades, curve against a benchmarkWhatever you buildWhatever you buildEstimates from memory, which can be wrong
Forward trackingYes: updated after every US close from the day you saveOnly if you update it by handOnly if you schedule itNo
LimitsDaily closes only; US stocks and ETFs; last 12 monthsSlow for many tickersTakes time to write and checkNo real data

Ranking hundreds of stocks every month is where a spreadsheet gets slow and where a ready backtester saves the most time.

Use it in ChatGPT

Add Shadowfolio in ChatGPT (coming soon to the plugin directory), then say:

  • Test holding the 5 S&P 500 stocks with the best 6-month return, equal weight, rebalanced monthly.

Shadowfolio runs only the rules you describe. It never suggests investments, never gives advice and never places trades.

Questions

How are ties and missing data handled?
A stock needs a full look-back of prices to be ranked; newer listings join once they have one.
What does it cost to trade?
0.05% per buy or sell by default; you can set 0 to 1%.
Can it hold fewer than N?
Yes, if fewer pass your buy rules; the unused share stays in cash or the fund you name.

More guides