onboarding
templates
developer-experience
strategies
quant

Start From Working Code: Templates That Solve the Blank-Editor Problem

Jonny Bravo
  -  

...

Start From Working Code: Templates That Solve the Blank-Editor Problem

Every strategy platform has the same silent churn problem, and it happens in the first ninety seconds. A new user signs up, clicks "new strategy," and is dropped into an empty editor with a blinking cursor. Now they have to recall the exact base class, the right method names, how to read prices, how to issue an order, how warmup works — all before they've expressed a single idea. Most people don't push through that. They close the tab. The platform never finds out whether its engine was any good, because the user never reached it.

The blank page is a tax on curiosity, and it's entirely avoidable. The fix is to never show a blank page. Start everyone from working code — a complete, runnable strategy they can backtest immediately and then modify into their own.

Real strategies, not snippets

The templates aren't fragments or pseudocode. Each is a full Strategy that runs as-is. Here's the trend-following starter, complete:

from development.fund.backtest.base import BaseStrategy, SingleParams, ema class Strategy(BaseStrategy): """Trend-following: long while the fast EMA is above the slow EMA, else flat.""" bar_frequency_seconds = 3600 class Params(SingleParams): fast: int = 12 slow: int = 48 def warmup_bars(self): return self.p.slow + 1 def on_bar(self): c = self.closes() if ema(c, self.p.fast) > ema(c, self.p.slow): self.target(weight=1.0) # go fully long else: self.close()

That's the entire thing. A new user clicks it, hits backtest, and sees an equity curve in seconds — before they've had to learn anything. Then they read the code, and because it's only a dozen lines of clear, idiomatic strategy, they understand it. Now they're not staring at a blank page; they're editing a working example, which is the single easiest way for anyone to learn a new API.

The starter set deliberately spans the major strategy archetypes, so whatever a user's instinct is, there's a template that matches it:

# Mean-reversion: long below the lower Bollinger band, short above the upper. def on_bar(self): _mid, upper, lower = bollinger(self.closes(), self.p.period, self.p.stdev) if self.price() < lower: self.target(weight=1.0) elif self.price() > upper: self.target(weight=-1.0) else: self.close()
# Time-series momentum: long when trailing return over `lookback` bars is positive. def on_bar(self): if momentum(self.closes(), self.p.lookback) > self.p.threshold: self.target(weight=1.0) else: self.close()

Trend, mean-reversion, momentum — three of the foundational ideas in systematic trading, each as a clean, parameterized, runnable starting point. A user who thinks "I want to fade extremes" finds the Bollinger template and is editing a real mean-reversion strategy in under a minute.

Templates teach the platform's good habits

There's a subtler payoff. Every template is written in the idiom the platform wants you to use — and that idiom teaches itself through the example. Look at what these dozen-line strategies quietly demonstrate:

  • The unified BaseStrategy for everything, so there's one mental model to learn, not a taxonomy of base classes.
  • self.target(weight=1.0) and self.close() — the order helpers, shown in context.
  • warmup_bars() derived from the parameters, so the strategy declares exactly how much history it needs.
  • Parameters as a typed Params class, which is what makes a strategy sweepable without any extra work.

The templates' own header spells out the philosophy: "All use the single unified BaseStrategy: implement on_bar(self) and issue orders with self.target/buy/close — anything you don't touch is held. Scales from one instrument to many." A user who starts from a template absorbs the right patterns by osmosis, and their first hand-written strategy comes out idiomatic because the example they learned from was. You don't have to read a style guide when the starting point already embodies it.

They're served straight from the platform — GET /v1/fund/strategy-templates — so the same well-formed starters appear for everyone, every time, always in lockstep with the engine they run on.

From template to your own book

The path from a template to a real strategy is a smooth ramp, not a cliff. Clone the momentum starter, change the lookback, add a volatility filter, swap the instrument, widen it to a basket — each step is a small edit to working code, and at every step you can re-backtest and see what your change did. There's never a moment where you have to assemble a strategy from nothing; you're always one edit away from the last thing that ran.

That ramp is the whole point. The blank editor asks a beginner to be an expert before they can even start. The template asks them only to be curious — change a number, run it, see what happens — and lets expertise accumulate one runnable edit at a time.

Why onboarding friction is a revenue problem

It's tempting to think of starter templates as a nicety. They're not — they're a conversion mechanism. A platform's engine, its no-look-ahead discipline, its honest metrics, its execution safety — none of it matters to a user who bounced off the empty editor in the first two minutes and never saw any of it. The first runnable backtest is the moment a curious visitor becomes an engaged user, and templates are how you get them there fast.

Start from working code, and the platform gets to show what it can actually do. Start from a blank page, and most people never find out. We chose working code — three of them, one click away, ready to run and ready to make your own.


Skip the blank page — clone a runnable template, backtest it in one click, and edit your way to your own strategy. Browse strategy templates →

Article Contents

Related Articles

© 2026 Fluxy, Inc. All rights reserved.