31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

TABLE 3.5

Single Moving Average (SMA) Crossover Algorithm

SMA

Simple Moving Average Crossover

Length

Net

Profit

CAR

Max.

Sys DD

Profit

Factor

Ulcer

Index

#Trades

Avg

Profit/

Loss

Avg

Bars

Held

%of

Winners

19 −922061 −15.08 −986733 0.91 48.53 15814 −58.31 9.78 23.04

39 −15191 −0.1 −612726 1 16.1 11114 −1.37 13.49 19.97

100 564180 2.91 −626574 1.11 13.92 6543 86.23 21.94 16.25

200 487626 2.58 −492640 1.13 14.95 4495 108.48 30.67 12.77

of the occurrence of different magnitudes of drawdown. This analysis will be

detailed in Chapter 8 along with Monte Carlo simulation.

Annual Return %—compounded annual return based on a cool million-dollar

investment.

Number of Trades: number of trades.

Profit/Loss—(Profit of winners / Loss of losers) / Number of trades. This is

also known as the expectancy in terms of dollars.

Bars Held—the number of bars, on average, a trade is held. You can use this as

a guide to align different parameters sets across different algorithms.

Total Transaction Costs—summation of execution fees.

Profit Factor—profit of winners divided by loss of losers.

Ulcer Index—square root of sum of squared drawdowns divided by number of

bars. It measures the volatility in the downward direction.

Sharpe Ratio—indicator of consistency. Average return divided by the standard

deviation of returns sampled on daily, monthly, or yearly basis. The higher the

better.

91

COMPLETE TRADING ALGORITHMS

Armed with these performance metrics it is plain to see that the SMA as a complete

trading algorithm is not that good. I hope you weren’t surprised by this fact. Don’t

get me wrong; simple moving averages have their place in technical analysis, but

not as a complete trading algorithm. Results might improve utilizing an exponential

moving average, but not enough to consider it as your main trading tool. Notice

how the long-term version handily outperformed its shorter and intermediate-term

counterparts.

If a single moving average doesn’t cut the mustard, then what about two?

Table 3.6 shows the DMA utilizing three different lengths.

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!