Algorithmic Trading Session 12 Performance Analysis III Trade Frequency and Optimal Leverage. Oliver Steinki, CFA, FRM

Similar documents
Algorithmic Trading Session 4 Trade Signal Generation II Backtesting. Oliver Steinki, CFA, FRM

AlgorithmicTrading Session 3 Trade Signal Generation I FindingTrading Ideas and Common Pitfalls. Oliver Steinki, CFA, FRM

Algorithmic Trading Session 10 Performance Analysis I Performance Measurement. Oliver Steinki, CFA, FRM

Market Risk Analysis Volume IV. Value-at-Risk Models

Using Fat Tails to Model Gray Swans

Tuomo Lampinen Silicon Cloud Technologies LLC

Part 1 Back Testing Quantitative Trading Strategies

Disclaimer. No Soliciting. No Recording. No Photography.

Binary Options Trading Strategies How to Become a Successful Trader?

Do You Really Understand Rates of Return? Using them to look backward - and forward

Alternative VaR Models

Financial Risk Forecasting Chapter 4 Risk Measures

Measurement of Market Risk

Omnesys Technologies. Nest Plus Screener IQ - Technical User Manual. June 2013

1 of 6 7/10/2013 8:42 AM

Quantitative Trading System For The E-mini S&P

Introduction to Loss Distribution Approach

Where Vami 0 = 1000 and Where R N = Return for period N. Vami N = ( 1 + R N ) Vami N-1. Where R I = Return for period I. Average Return = ( S R I ) N

PRE CONFERENCE WORKSHOP 3

Project Proposals for MS&E 444. Lisa Borland and Jeremy Evnine. Evnine and Associates, Inc. April 2008

The Enlightened Stock Trader Certification Program

Ho Ho Quantitative Portfolio Manager, CalPERS

David Stendahl And Position Sizing

OMEGA. A New Tool for Financial Analysis

In this presentation, I want to first separate risk

Cambridge University Press Risk Modelling in General Insurance: From Principles to Practice Roger J. Gray and Susan M.

Portable alpha through MANAGED FUTURES

QF206 Week 11. Part 2 Back Testing Case Study: A TA-Based Example. 1 of 44 March 13, Christopher Ting

Week 1 Quantitative Analysis of Financial Markets Distributions B

Comparing the Performance of Annuities with Principal Guarantees: Accumulation Benefit on a VA Versus FIA

A share on algorithm trading strategy design and testing. Peter XI 20 November 2017

Navigating Unpredictable Waters: Negotiating the Joint Venture Waterfall

Using Fractals to Improve Currency Risk Management Strategies

R ES E A R C H R E P O RT

Hedging Under Jump Diffusions with Transaction Costs. Peter Forsyth, Shannon Kennedy, Ken Vetzal University of Waterloo

We are not saying it s easy, we are just trying to make it simpler than before. An Online Platform for backtesting quantitative trading strategies.

Stochastic Analysis Of Long Term Multiple-Decrement Contracts

Model-Based Trading Strategies. Financial-Hacker.com Johann Christian Lotter / op group Germany GmbH

New financial analysis tools at CARMA

Modeling Trading System Performance

REGULATION SIMULATION. Philip Maymin

MEASURING PORTFOLIO RISKS USING CONDITIONAL COPULA-AR-GARCH MODEL

Comparison of Estimation For Conditional Value at Risk

The Returns and Risk of Dynamic Investment Strategies: A Simulation Comparison

Measuring Retirement Plan Effectiveness

Rebalancing the Simon Fraser University s Academic Pension Plan s Balanced Fund: A Case Study

Trading Essentials Framework Money Management & Trade Sizing

Regional IAM: analysis of riskadjusted costs and benefits of climate policies

Hurdle Rate For Active Management August 2013

Proficient Equities Pvt. Ltd. 23 R.N Mukherjee Road, BNCCI House,4 th Floor, Kolkata , Phone: , Mob:

Capital Protection Oriented Schemes - Strategies, Regulation & Rating

