Hi, Shrewd!        Login  
Shrewd'm.com 
A merry & shrewd investing community
Best Of MIBest OfAll BoardsThe Shrewd’m WeeklyLearn to InvestHow to Become Shrewd
Search
Shrewd'm.com Merry shrewd investors
Search
Best Of MIBest OfAll BoardsThe Shrewd’m WeeklyLearn to InvestHow to Become Shrewd


The week's question
In March 2025, in the thread "Re: OT, out", Umm asked the members: "Do you think it is because America is made up of magical soil that makes businesses based in America magically profitable?" This week it is put to everyone again. The button below opens the small thread re-asking it - read what others have said so far, then give your own answer as an ordinary reply.
Answer this questionContinue to Shrewd'mThis note won't appear again
Investment Strategies / Mechanical Investing
Unthreaded | Threaded | Whole Thread (18) |
Author: musselmant ✧☼  😊 😞
Number: of 6243 
Subject: Re: MI development of an AI agent
Date: 09/28/26 1:18 PM
Post New | Post Reply | Report Post | Recommend It!
No. of Recommendations: 7
Portfolio123 looks genuinely capable of testing the kind of historical fundamental variations we were missing. TrendSpider does not look nearly as suitable for our particular cross-sectional monthly stock-selection work.
The biggest discovery is that Portfolio123 can apparently solve both of our missing-data problems: point-in-time fundamentals and historical Nasdaq-100 membership before its built-in Nasdaq-100 universe begins.
Portfolio123: much better fit than I initially realized
Portfolio123 explicitly says its backtesting database is point-in-time and designed to avoid survivorship bias. Its documentation says historical backtests use the fundamental information that would have been available then rather than today's restated/current data applied backward. Portfolio123
It also has a very large factor library—currently thousands of factors/functions—including valuation, profitability, ROE, ROI, margins, analyst estimates, estimate revisions, earnings/sales surprises and historical estimate fields. Portfolio123
So we could test things we could not test with our Norgate price/volume history, such as:
- EPS growth
- sales growth
- earnings acceleration
- ROE/ROI
- free-cash-flow growth
- valuation
- margins
- estimate revisions
- earnings surprises
- combinations of fundamentals with our momentum/PHL ideas
And these would be evaluated historically, rather than using current fundamentals.
The Nasdaq-100 membership problem has a solution
Portfolio123's built-in historical NASDAQ100 universe currently only goes back to roughly 2005. Their current factor documentation actually labels it “Nasdaq 100 (from 2005).” Portfolio123
Initially that looked like a major limitation because our important tests begin in 1993 or 1999.
But Portfolio123 supports imported historical stock factors. A Portfolio123 staff answer describes exactly the mechanism we would need: upload a CSV containing ticker, dates and a 1/0 value indicating whether each stock belongs to the universe at each point in time, then use that imported factor as the universe rule. Portfolio123 Community
That means the Nasdaq-100 constituent history we already have could potentially be converted into something like:
Ticker Date NDXMember
AAPL 1999-01-01 1
AAPL 2026-09-28 1
XYZ 1999-01-01 1
XYZ 2001-03-14 0

and Portfolio123 could use that membership flag when simulating historical dates.
So we would not have to accept its 2005 start date.
That is a very important finding.
Our technical rules are also mostly reproducible
Portfolio123 has historical OHLC data, volume, moving averages, highest/lowest-price functions, momentum calculations and custom mathematical formulas. Its technical functions are evaluated point-in-time, and its SMA function supports periods up to 500 bars. Portfolio123
So our SPY > SMA325 timer is straightforward. A Portfolio123 rule can reference another security/time series, including SPY, while evaluating each stock. Their own documentation gives this kind of example using an alternate series in moving-average rules. Portfolio123
Our standard PHL is also mathematically possible:
PHL = Close / (highest intraday High252 + lowest Close252)
because Portfolio123 exposes current close, historical high/low series and highest/lowest-value functions.
The more unusual EOM126 calculation should also be programmable because it is composed entirely from H, L, C, V, averages and arithmetic:
- midpoint = (H+L)/2
- midpoint change divided by prior close
- volume divided by Avg(V,126)
- divide the first by the second, with the minimum-volume-ratio floor
- average that result for 126 sessions
Portfolio123 allows custom formulas and has all of those underlying price/volume operations. Portfolio123
So our strategy:
9m Top30 → PHL rank + 0.15 × EOM126 rank → Top5
appears reproducible.
That is probably the first one I would use as a control test because we already know what its historical performance should look like.
It can do genuine cross-sectional ranking
This is another reason Portfolio123 fits us better than TrendSpider.
Portfolio123's simulation structure is explicitly built around:
universe → ranking system → buy/sell rules → number of positions → rebalance schedule
and its ranking systems can weight multiple factors against all stocks in the selected universe. Portfolio123
That maps very naturally onto what we've been doing:
Historical Nasdaq-100 members
rank by 9-month momentum
retain Top30
rank those by another factor
hold Top5

