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 December 2024, in the thread "Re: BRK: Why Not XOM?", BreckHutHigh asked the members: "What about the long road trips with kids?" 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 (5) |
Author: lizgdal   😊 😞
Number: of 6132 
Subject: Re: how to create a sum of ranks in GTR
Date: 06/28/26 6:54 AM
Post New | Post Reply | Report Post | Recommend It!
No. of Recommendations: 5
Just FYI, if needed, you can speed up the backtests by using imports or importf. (Build a separate screen that calculates the field (using -1 lag), and paste the field-calculating URL into the new screen.) For example:
gtr1.net: GTR1 Backtester - EYmedium

Another example, the screen {PEfMo26import} is the same as {PEfMo26} but uses import. Testing this (with -nocache) shows using importf speeds up the backtest:

{PEfMo26} Clock: 973
{PEfMo26import} Clock: 299

gtr1.net: GTR1 Backtester - PEfMo26import

gtr1.net: GTR1 Backtester - PEfMo26

Author: rgearyiii
Subject: How not to backtest Sum-of-Ranks
Date: 12/23/2016
"... The advice I refer to is this: Always encapsulate complex calculations inside their own backtests and import the results into other backtests using either importf (for regular field values), imports (for signal fields) or picktally. ... However, the focus of this post is on the performance advantages to what I recommend. ...

This first version uses the ill-advised method of calculating everything within one backtest, where "everything" includes the percentile ranks for RRS with twelve different lookbacks:... You can force the backtest to run without cache files by including "-nocache" as a command line-only option... Clock: 45175 ...

This next version uses the method I recommend, where each ranked field is ranked within its own backtest and the ranks are imported with importf:... Clock: 4623 ...

The reason the second version performs so much better is the way the importf function works: It causes the referenced screen to save the requested field`s values to a hidden intermediate field file, and the backtest that makes the importf call then reads that field file like any other. For a calculation as intensive as RRS, reading the calculations from a file is faster than re-calculating them from stock prices..."
https://yorickm.com/Message.php?pid=32529357

Post New | Post Reply | Report Post | Recommend It!
Print the post
Members reply directly to lizgdal here — and replies get answered. Reading is free; so is joining the conversation. Join Shrewd'm »
This community has written 6,115 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 (5) |


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