Bloomberg. Portfolio Value-at-Risk. Sridhar Gollamudi & Bryan Weber. September 22, Version 1.0

Annual risk measures and related statistics

HYPOTHETICAL BLEND FULLY FUNDED

TABLE OF CONTENTS - VOLUME 2

Executive Summary: A CVaR Scenario-based Framework For Minimizing Downside Risk In Multi-Asset Class Portfolios

CHAPTER 5 STOCHASTIC SCHEDULING

Presented at the 2012 SCEA/ISPA Joint Annual Conference and Training Workshop -

CHAPTER II LITERATURE STUDY

Stock Market Forecast: Chaos Theory Revealing How the Market Works March 25, 2018 I Know First Research

Market Microstructure Invariants

Operational Risk Modeling

P2.T5. Market Risk Measurement & Management. Jorion, Value-at Risk: The New Benchmark for Managing Financial Risk, 3 rd Edition

CHAPTER 12 APPENDIX Valuing Some More Real Options

The Role of ERM in Reinsurance Decisions

Risk Management CHAPTER 12

The Assumption(s) of Normality

The Two-Sample Independent Sample t Test

NATIONWIDE ASSET ALLOCATION INVESTMENT PROCESS

Introduction to Algorithmic Trading Strategies Lecture 8

Minimum Variance and Tracking Error: Combining Absolute and Relative Risk in a Single Strategy

1.1 Interest rates Time value of money

Unit-of-Risk Ratios A New Way to Assess Alpha

UPDATED IAA EDUCATION SYLLABUS

Mathematics of Finance Final Preparation December 19. To be thoroughly prepared for the final exam, you should

Portfolio Sharpening

Calculating VaR. There are several approaches for calculating the Value at Risk figure. The most popular are the

Risk management. VaR and Expected Shortfall. Christian Groll. VaR and Expected Shortfall Risk management Christian Groll 1 / 56

Probability Weighted Moments. Andrew Smith

A Probabilistic Approach to Determining the Number of Widgets to Build in a Yield-Constrained Process

Ernest Chan, Ph.D. EXP Capital Management, LLC. 1

in-depth Invesco Actively Managed Low Volatility Strategies The Case for

Market Risk Management Framework. July 28, 2012

THE ACHILLES HEEL OF VALUE FUNDS, THE TITANS OF VARIABLE INCOME

ADVANCED QUANTITATIVE SCHEDULE RISK ANALYSIS

The misleading nature of correlations

Efficient Rebalancing of Taxable Portfolios

Statistical Arbitrage: Pair Trading

Chaos Barometer. Chaos Measurement Oscillator for Financial Markets.

The 1.2 Fund Overview. The 1.2 Fund

Catastrophe Reinsurance Pricing

In physics and engineering education, Fermi problems

Implementing Momentum Strategy with Options: Dynamic Scaling and Optimization

Non-normality of Market Returns A framework for asset allocation decision-making

Retirement. Optimal Asset Allocation in Retirement: A Downside Risk Perspective. JUne W. Van Harlow, Ph.D., CFA Director of Research ABSTRACT

Ocean Hedge Fund. James Leech Matt Murphy Robbie Silvis

Approximating the Confidence Intervals for Sharpe Style Weights

GN47: Stochastic Modelling of Economic Risks in Life Insurance

Getting Beyond Ordinary MANAGING PLAN COSTS IN AUTOMATIC PROGRAMS

Bricks, shares or gold bars?

Transcription:

Algorithmic Trading Session 12 Performance Analysis III Trade Frequency and Optimal Leverage Oliver Steinki, CFA, FRM

Outline Introduction Trade Frequency Optimal Leverage Summary and Questions Sources Contact Details: osteinki@faculty.ie.edu or +41 76 228 2794 2

