Trading Tips 03 I Control your risk.

6
A publication of How to create and trade an optimal portfolio. intalus.com Powered by CONTROL YOUR RISK. AUTO-ADJUST POSITION SIZE. SKYSCRAPER. The Gherkin (Swiss-Re Tower), London Landmark of the financial center of London. 182 meter. TRDING TIPS. Issue 03

Transcript of Trading Tips 03 I Control your risk.

A publication of

How to create and trade an optimal portfolio.

intalus.com

Powered by

CONTROL YOUR RISK.AUTO-ADJUST POSITION SIZE.

SKYS

CRA

PER.

The

Ghe

rkin

(S

wis

s-R

e To

wer

), L

ondo

nLa

ndm

ark

of t

he f

inan

cial

cen

ter

of L

ondo

n. 1

82 m

eter

.

TR�DINGTIPS. Issue

03

Philipp is the Senior Quant Analyst at Intalus. He was born in Austria

and studied electrical engineering before joining a large German Bank.

He developed fully automated trading strategies for their proprietary

trading department. His book about how to design winning trading

strategies has been among the top sellers in Germany for the last two

years. At Intalus he is responsible for the in house training of

institutional traders and the development of custom made algorithmic

trading strategies.

You may contact Philipp at

[email protected]

CONTROLYOUR RISK.

by Philipp Kahler

TR�DING TIPS. Issue 03CONTROL YOUR RISK.

SHARE THIS TRADING TIP! MORE TRADING TIPS

TR�DING TIPS. Issue 03CONTROL YOUR RISK.

CONTROL YOUR RISK.How to create and trade an optimal portfolio

When using strategies that only define when to buy and sell (and not the size of the trade) your backtest

over a range of stocks has only limited value. As various stocks usually have different prices it would be

useless always to buy 1 piece. Instead you would probably invest the same amount of money with each

trade to balance risk, and that`s what this script does.

The script starts with defining some inputs for the right position sizing. You may change these according to

your needs. The first input is called ‘PS_Members’. It defines how many stocks you will trade. For a single

stock strategy this value is 1, if you want to trade all FTSE100 stocks (for example) then set to 100. As you

can see the default setting for this input is 10.

Second step is to define the capital for the whole portfolio. The default setting for ‘PS_Capital’ is 1,000,000.

Third, is to decide what happens with profits and losses. They can be ignored by choosing ‘none’ from the

‘PS_Method’ option. In this case the strategy always uses the given initial capital. If you want to reinvest

the P & L of a given security to this security then select ‘local’. If you would like to redistribute the Portfolio

P&L equally to all portfolio members then select ‘global’.

Fourth, and the final step, is to define the lot size of the security. If you want to buy in steps of 1, then set

this to 1, if you always want to buy 100 stocks as a bundle then set it to 100.

Watch the video and see how this script is used in conjunction with a sample strategy. The video also

shows you how to copy and paste the script into Tradesignal® to make it available for any of your strate-

gies or one of the many pre-build strategies Tradesignal is shipped with.

Inputs: PS_Members(10),PS_Capital(1000000),PS_Method(global,local,none),Lot(10);

Variables: cap, con;

// redistribution of portfolio P&L equally to all stocksif PS_Method = global then cap = (PS_Capital + globalclosedequity) / PS_Members;

// redistribution of single stock P&L to single stockif PS_Method = local then cap = (PS_Capital) / PS_Members + closedequity;

// do not redistribute P&Lif PS_Method = none then cap = PS_Capital / PS_Members;

// rounding the position sizeif close<>0 then con = round(cap/close/Lot,0) * Lot;

// set position sizeSetDefaultQuantity(con);

SHARE THIS TRADING TIP! MORE TRADING TIPS

Watch video and see

how this script can be used in

a trading strategy.

TR�DING TIPS. Issue 03CONTROL YOUR RISK.

Here are all the steps to explain how to make use of the script:

Right-hand side; click ‘Strategies’ and choose ‘New Strategy…’

In the next box click the first option

‘Use the Equilla Formula Language’.

Enter a name of your choice for the script; e. g. “Position Sizing’ and

click on ‘Done’. A new blank editor window opens, the so called

‘Equilla Editor Window’.

1.

2.

3.

SHARE THIS TRADING TIP! MORE TRADING TIPS

TR�DING TIPS. Issue 03CONTROL YOUR RISK.

Copy script from PDF and paste it into the ‘Equilla Editor Windows’.

Click on ‘Save’ and finally click the ‘Compile Script’ button on top of

the program window.

Open up a single chart or a portfolio (in my case I use the FTSE 100

Index) and apply one of Tradesignals’ trading strategies. Just for

demonstration purpose I took the Moving Average Double Crossover

strategy. Afterwards apply this, just created, ‘Position Sizing” script.

You can clearly see that in this example my position sizings are all now

proportional; which means the amount of money invested is equal for

each stock.

I can further fine tune or alter the strategy settings very quickly by

accessing ‘Properties’ on the right of the screen and changing the

options. Fast and easy when you know how.

Take care, take profit,

Philipp Kahler

Senior Quantitativ Analyst at Intalus

4.

SHARE THIS TRADING TIP! MORE TRADING TIPS

© 2012 Intalus – www.intalus.com

Distribution allowed under a Creative Commons Attribution-Noncommercial license:

http://creativecommons.org/licenses/by-nc/3.0/

Tradesignal® is a registered trademark of Tradesignal GmbH.

Unauthorized use or misuse is specifically prohibited.

TR�DING TIPS. Issue 03CONTROL YOUR RISK.

Trad

esig

nal®

is a

reg

iste

red

trad

emar

k of

Tra

desi

gnal

Gm

bH. U

naut

horiz

ed u

se o

r m

isus

e is

spe

cific

ally

pro

hibi

ted.

TEST YOUR PORTFOLIO.

Start improving your productivity. Build your own automatically adjusted

portfolio. Define your own conditions for risk adjustment. Find out how

you can trade more efficiently.

NOT ALREADY A TRADESIGNAL® USER?

CLICK HERE b

AND ORDER YOUR FREE TRIAL TODAY.

SHARE THIS TRADING TIP! MORE TRADING TIPS

FREE TRIAL