This is very different from merely running the same buy/sell rule independently on 100 stocks.
Monthly holding/rebalancing is supported
Portfolio123 supports scheduled portfolio simulations and monthly/four-week rebalancing. It also offers transaction-price choices including Next Close, which is quite close to our convention of calculating the ranking from the preceding completed close and executing at the following trading day's close. Portfolio123 Community
Our exact calendar convention is a little unusual:
signal after the third-to-last trading-day close → execute at the second-to-last trading-day close.
I would want to verify the cleanest way to force that exact month-end schedule. Portfolio123 has calendar/date functions that can control rebalance dates, but that is one of the few pieces I would regard as “probably achievable but needs an actual trial setup to verify.” Portfolio123 Community
That isn't a fundamental-data limitation; it is just making its rebalance calendar exactly match ours.
Historical S&P 500 is even easier
For S&P testing, Portfolio123 already provides historically correct S&P universes. Its universe documentation contains SP500 directly, and Portfolio123 staff have stated that their universes use the constituents that actually existed at the historical date. Portfolio123
So for S&P 500 fundamental experiments, we probably would not need to upload our membership history at all.
That makes S&P experiments especially easy.

Why TrendSpider drops substantially in my estimation
TrendSpider's backtester itself is capable and has long price histories. It says it can backtest with up to 50+ years of historical market data, and its plans allow tests across 150, 250 or as many as 510 symbols depending on tier. trendspider.com
But I found a major limitation for our purposes.
TrendSpider explicitly says its Group Strategy Tester is not a portfolio backtester. It runs an independent backtest on each stock and compares them side-by-side. It does not simulate one portfolio that repeatedly ranks the universe and allocates capital among the best stocks. trendspider.com
That is a very big distinction.
Our systems are mostly:
rank all stocks against each other → keep N → rerank → hold Top1/2/3/5

TrendSpider's group tester is essentially asking:
How did Strategy X work separately on AAPL?
How did Strategy X work separately on MSFT?
How did Strategy X work separately on NVDA?

That is not the same problem.
TrendSpider does support some historically dated events such as earnings and analyst estimates, but its documentation says those are handled mainly as events occurring at points in time, e.g. “earnings occurred within X days.” TrendSpider Support
I still have not found documentation comparable to Portfolio123 saying:
On March 31, 2002, rank every eligible stock by the EPS growth, ROE and P/E values actually available on March 31, 2002.

That's the capability we need.
So I would now put TrendSpider well behind Portfolio123 for this project.
Another useful surprise: we may not even have to pay immediately
Portfolio123 currently advertises free/trial access that includes screening and some backtesting. Its site advertises 30 days of free Screener & Backtesting access, while another research offering advertises a low-cost trial with broader tools. The precise trial terms appear to vary by product/page, but there is clearly a way to test the platform before committing to a full annual subscription. Portfolio123
That's useful because I would not start by paying for a year.
I would first use a trial to reproduce one strategy for which we already know the answer.
The first experiment I would run
I would not begin with fundamentals.
First make Portfolio123 prove that it can recreate one of our known strategies.
Use:
Historical Nasdaq-100
→ 9-month momentum Top30
→ PHL rank + 0.15 × EOM126 rank
→ Top5
→ SPY > SMA325
→ monthly rebalance.
We already have our own backtest result for that strategy at roughly 35.16% CAGR / −30.04% MDD / Sharpe ~1.29 under our standard convention.
If Portfolio123 gets reasonably close once we align:
- membership history,
- signal dates,
- trade price,
- dividends,
- transaction costs,
- ranking directions,
then we know we have a trustworthy second engine.
After that, the useful experiment is:
hold the technical strategy fixed and introduce one fundamental factor at a time.
For example:
1. 9m Top30 → PHL+EOM → Top5 — baseline.
2. Same, but require positive trailing EPS growth.
3. Same, but rank Top30 by EPS acceleration before final PHL/EOM.
4. Same with revenue growth.
5. Same with ROE.
6. Same with free-cash-flow growth.
7. Same with earnings-estimate revisions.
8. Same with earnings surprise/SUE.
9. Combinations only after seeing which individual factors actually add value.
That would finally answer the question we've repeatedly been unable to test:
Do historical fundamentals add anything to our very strong price/volume Nasdaq-100 strategies—or do they just remove good momentum stocks and lower performance?
Portfolio123 looks capable of answering that legitimately.
One important remaining limitation
Its native Nasdaq-100 history starts only around 2005, so for 1993/1999–2005 we would have to import our historical membership flag. Fortunately, their documentation/community guidance explicitly describes a way to do that using an imported stock factor. Portfolio123
And that's unusually convenient for us because we already did the difficult work of obtaining the point-in-time Nasdaq-100 constituent history.
So at this point my view is:
Portfolio123 is worth a trial. TrendSpider probably isn't necessary for this research project.
Post New | Post Reply | Report Post | Recommend It!
Print the post
Members reply directly to musselmant here — and replies get answered. Reading is free; so is joining the conversation. Join Shrewd'm »
This community has written 6,224 posts about Mechanical Investing. The article-length ones it recommended most:
Dividend investing · 52 recs · 2025
Non-Mag7 screen · 34 recs · 2025
OT - Div yields and returns · 32 recs · 2024
Using AI to generate backtesting programs · 30 recs · 2025
Rankings for 19Dec2022 · 29 recs · 2022
Unthreaded | Threaded | Whole Thread (18) |


Announcements
Mechanical Investing FAQ
Contact Shrewd'm
Contact the developer of these message boards.

Best Of MI | Best Of | Favourites & Replies | All Boards | Followed Shrewds | Open Questions | Moving a community