Introduction Where Do We Stand in the Algo Prop Trading Framework? SIGNAL GENERATION As we have seen, algorithmic proprietary trading strategies can be broken down into three subsequent steps: Signal Generation, Trade Implementation and Performance Analysis DECIDE WHEN AND HOW TO TRADE TRADE IMPLEMENTATION SIZE AND EXECUTE ORDERS, INCL. EXIT Performance Analysis is conducted after the trade has been closed and used in a backtesting context to judge whether the strategy is successful or not. In general, we can judge the performance according to five different metrics: return, risk, efficiency, trade frequency and leverage Sessions 10-12 deal with the question of analyzing performance Session 10: Performance Measurement Session 11: Performance Analysis I: Returns, risk and efficiency Today s Session 12: Performance Analysis II: Frequency of trades and leverage PERFORMANCE ANALYSIS RETURN, RISK AND EFFICIENCY RATIOS 3

Introduction Performance Analysis Performance Analysis is a critical aspect of portfolio management. We split the analysis into five metrics: return, risk, efficiency, trade frequency and leverage Return is expressed as the geometric mean growth rate of the portfolio Risk is defined as the downside deviation of returns and can be expressed in terms such as standard deviation, downside standard deviation, maximum drawdown and length of maximum drawdown Efficiency measures set risk and return in relation. They are expressed through classical ratios such as Sharpe and Treynor measure, but also more modern ones such as the Sortino ratio. Win/Loss and Average Profit/Loss also indicate efficiency. A comparison to a benchmark is an indirect way of efficiency measurement as one targets a better return than the benchmark with similar risk or similar returns with lower risk Trade frequency is important to judge the impact of transaction costs and infrastructure requirements. The higher the trade frequency, the bigger the impact of transactions costs and requirement of a sophisticated infrastructure Leverage is another expression for money management. It deals with the question of which percentage of the total portfolio to invest in a given trade and how one can optimize this 4

Introduction Review: Performance Drivers of Quantitative Trading Strategies Quantitative Investment Strategies are driven by four success factors: trade frequency, success ratio, return distributions when right/wrong and leverage ratio The higher the success ratio, the more likely it is to achieve a positive return over a one year period. Higher volatility of the underlying assuming constant success ratio will lead to higher expected returns The distribution of returns when being right / wrong is especially important for strategies with heavy long or short bias. Strategies with balanced long/short positions and hence similar distributions when right/wrong are less impacted by these distributional patterns. Downside risk can further be limited through active risk/money management, e.g. stop loss orders Leverage plays an important role to scale returns and can be seen as an artificial way to increase the volatility of the traded underlying. It is at the core of the money management question to determine the ideal betting size. For example, a 10 times leveraged position on an asset with 1% daily moves is similar to a full non-leveraged position on an asset with 10% daily moves 5

Trade Frequency Classification Time Frames: Long Term: Months to Years Short Term: Days, Weeks, Months Intraday: Seconds to Hours High frequency: Fractions of Seconds Hurdle Rate for Transaction Costs The more frequent the trading, the higher the transaction costs Physical Infrastructure The more frequent the trading, the higher the requirement to have a sophisticated trading infrastructure 6

Trade Frequency Infrastructure Requirements Data feeds: Although end of day data is available at low costs, tick by tick data can cost substantial amounts of money Data Storage: The more data you receive and the more frequent, the higher your data storage requirements. For every underlying you store, you should at least store OHLC for every day and Volume data. Next to this, you should also save information such as tickers, expiry dates, multiples, exchange on which the instrument is traded, time zone of the exchange, trading hours, currency and security type Data Processing: The more complex your trade signal generation process, the more computational power you will need. Additionally, the more time critical your investment strategy, you need to invest in computational power to minimize the time period between receiving the last information you need for your trade signal generation and trade implementation. Backup Systems: When you start out, a simple backup in the cloud or on an external hard disk will do. As more you grow and attract institutional clients, they will be very keen about your business contingency processes. Ideally you run the same system in parallel in two to three locations so that there is no impact on trading if one system fails 7

