DataMiner Operation Ranks Performance

Run performance tests on ranking systems.

Marco Salerno
Written by Marco SalernoLast update 3 months ago

Overview

This operation runs multiple bucket performance tests of multi-factor ranking systems. You can use an existing ranking system that we offer or a ranking system that you have created on the website. It is also possible to define the ranking system within the DataMiner script. The DataMiner output includes many more statistics than what the website offers. To collect these stats, DataMiner runs a screen backtest for each bucket.

Input Specification

Default values if not specified are in [brackets]. Any parameter which has a default value is optional and can be omitted. The input script is in YAML syntax. The learn the basics see DataMiner YAML Syntax

Key

Value

Description

Main:              

# Section with main settings

→ Operation:

RankPerformance

→ On Error: 

[Stop],  Continue 

Specifies if you want to stop an operation when there is an error.

→ Precision: 

[2],3,4 

Decimal precision of the output values.

Settings:

# Section with operation settings

→ Type:

[Stock], ETF

Type of ranking system.

→ Buckets:

1 to 20

Number of buckets the ranked universe is divided into.

→ Vendor:

[FactSet], Compustat

→ Universe:

ALLFUND, SP500, etc. or defined inline.

Specifies the Universe to be used in the operation. Specify the name of your custom universe or one of the Portfolio123 Universes

→ Minimum Price:

[$3]

Minimum stock price. Does not apply if Type=ETF.

→ Currency:

[USD], CAD, CHF, EUR, GBP, NOK, PLN, SEK, TRY

→ Benchmark:

[SPY], VTI, etc

Instrument that the ranking system’s performance is compared to.

→ PIT method: 

[Complete],  Prelim

“Prelim” includes preliminary data from earnings calls, while “Complete”  only includes quarter or annual report data.

→ Start Date:

YYYY-MM-DD

Defines the period used.

→ End Date:

[today] 

→ Rebalance Frequency: 

1Day, 1Week, 2Weeks, 3Weeks, [4Weeks], 6Weeks, 8Weeks, 13Weeks, 26Weeks, 52Weeks

Frequency with which data is retrieved.

→ Method:

[Long], Short

Specifies if your strategy is long or short.

→ Ranking:

see DataMiner Ranking Definition

→ Slippage:

[0] - 5 in percent

Amount to factor into the calculations of the returns for trading costs and price movements.

Iterations:   

# Ranking lists

Each iteration contains overrides of the settings in the prior iteration.

→ -

→→ Name:

Optional

Iteration name used in the output.

→→ <key>:

Can alter any of the original key values during each iteration.

Sample Input

Main:
  Operation: RankPerformance
  On Error:  Stop
Default Settings:
  PIT Method: Prelim
  Buckets: 5
  Start Date: 2010-11-01
  End Date: 2010-12-01
  Rebalance Frequency: 1Week
  Benchmark: SPY
  Minimum Price: 3
  Method: Long
  Slippage: .1

# Use an existing  universe or create a custom universe inline
#  Universe: #SP500
  Universe:           
    Rules:
      - mktcap > 50000
      - AvgDailyTot(20) > 200000
    Starting Universe: Prussell3000

  Ranking: "Core: Growth"

# Each iteration will use the settings specified in that iteration instead 
# of the settings from the the Default Settings section.
Iterations:
  - #uses the settings above with no changes.
    Name: Baseline

  - #Quick rank
    Name: Single factor rank
    Ranking:
      Formula: EarnYield

  - #Test multiple rebalance periods.
    Name: 2 week rebalance 
    Rebalance Frequency: 2Weeks

  - #Use an existing universe.
    Name: Univ P3000 
    Universe: Prussell3000

  - #Use a different universe defined inline here.
    Name: Univ mktcap 100-500 
    Universe:
      Rules:
        - Between(mktcap,100,500)
        - AvgDailyTot(20) > 200000
      Starting Universe: Prussell3000

  - #Create a ranking system on the fly.
    Name: MomentumValue ranking
    Ranking: 
      Rank: Higher # ( [Higher] | Lower | Summation )
      Method: NAsNegative #( [NAsNegative] | NAsNeutral )
      Nodes:
        -
           Type: Composite
           Name: Value Composite
           Weight: 100 # ( [0] - 100 where 0 indicates equal weight)
           Rank: Higher # ( [Higher] | Lower | Summation )
           Nodes:
            -
               Type: StockFormula
               Name: EarnYield
               Weight: 50  # ( [0] - 100 where 0 indicates equal weight)
               Rank: Higher # ( [Higher] | Lower | Boolean )
               Formula: EarnYield
               Scope: Universe # ( [Universe] | Industry | Sector )
            -
               Type: StockFormula
               Name: Pr26W%Chg
               Weight: 50
               Rank: Higher
               Formula: Pr26W%Chg
               Scope: Universe

  - #Copy/paste xml from the Ranking System page on the site using the text editor.
     Name: XML ranking example 
     Ranking: 
       Nodes: 
         <RankingSystem RankType="Higher">
           <StockFormula Weight="0%" RankType="Higher" Name="test" Description=""
             Scope="Universe">
             <Formula>
               eval(InsNetShrPurch>0,InsNetShrPurch/InstitutionalShsNet(0),NA)
               </Formula>
           </StockFormula>
           <StockFactor Weight="50%" RankType="Lower" Scope="Universe">
             <Factor>Pr26W%Chg</Factor>
           </StockFactor>
           <StockFactor Weight="50%" RankType="Higher" Scope="Universe">
             <Factor>TotRevisions4W</Factor>
           </StockFactor>
         </RankingSystem>

Sample Output

Sample output showing bucketized performance metrics for two factors.

Did this answer your question?