Skip to content

Market timing strategy lab (plan + build)

  • Spun out of Market-timing-refined-analysis (round 6, 2026-09-25) at Talbot’s request. Talbot’s words:

    “build a world-class analysis tool that gives a historical quantification of the normal industry approaches heading into the US lost decade, and the Japanese stock market, and more. It will default to the median profile for our target market. It will allow very efficient personalization, where only one or two key inputs are easily adjusted, and the remainder are already established as defaults for efficiency, per the F.A.S.T. principle.” “plan and build this app in a way that allows different market timing strategies to be tested, back tested, and then forward tested, with Monte Carlo like simulations to provide probabilistic analysis of how various strategies perform in terms of the metrics or objectives that matter most to the individual. Again recognize that a single metric like future value is very rarely the right measure. As a minimum, probabilistic reward relative to risk is the right metric to optimize and focus on.” “with a flexible framework to test various market timing strategies to best prepare for very high Market valuations, the next phase (LATER) is to rigorously explore various strategies and try to find “or better” ones. In particular, the methodology involved in Dual Momentum should be explored.”

  • Why model: fable: the hard part is the method, not the UI. Two examples: Monte Carlo on returns whose valuation signal persists for years (block bootstrap vs regime models), and forward-testing without look-ahead. Errors there turn into confident, wrong numbers in a public SDC tool. Run the planning phase on Fable 5.1. The build phases can drop to Opus or Sonnet once the plan names them.
  • Why it waits on the Red Team: the lab turns the research’s rules into a product. Any objection the Red Team sustains (for example about censoring, in-sample trend rules or n_eff) changes what the lab must test.
  • What already exists (borrow > build):
    • ~/projects/cape-timing/ holds the research engine: data loaders with gates (Shiller, CRSP/French, StatCan TSX, Japan), real-time CAPE percentiles, the trend/halving dial, after-tax Canada, and run_if_you_had.py. README: /home/ta/projects/cape-timing/README.md · \\wsl$\Ubuntu-24.04\home\ta\projects\cape-timing\README.md
    • ~/projects/asset-history/ is the price and dividend database (note the XIC adj_close bug in the cape-timing README).
    • sd-app / sd-math in the monorepo: SDC’s calculator engine and app shell. The archived SD-App ROADMAP already listed “Performance optimization (parallel execution, Monte Carlo)” and “Big Rocks (80/20) analysis” (SDC/_WorkingOn/Projects/SD-App/archive/ROADMAP.md). The plan must decide whether the lab is an sd-app mini-app or a standalone artifact.
    • Web standard: SvelteKit + adapter-static + Cloudflare Pages for web apps (AGENTS.md). Design: load /design-context app first.
  1. Plan (Fable 5.1): architecture, data pipeline (reuse cape-timing), the strategy interface, the backtest → forward-test → Monte Carlo method, the metrics, the F.A.S.T. input set, and phases with acceptance tests. Produce a written plan for Talbot’s approval before building.
  2. Metrics: probabilistic reward-to-risk as the core, e.g. P(beat cash), Sortino, CVaR (expected loss in the worst 5%), worst decline, time to recover, and P(ending below the start in real terms). Terminal wealth is only one metric among several.
  3. Default profile: the median profile for the target market (advisors’ clients, Canada first). Sourced data only: find a citable source for typical equity allocation and portfolio size (e.g. Investor Economics, CSA or StatCan Survey of Financial Security, advisor-channel surveys). Don’t guess. If none is found, say so and ask Talbot.
  4. Scenarios: “heading into” the US lost decade (Dec 1999), 1929, Japan 1989, and “more”; each compared with the normal industry approaches (buy and hold at the usual allocation, periodic rebalancing, target-date glide) vs the halving rule and all-out rule.
  5. Build, then test against the cape-timing numbers (the lab must reproduce results/if_you_had.json exactly before it adds anything new).
  6. LATER phase: strategy exploration, including Dual Momentum (Gary Antonacci).
    • Sources to use: d:\FSS\Static\Info\Finance\Investing\Market Timing\Dual Momentum, SSRN-id2042750.pdf (Antonacci’s own SSRN paper, already in the folder), the book (buy it or borrow a library copy), and the video https://youtu.be/iieXj9IZsYQ.
    • Don’t use the archive.org PDF of the book. It is an unauthorized upload (a “red-pill-books” collection), and SDC’s brand is client-first integrity.
    • The Market Timing folder is about 70% trend/momentum material (triaged in the parent task, round 1). Start there.
  • Talbot approves a written plan (phases, method, metrics, defaults with sources).
  • The lab reproduces the cape-timing Dec 1999 results exactly.
  • Default use needs at most 2 inputs. Output leads with reward-to-risk, not terminal wealth.
  • Every figure shown has a named data source. Tests pass, with evidence per AI-Testing-Standards.md.
  • Anything client-facing goes through SDC/Risks and supervisor pre-approval before it is public.