Optimal Leverage Risk Management We ll discuss several methods of computing the optimal leverage that maximizes the compounded growth rate. Each method has its own assumptions and drawbacks. But, in all cases, we have to make the assumption that the future probability distribution of returns of the market is the same as in the past. This is usually an incorrect assumption, but this is the best that quantitative models can do. Even more restrictive, many risk management techniques assume further that the probability distribution of returns of the strategy itself is the same as in the past. And finally, the most restrictive of all assumes that the probability distribution of returns of the strategy is Gaussian As an institutional asset manager, client constraints limit the maximum drawdown of an account. In this case, the maximum drawdown allowed forms an additional constraint in the leverage optimization problem Also, it may be wise to avoid trading altogether during times when the risk of loss is high, hence setting leverage to close to 0. Therefore, many algorithmic trading strategies reduce exposure during times of increased expected volatility such as central bank announcements or significant macroeconomic numbers No matter how the optimal leverage is determined, the one central theme is that the leverage should be kept constant. This is necessary to optimize the growth rate whether or not we have the maximum drawdown constraint. Keeping a constant leverage may sound rather mundane, but can be counterintuitive when put into action 8

Optimal Leverage Kelly Formula If one assumes that the probability distribution of returns is Gaussian, the Kelly formula gives us a very simple answer for optimal leverage f: f = m / s 2 where m is the mean excess return and s 2 is the variance of the excess returns It can be proven that if the Gaussian assumption is a good approximation, then the Kelly leverage f will generate the highest compounded growth rate of equity, assuming that all profits are reinvested (see optional reading) However, even if the Gaussian assumption is really valid, we will inevitably suffer estimation errors when we try to estimate what the true mean and variance of the excess return are. And no matter how good one s estimation method is, there is no guarantee that the future mean and variance will be the same as the historical ones. The consequence of using an overestimated mean or an underestimated variance is dire: Either case will lead to an overestimated optimal leverage, and if this overestimated leverage is high enough, it will eventually lead to ruin: equity going to zero On the other hand, the consequence of using an underestimated leverage is merely a submaximal compounded growth rate. Many traders justifiably prefer the later scenario, and they routinely deploy a leverage equal to half of what the Kelly formula recommends: the so-called half-kelly leverage 9

Optimal Leverage Simulated Returns If one relaxes the Gaussian assumption and substitutes another analytic form (e.g., Student s t) for the returns distribution to take into account the fat tails, we can still follow the derivations of the Kelly formula in Thorp s paper and arrive at another optimal leverage, though the formula won t be as simple anymore (This is true as long as the distribution has a finite number of moments, unlike, for example, the Pareto Levy distribution). For some distributions, it may not even be possible to arrive at an analytic answer. This is where Monte Carlo simulations can help The expected value of the compounded growth rate as a function of the leverage f is (assuming for simplicity that the risk-free rate is zero): g( f ) = log(1 + fr), where indicates an average over some random sampling of the unlevered return-per-bar R(t) of the strategy (not of the market prices) based on some probability distribution of R Even though we do not know the true distribution of R, we can use the so-called Pearson system to model it. model it. The Pearson system takes as input the mean, standard deviation, skewness, and kurtosis of the empirical distribution of R, and models it as one of seven probability distributions expressible analytically encompassing Gaussian, beta, gamma, Student s t, and so on. Of course, these are not the most general distributions possible. The empirical distribution might have nonzero higher moments that are not captured by the Pearson system and might, in fact, have infi nite higher moments, as in the case of the Pareto Levy distribution. But to capture all the higher moments invites data-snooping bias due to the limited amount of empirical data usually available. So, for all practical purposes, we use the Pearson system for our Monte Carlo sampling 10

Optimal Leverage Optimizing Historical Growth Rate Instead of optimizing the expected value of the growth rate using our analytical probability distribution of returns one can of course just optimize the historical growth rate in the backtest with respect to the leverage. We just need one particular realized set of returns: that which actually occurred in the backtest This method suffers the usual drawback of parameter optimization in backtest: data-snooping bias. In general, the optimal leverage for this particular historical realization of the strategy returns won t be optimal for a different realization that will occur in the future. Unlike Monte Carlo optimization, the historical returns offer insufficient data to determine an optimal leverage that works well for many realizations Despite these caveats, brute force optimization over the backtest returns sometimes does give a very similar answer to both the Kelly leverage and Monte Carlo optimization 11

