Saturday, July 28, 2012

Summary Book 1 - Chapter 4 Evaluating Trading Strategy Performance


Quantitative trading strategies harnessing the power of quantitative techniques to create a winning trading program:

Poppers theory focuses on the growth of human knowledge and the methods used in making new discoveries.

never accept that a strategy is going to be profitable.

assume the strategy is profitable until a better strategy is found or a there is a problem with it in historical data and performance.

a trading theory may change and not hold accross time. no strategy will continue to be profitable forever.

Flaws in current performance measures of a trading strategy:

Net Profit- widely quoted performance statistics. it is the dollar profit earned or lost during the life of the back-test.

maximize return per unit of risk.
Note:Absolute returns are not important as they do not measure the risk involved such as volatility of the stock,standard deviation of the price.


Profit factor- calculated by dividing the total profit gained on winning trades by the total loss on losing trades.
profitable strategy factor will be greater than one. unprofitable strategy will be less than one.

Gross Profit +1750
Gross Loss -1500
1750/1500 = profit factor of 1.17

profit to drawdown- ratio of net profit to maximum drawdown.
a drawdown occurs when net profit falls from its highest point.
calculated each trading day with the maxium value being the maximum drawdown.

deviding net profit by maximum drawback is a measure of reward to risk.
Riskier strategies have larger maximum drawdowns.

the problem with this is: this method net profit does not increase linearly with time.
 profit to drawdown ration varies depending on the length of time in the test.

One of my requirements for performance measures is the ability to compare various strategies regardless of the time frame studied.

Percent of profitable trades- used to gauge strategy success. the number of winning trades divided by the total number of trades in the back-test.

BETTER PERFORMANCE MEASURE
KRatio and sharpe ration, measures compare reward to risk in order to assess strategy performance.

Sharp Ratio:
if return is widely dispersed with large and winner and loser,its a risky trade because of the high standard deviation.
if returns are wrapped around the mean, the strategy has a smaller standard deviation and is less risky.

Sharpe ratio = Average return / Standard deviation of returns * Scaling factor

the scaling factor is the square root of time periods in a year.

when testing a strategy calculate the sharpe ratio and focus on finding strategies that produce sharpe ratios greater than positive one.

the sharpe ratio is its flaws. so to compliment it we use the K-ratio.
instead of looing at returns irrespective of when they occur, the Kratio calculates performance based on the stability of the equity curve.

first we need to create an equity curve to calculate K-ratio (graph of cumulative profits over time)

equity curve should increase linearly with respect to time.

if risk is constant thoughtout the life of the test, no adjustments need to be made to the equity curve.

start by calculating a linear regression (best fit line that minimizes the square error between forecast and actual) of the equity curve.

b1 in the equity curve is the proxy for reward in the k-ratio.

equity cruve i = b0 + b1 . trend i

risk in k-ratio is measured by calculating the standard error of the b1 regression coefficient.

large standard error indicates slope of the equity curve is inconsistent over time. small errors indicate consistent equity curve.
calculating K-Ratio in Excel


The K-ratio is calculated by dividing the b1 estimate by both the standard error of b1 and the number of periods in the performance test. By dividing by the number of data points, we normalize the K-ratio to be consistent regardless of the periodicity used to calculate its components.

K-ratio is a unitless measure of performance, Weekly performance of corn futures can be compared with tick data performance of trading IBM.


The Sharpe and K-Ratio are measures of trading strategy performance.

COMPARISON OF BENCHMARK STRATEGIES
the following 2 are benchmark strategies.

Channel breakout-trend following method
     Enter long if today’s close is the highest close of the past 40 days.
     Exit long if today’s close is the lowest close of the past 20 days.
     Enter short if today’s close is the lowest close of the past 40 days.
     Exit short if today’s close is the highest close of the past 20 days.
moving average crossover-trend following method
     Enter long if the 10-day simple moving average of closes crosses above the 40-day simple moving
average of closes.
     Enter short if the 10-day simple moving average of closes crosses below the 40-day simple moving
average of closes.

we calculate the K-Ratio and sharpe ratio of the channel breakout and moving average crossover over a portfolio of markets.

always trade with the trend.trend following is profitable as shown by history.

a strategy may decline through the days, meaning the average of returns may reduce every year for a
certain strategy.

Equity Curve and Regression Band Forecast. We can forecast equity growth using past data. If equity
falls below the lower band, we must reevaluate the potential of the strategy.

any strategy that performs badly can always be reversed to generate profit. simply by doing the opposite. sell when the signal is a buy, buy when the signal is a sell.

Some trading strategies may produce profits due solely to an overall rising or falling underlying market.

sometimes a strategy may work because of the markets uptrend. in order to remove the bias of the markets up direction we use the following formula:

return strategy = b0 + b1 return market + b2 returnmarket^2 + epsilon

if the t-statistics is less than +1 then chances are its performing due to markets runup or decline.
if t-statistics is greater than one, then strategy is valid and not biased

Magical thinking: people think that their behaviour causes something to happen while its another power that is making it happen. just because a strategy worked a few times in history doesnt mean it will work again.

No comments:

Post a Comment