Writing strategies
Tenachine reads strategies in plain English. The clearer you are, the better the backtest. Here's the recipe.
The four-line recipe
- 1
Pick your universe
List the tickers you want to test on. Five to ten is plenty for a first pass.
AAPL, MSFT, NVDA - 2
Say when to enter
Describe the buy condition with one or two indicators you actually understand.
Buy when RSI(14) crosses above 30 and price is above the 200-day moving average. - 3
Say when to exit
Every entry needs an exit. Use a profit target, a stop, a time limit, or a clean opposite signal.
Sell when RSI(14) crosses above 70, or after 20 trading days, whichever comes first. - 4
Add sizing (optional)
Default sizing risks 1% per trade. You can override it if you have a reason.
Risk 1% of equity per trade with a stop at the 20-day low.
A worked example
Universe: AAPL, MSFT, NVDA, AMZN, META. Bars: daily. Long-only. Buy when RSI(14) crosses above 30 and the close is above the 200-day moving average. Sell when RSI(14) crosses above 70 or after 20 trading days, whichever comes first. Size: risk 1% of equity per trade, with a stop at the 20-day low.
That's a complete, runnable strategy. Tenachine will fill in sensible defaults for anything you leave out.
Three rules of thumb
Start small
One indicator in, one indicator out, ten symbols, three years. Get a result before you complicate it.
Iterate, don't overfit
Tweak one rule at a time. If you change three things together you won't know which one moved the needle.
Be specific
“Buy when momentum is good” won't work. “Buy when 12-week return is in the top 20% of the universe” will.
Want the deep dive?
Indicator catalogue, sizing maths, and common pitfalls.