Worldquant Report

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Alpha Trading with the

WorldQuant Brain Platfrom

Alexis D. Plascencia

E-mail: [email protected]

Abstract: We provide a guide to use the WorldQuant Brain platform. We overview some
trading concepts and give some explicit examples of alpha (α) signals.
Contents

1 Introduction 1

2 Trading 1
2.1 Turnover 1
2.2 Decay 1
2.3 Truncation 2
2.4 Datafields 2
2.5 Operators 2

3 Alphas 2
3.1 American market 2
3.2 Chinese market 5

1 Introduction

WorldQuant Brain [1] is an online simulation platform to build alpha (α) signals and test
them using market data. However, it is hard to find resources and documentation on the
use of this platform. In this report we overview and provide some examples of alpha signals.

2 Trading

2.1 Turnover
Reducing turnover. In order to reduce turnover we can add a condition on the trading.
Instead of trading at each market open, it will trade only when event is True:

event = volume>adv20;
alpha = news_cap;
trade_when(event, alpha, -1)

2.2 Decay
Decay: Averages the alpha in a time window. For example if the alpha=1 from Monday
to Thursday and then in Friday we have alpha=10, there will be suddenly a lot of trading.
But if decay=5, then this will take the alpha average over the last 5 days so instead of 10
it iwll do 10+1+1+1+1/5=2.8 which be less trading.

Increasing the Decay helps to reduce the Turnover.

–1–
2.3 Truncation
This is the maximum weight for a given stock. It can limit the maximum loss; reducing
this parameter helps with the concentration.

The following instruction will tell you will tell you what’s the maximum weight assigned:

max(alpha) > 1 : 1 ? 0

2.4 Datafields
There are three types of datafields in the BRAIN platform:

• Matrix: Market data is in a matrix. X: stocks Y: time. Can be used to create alphas
directly based on datafields descriptions.

• Vector: Data stored accross three axis. X: stocks Y: time Z: time (intraday).

• Group: Stock classification based datafields. Can be used to improve specific alpha
performance by neutralizing the alpha by the datafields.

2.5 Operators
Different operators:

vector_neut(a,b)

This operator calculates a new vector a2 such that a2 is orthogonal to b. It can be used to
neutralize an alpha vector over some particular risk.

3 Alphas

3.1 American market


1. Trade based on volume and price difference. If the volume is larger than the 20-day
average, then trade based on the price difference of the last 5 days.

event = volume>adv20;
alpha = (-ts_delta(close,5));
trade_when(event,alpha,-1)

Region: USA
Universe: Top3000
Delay: 1
Neutralization: Subindustry
Decay: 2

–2–
Truncation: 0.01
Pasteurization: Off
Unit Handling: Verify
NaN Handling: Off

2. A simple Price Reversion alpha

SMA_30 = ts_mean(close,30);
rank(SMA_30 - close)

Region: USA
Universe: Top3000
Delay: 1
Neutralization: Subindustry
Decay: 4
Truncation: 0.08
Pasteurization: Off
Unit Handling: Verify
NaN Handling: Off

3. Price weighted average. vwap is the daily volume weighted average price. The fol-
lowing alpha uses vwap to implement Price Reversion:

(vwap-close)/vwap

Region: USA
Universe: Top3000
Delay: 1
Neutralization: Subindustry
Decay: 15
Truncation: 0.08
Pasteurization: On
Unit Handling: Verify
NaN Handling: Off

In Fig. 1 we present the results for this alpha signal.

4. More on price reversion but with a condition on the volume

–3–
Figure 1: Results for the price weighted average alpha.

twenty_day_SMA = ts_mean(close, 20);


trade_when(volume>=ts_sum(volume,5)/7.5,
rank(twenty_day_SMA-close),-1)

Region: USA
Universe: Top3000
Delay: 1
Neutralization: Subindustry
Decay: 4
Truncation: 0.08
Pasteurization: On
Unit Handling: Verify
NaN Handling: Off

5. Implied volatility.

alpha = ts_decay_linear(ts_delta(implied_volatility_call_60, 25)


> 0, 20);

Region: USA
Universe: Top3000
Delay: 1
Neutralization: Sector
Decay: 4
Truncation: 0.08
Pasteurization: On

–4–
Unit Handling: Verify
NaN Handling: Off

6. Sentiment data. A stock with less sentiment volume (buzz) compare to the average
sentiment volume of the last quarter (60 trading days) might imply lower risk of
overraction and is better to invest.

buzz = ts_backfill(-vec_sum(scl12_alltype_buzzvec),20);
ts_av_diff(buzz, 60)

Region: USA
Universe: Top3000
Delay: 1
Neutralization: Sector
Decay: 4
Truncation: 0.08
Pasteurization: On
Unit Handling: Verify
NaN Handling: Off

3.2 Chinese market


1. Volatility of daily turnover in last 20 days

rank(-mdl175_volatility*log(volume))
*(1+group_rank(mdl175_revenuettm, sector))

Region: CHN
Universe: Top3000
Delay: 0
Neutralization: Sector
Decay: 3
Truncation: 0.08
Pasteurization: On
Unit Handling: Verify

–5–
Figure 2: Results for the price weighted average alpha.

NaN Handling: Off

2. Volatility of daily turnover in last 20 days with an event threshold

# Volatility of daily turnover in last 20 days


event = volume>adv20;
alpha = rank(-mdl175_volatility*log(volume))*(1+
group_rank(mdl175_grossprofit, subindustry));
trade_when(event, alpha, -1)

Region: CHN
Universe: Top3000
Delay: 0
Neutralization: Industry
Decay: 6
Truncation: 0.05
Pasteurization: On
Unit Handling: Verify
NaN Handling: On

In Fig. 2 we present the results for this trading signal.

References

[1] “Worldquant brain.” https://platform.worldquantbrain.com/.

–6–

You might also like