Skip to content

How To Analyze Branching History

Ever wondered how your spell decides its moves? Just like a choose-your-own-adventure book, your spell’s journey can take different paths. With tools like If/Else, Switch, Enter/Exit, and Filtered incantations, your spell has a bunch of routes it can take. Think of If/Else as a crossroad: go left (then) or right (else). Similarly, Switch and Enter/Exit offer their own set of directions. And hey, even Filtered has its own branching magic when you think of it as picking some paths while skipping others. To truly vibe with your spell and check if it’s doing its magic as expected over different market regimes, it’s key to see which routes it’s been taking. Grimoire’s got some nifty tools to help you do just that.

Light Up Those Branches!

Want a quick peek? Use the Branch To Highlight in the Return Plot. It’ll show you all the paths your spell could take, with percentages for how often each path was chosen, which are for the currently visible portion of the plot. Hover over a branch, and bam! You’ll see when that path was taken on the plot. Or click it to get to the branch right away. Oh, and each branch has its own unique number, making it easy to spot elsewhere.

You can optionally highlight assets instead by pressing Shift key when opening the combo, which helpfully shows a percentage return contribution per each asset for the period, too:

The Branching Diary

Hop over to the Branching History tab for a detailed diary of your spell’s adventures. The History table tells you which paths were chosen each day. Green days? That’s when your spell made a trade. And if you’re curious about a specific branch, just click its column header in the Distribution Stats table: Remember, this diary is all about your spell’s decisions, not necessarily its actions. So, even if a path was chosen, it doesn’t mean your spell acted on it unless there was a trade that day. In contrast, the Allocation History shows an actual allocation at the market close for the day instead of a target allocation the day’s decision dictates.

A Day in the Life of Your Spell

Want to time-travel through your spell’s decisions? Just hover over the plots. The live preview usually shows this:

But press the Shift key, and it’s like stepping into a time machine. You’ll see the date and the paths your spell took that day with the rest dimmed:

Got a narrow screen? No worries. Use the left/right arrow keys with Shift pressed to get to specific days. It works in a similar way with the main plot except no need for the Shift, but overall is less useful there since you won’t see much of the logic part when the main plot is visible unless you have a really long screen. With Shift+Ctrl, you can zoom into the spell’s max drawdown period to drill down into its causes. Please keep in mind that this feature works only when the backtest result is up-to-date. With Ctrl you can zoom into the period currently shown in the main plot and check CAGR / MD for it. This works only when the live preview backtest has a long enough history to cover the period.