Optimal Leverage Maximum Drawdown Most portfolio managers manage (at least in part) other people s assets, therefore maximizing the long-term growth rate is not the only objective. Often, their clients (or employers) will insist that the absolute value of the drawdown (return calculated from the historic high watermark) should never exceed a certain maximum. That is to say, they dictate what the maximum drawdown can be. This requirement translates into an additional constraint into our leverage optimization problem Unfortunately, this translation is not as simple as multiplying the unconstrained optimal leverage by the ratio of the maximum drawdown allowed and the original unconstrained maximum drawdown. Therefore, if the ideal leverage of say 40% results in a maximum drawdown of 50% and your drawdown constraint is 25%, you can not just reduce the leverage to 20%. The factor depends on the exact series of simulated returns, and so are not exactly reproducible In order to prevent future drawdowns from breaking the constraint, we can either use constant proportion insurance or impose a stop loss 12

Optimal Leverage CPPI The often conflicting goals of wishing to maximize compounded growth rate while limiting the maximum drawdown have been discussed already. There is one method that allows us to fulfill both wishes: constant proportion portfolio insurance (CPPI) Suppose the optimal Kelly leverage of our strategy is determined to be f. And suppose we are allowed a maximum drawdown of D. We can simply set aside D of our initial total account equity for trading, and apply a leverage of f to this subaccount to determine our portfolio market value. The other 1 D of the account will be sitting in cash. We can then be assured that we won t lose all of the equity of this subaccount, or, equivalently, we won t suffer a drawdown of more than D in our total account If the trading strategy is profitable and the total account equity reaches a new high water mark, then we can reset our subaccount equity so that it is again D of the total equity, moving some cash back to the cash account. However, if the strategy suffers losses, we will not transfer any cash between the cash and the trading subaccount. Of course, if the losses continue and we lose all the equity in the trading subaccount, we have to abandon the strategy because it has reached our maximum allowed drawdown of D. Therefore, in addition to limiting our drawdown, this scheme serves as a graceful, principled way to wind down a losing strategy 13

Optimal Leverage Stop Loss There are two ways to use stop losses. The common usage is to use stop loss to exit an existing position whenever its unrealized P&L drops below a threshold. But after we exit this position, we are free to reenter into a new position, perhaps even one of the same sign, sometime later. In other words, we are not concerned about the cumulative P&L or the drawdown of the strategy The less common usage is to use stop loss to exit the strategy completely when our drawdown drops below a threshold. This usage of stop loss is awkward - it can happen only once during the lifetime of a strategy, and ideally we would never have to use it. That is the reason why CPPI is preferred over using stop loss for the same protection. Stop loss can only prevent the unrealized P&L from exceeding our selfimposed limit if the market is always open whenever we are holding a position. For example, it is effective if we do not hold positions after the market closes or if we are trading in currencies or some futures where the electronic market is open 24/5. Otherwise, if the prices gap down or up when the market reopens, the stop loss may be executed at a price much worse than what ourmaximum allowable loss dictates In some extreme circumstances, stop loss is useless even if the market is open but when all liquidity providers decide to withdraw their liquidity simultaneously as happened during the flash crash in May 2010. 14

Summary and Questions Performance Analysis is a critical aspect of portfolio management. We split the analysis into five metrics: return, risk, efficiency, trade frequency and leverage Trade frequency is important to judge the impact of transaction costs and infrastructure requirements. The higher the trade frequency, the bigger the impact of transactions costs and requirement of a sophisticated infrastructure Leverage is another expression for money management. It deals with the question of which percentage of the total portfolio to invest in a given trade and how one can optimize this Questions? Contact Details: osteinki@faculty.ie.edu or +41 76 228 2794 15

Sources Portfolio Construction, Management, and Protection by Robert A. Strong Algorithmic Trading: Winning Strategies and Their Rationale by Ernest P. Chan www.quantstart.com and www.quantgekko.com Contact Details: osteinki@faculty.ie.edu or +41 76 228 2794 16