DataMiner Operation Ranks

Returns ranks from a single ranking system for a range of dates.

Marco Salerno
Written by Marco SalernoLast update 1 year ago

Overview

This operation returns historical ranks from a single ranking system for multiple dates between the Start and End dates. The Ranking system can be specified directly in the script or use existing ranking systems created using the website. It can return just the primary rank from the ranking system and can also return the composite level ranks and the factor level ranks.

The Additional Data parameter returns price and technical data and also derived values for fundamental factors using functions like FRank and ZScore without a vendor data license. To enable download of raw fundamental data, you will need a data license from FactSet or S&P Compustat. Contact us for more details.

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:

Ranks

→ 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

→ Vendor:

[FactSet], Compustat

→ Include Names: 

[false], true 

Include company names in the results.

→ Tickers:

The stocks to be ranked. If omitted, all stocks in the universe are ranked.

→ Currency:

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

→ Universe:

ALLFUND, SP500, etc.

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

→ 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] 

→ Frequency: 

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

Frequency with which data is retrieved.

→ Ranking Method:

[NAsNegative], NAsNeutral

How NA's will be handled.

→ Ranking System:

see DataMiner Ranking Definition

→ Columns:

[ranks], composite, factor

Determines what level of ranks are returned. Ranks = primary rank only. Composite = primary and composite ranks. Factor = primary, composite and individual factor ranks.

→ Additional Data:

→→ - <formula>

Examples:

FRank("OpMgn%TTM",#Industry)

Pr52W%Chg

Formulas for data to be returned for each stock. Optional. Limit = 100 formulas per script.

Only technical and derived factors are allowed (like ranks) due to data provider license restriction. Contact us if you would like to license the raw data.

Sample Input

Main:
    Operation: Ranks
    On Error:  Stop
Default Settings:
    PIT Method: Prelim
    Start Date: 2020-10-01
    End Date: 2020-12-01
    Frequency: 4weeks
    Include Names: false 
    Universe:
        Rules:
            - mktcap < 1000
            - LoopSum("FCF(CTR,Qtr) > 0",8) = 8
        Starting Universe: Prussell2000
    Ranking System: "Core: Value"
    Ranking Method: NAsNegative
    Columns: ranks
    Additional Data:
        - AvgVol(20)
        - Pr52W%Chg
        - OpMgn Rank: FRank("OpMgn%TTM",#Industry,#desc)

Sample Output

Did this answer your question?