DataMiner Operation Rolling Screen

Run a group of screen backtests at set intervals during a specified period.

Overview

A rolling screen backtest means that the screen backtest is first run on the first Saturday after the Start Date and the stocks are held for the number of days specified as the Holding Period. Then the screen backtest is run again using a start date that is either 1 week or 4 weeks in the future as specified by the Frequency. This continues until tests have been run for the entire period between the specified Start Date and End Date. This process is repeated if multiple iterations are defined.

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:

RollingScreen

→ 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 Results:

yes | [no]

Include detailed backtest results if output is saved.

→ Type:

[Stock], ETF

→ Screen:

Id of an existing screen.

Optional

If the Screen parameter is used, then any other parameters that would override a setting in the existing screen are not allowed and will cause an error.

→ Currency:

[USD], CAD, CHF, EUR, GBP

→ Trans Price:

[Open], Close, AvgHiLow

Price used in the transactions.

→ 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

→ Benchmark:

[SPY], VTI, etc

Instrument that the 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 for the backtests.

→ End Date:

[today] 

→ Frequency:

[1Week], 4Weeks

Number of weeks that the start date of the screen is moved forward between periods.

→ Holding Period:

[182] Integer

Number of days the stocks are held for each period in the backtest.

→ Max Num Holdings: 

[0] 0 for all.

The maximum number of holdings.

→ Ranking:

see DataMiner Ranking Definition

→ Method:

[Long], Short, LongShort, Hedged

Specifies if your strategy is long, short, long & short or hedged.

→ Rules:

→→ -

Common rules that apply to both long and short positions.

→ Long Rules:

→→ -

Apply to long positions if the Method is LongShort or Hedged.

→ Short Rules:

→→ -

Apply to short positions if the Method is LongShort.

→ Hedge Rules:

→→ -

Apply if the Method is Hedged.

→ Max Pos Pct:

[0]-100. Use 0 for no maximum

Limits the allocation to each position. It does so in conjunction with the Max No Stocks/ETFs setting.

→ Slippage:

[0]-5 in percent

A cost added to each transaction to account for trading costs and price movements.

→ Long Weight:

0-[100]

Only required for Methods LongShort or Hedge.

→ Short Weight:

0-[100]

Only required for Methods LongShort or Hedge.

Iterations:

# Rules used for a set of backtests.

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

→ -

→→ Name:

Iteration name.

→→ <key>:

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

Sample Input

Main:
    Operation: RollingScreen
    On Error: Stop

Default Settings:
    Type: Stock
    Method: Long
    Benchmark: SPY
    Universe:
        Starting Universe: Prussell3000
        Rules:
            - mktcap > 500
            - Vol10DAvg > 1
    Start Date: 2010-01-01
    End Date: 2020-01-01
    Frequency: 4Weeks
    Holding Period: 365
    Max Num Holdings: 20
    Ranking: "Core: Momentum"

Iterations:
    -   #Baseline using the settings above.
        Name: Core Momentum top 20

    -   # Same settings as baseline except change the number of stocks held.
        Name: Core Momentum top 10
        Max Num Holdings: 10

    -   # Same as baseline except using a quick rank instead of Core: Momentum.
        Name: Price Target revision
        Ranking:
            Formula: PriceTargetMean/PriceTarget4WkAgo

    -   # Same as baseline, except add a rule to the screen.
        Name: Avoid high PE
        Rules:
            - PEExclXorTTM < 50

Sample Output