Add new comment

New backtester function: MAXEQUAL

Added a new function named MAXEQUAL to the backtester today which people have asked for. Typical usage is:

Define {Gentle_Screamers}
Uses [SI Price] [SI Market Cap Q1] [SI Volume--Average Daily 10d] ...
Deblank [SI Price] [SI Market Cap Q1] [SI Volume--Average Daily 10d] ...
Keep :[SI Price]>5
Keep :[SI Market Cap Q1]>100
Keep :[SI Volume--Average Daily 10d]>10
Keep :[SI Price]>0.9*[SI Price--high 52 week]
Keep :[SI Volume--Average Daily 10d]>0.05*[SI Volume--Average Monthly 3m]
Keep :AND([SI Price/FCFPS]>0,[SI Price/FCFPS]<[SI Ind Price/FCFPS])
Keep :[SI Price Change 52 week]>50
Sort Descending [SI Price Change 4 week]
Keep :MAXEQUAL(1,[SI Industry])
End

The first parameter to MAXEQUAL is the number of equal values allowed. In the example above, the backtester would make sure that only 1 stock from each industry was selected (instant diversification). The second parameter is the expression that needs to be unique.  

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or class="OPTIONS" [title="the title"].
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.