Custom Series questions

I have been playing around with Custom Series and used “Show Available Help” then button for “Add Rule” to learn more about rules. This brings up the video for “Stock Screener Free Form Rules”. So I am thinking Custom Series might behave just like the stock screener but it does not. Some of the concepts I already use in Stock Screener dont work in Custom Series are:

  1. FRank, FMedian functions. These functions have the appearance of being available as they are referred to under the Button Stock > Formula Functions > Cross Sectional Analysis. There are more cross sectional functions like FCount and FOrder so it looks like a decision was made to allow these functions for Custom Series? I would really love them to be available but don’t really hold out hope given the function’s paramenter inputs.

  2. Use of SetVar variables in defining other SetVar variables. For example the use of the variable “@Threshold” works in Stock Screener but not in Custom Series

  • SetVar(@Threshold, 95)
  • SetVar(@SVSalesPSPQ, FMedian(“SalesPS(0,QTR)> @Threshold”))

Hopefully someone else has better luck than I and can comment. Thanks

Have you read the documentation? The Series tool, while it looks just a screener, actually does something different.

The series tool has two vocabularies, one for the series functions like UnivAvg, UnivSum. The supported functions of this vocabulary can be seen via the “? Series” button.

The other vocabulary is the “? Stock” vocabulary, which is what you can use for the “formula” parameter of the universe functions.

So what you are referring to , the Cross Sectional functions, should be usable inside the “formula” since they appear in the Stock vocabulary. However once you type it it would result in double quotations, which the parser will reject as invalid syntax.

Long story short, if there was a way to create valid syntax they would work, but there’s no way to do that. We will remove all Stock functions that have quoted parameters within the series->Stock functions.

It sound like what you need is a new series function like UnivMedian(“condition”, “SalesPS(0,QTR)”) or something like that. I’m not sure what you are trying to do though. Can you describe in english what you are trying to do? What does 95 represent? Why use additional SetVar() for @Threshold since it’s a constant?

Thanks

If there’s truly no way to create a valid syntax for nested quotes? What about eliminating the need to use quotes in either your Universe (Series) functions or your Cross Section (Screener) functions?

Primus thanks for the response. Yes, I know conceptually the Custom series has a different focus than the stock screener so I expect it to behave a bit differently.

Marco thanks also for the response. The reason for my inquiry is that with this functionality one could set up a crude Dynamic Simulation / Portfolio. Buy / Sell rules could look to different Custom Series in order to see what factors are working in the recent past in order to over/under weight such factors. Such a concept is possible in the stock screener. That said I never did get great results from it and was never 100% comfortable with it.

If this were all to work one needs this code to work

  1. SetVar(@SVUnivCntPerforming,UnivCnt(“Close(0)/Close(20) > 1.02”) // count of performing cohort
  2. SetVar(@SVUnivMedianEVPS,UnivMedian(“EVPS”,"Close(0)>0)) //Median of factor interested in
  3. SetVar(@SVUnivCntEVPSinPerforming,UnivCnt(“EVPS > @SVUnivMedianEVPS and Close(0)/Close(20) > 1.02”) // count of EVPS above EVPS Median in performing cohort
  4. @SVUnivCntEVPSinPerforming / @SVUnivCntPerforming //ratio of EVPS above Median of EVPS in performing cohort => Custom Series is based on this

To me this concept relies on setting a threshold, that is in the above @SVUnivMedianEVPS defined in 2) and used in 3).

For reference I conceptually set this up in the screener using the following code. Similiar to the above
A) SetVar(@SVEVPS, FRank(“EVPS”)> @SVDynamicRankThreshold ) //EVPS > Dynamic Threshold
B) SetVar(@SVEVPSCount,FCount(“(@SVEVPS and @SVPerforming)”,#Previous)) // Count union of Cohorts