Using R for Hedge Fund of



Similar documents
Contents. List of Figures. List of Tables. List of Examples. Preface to Volume IV

Risk Budgeting: Concept, Interpretation and Applications

Exploratory Data Analysis in Finance Using PerformanceAnalytics

NEW ONLINE COMPUTATIONAL FINANCE CERTIFICATE

Investment Statistics: Definitions & Formulas

Risk Budgeting. Northfield Information Services Newport Conference June 2005 Sandy Warrick, CFA

APT Integrated risk management for the buy-side

Measuring downside risk of stock returns with time-dependent volatility (Downside-Risikomessung für Aktien mit zeitabhängigen Volatilitäten)

Portfolio optimization with CVaR budgets

Quantitative Methods for Finance

DOES IT PAY TO HAVE FAT TAILS? EXAMINING KURTOSIS AND THE CROSS-SECTION OF STOCK RETURNS

Hedge Funds, Funds-of-Funds, and Commodity. Trading Advisors

Asymmetric Correlations and Tail Dependence in Financial Asset Returns (Asymmetrische Korrelationen und Tail-Dependence in Finanzmarktrenditen)

CONTENTS. List of Figures List of Tables. List of Abbreviations

Financial Market Efficiency and Its Implications

Hedge Funds: Risk and Return

Non Linear Dependence Structures: a Copula Opinion Approach in Portfolio Optimization

NEXT GENERATION RISK MANAGEMENT and PORTFOLIO CONSTRUCTION

Applied Fixed Income Risk Modeling

Financial Assets Behaving Badly The Case of High Yield Bonds. Chris Kantos Newport Seminar June 2013

Portfolio Construction in a Regression Framework

Validating Market Risk Models: A Practical Approach

Vector Time Series Model Representations and Analysis with XploRe

Sales forecasting # 2

Interest Rates and Inflation: How They Might Affect Managed Futures

JOURNAL OF INVESTMENT MANAGEMENT, Vol. 1, No. 2, (2003), pp SHORT VOLATILITY STRATEGIES: IDENTIFICATION, MEASUREMENT, AND RISK MANAGEMENT 1

Federal Reserve Bank of Atlanta Financial Markets Conference Hedge Fund: An Industry in its Adolescence

Geostatistics Exploratory Analysis

Investment Portfolio Management and Effective Asset Allocation for Institutional and Private Banking Clients

Sensex Realized Volatility Index

Portfolio Distribution Modelling and Computation. Harry Zheng Department of Mathematics Imperial College

Asymmetry and the Cost of Capital

Implied Volatility Surface

The Merits of Absolute Return Quantitative Investment Strategies

Hedge Funds: Risk and Return

Performance Measurement & Attribution

The essentials of Performance Measurement & Attribution

Crisis Alpha and Risk in Alternative Investment Strategies

A Regime-Switching Model for Electricity Spot Prices. Gero Schindlmayr EnBW Trading GmbH

ABACUS ANALYTICS. Equity Factors and Portfolio Management: Alpha Generation Versus Risk Control

LDA at Work: Deutsche Bank s Approach to Quantifying Operational Risk

Chicago Booth BUSINESS STATISTICS Final Exam Fall 2011

What Level of Incentive Fees Are Hedge Fund Investors Actually Paying?

APPROACHES TO COMPUTING VALUE- AT-RISK FOR EQUITY PORTFOLIOS

Commodity Trading Advisors. AQF 2005 Nicolas Papageorgiou

Extracting Portable Alphas From Equity Long-Short Hedge Funds. William Fung* David A. Hsieh**

Parametric Value at Risk

The Tangent or Efficient Portfolio

Risk and return (1) Class 9 Financial Management,

Chapter 13 Introduction to Nonlinear Regression( 非 線 性 迴 歸 )

Web-based Supplementary Materials for Bayesian Effect Estimation. Accounting for Adjustment Uncertainty by Chi Wang, Giovanni

Introduction to Risk, Return and the Historical Record

Financial Statistics & Risk Management Master s Degree Program

Price Responsive Demand for Operating Reserves in Co-Optimized Electricity Markets with Wind Power

A comparison of Value at Risk methods for measurement of the financial risk 1

THETA AS AN ASSET CLASS By Dominik von Eynern, Swiss Alpha Asset Management GMBH

The Canadian Hedge Fund Industry: Performance and Market Timing*

A revisit of the hierarchical insurance claims modeling

An introduction to Value-at-Risk Learning Curve September 2003

ARMA, GARCH and Related Option Pricing Method

Financial Risk Models in R: Factor Models for Asset Returns. Workshop Overview

A constant volatility framework for managing tail risk

R Finance 2014 Estimating Factor Models and Managing Risk with factoranalytics

Uncertainty in Second Moments: Implications for Portfolio Allocation

Dr Christine Brown University of Melbourne

Innovations and Value Creation in Predictive Modeling. David Cummings Vice President - Research

An Internal Model for Operational Risk Computation

Measuring Economic Capital: Value at Risk, Expected Tail Loss and Copula Approach

Risk Management and Governance Hedging with Derivatives. Prof. Hugues Pirotte

Optimal Hedging of Uncertain Foreign Currency Returns. 12/12/2011 SLJ Macro Partners Fatih Yilmaz

PROPERTIES OF THE SAMPLE CORRELATION OF THE BIVARIATE LOGNORMAL DISTRIBUTION

Diversifying with Negatively Correlated Investments. Monterosso Investment Management Company, LLC Q1 2011

Physical delivery versus cash settlement: An empirical study on the feeder cattle contract

Third Edition. Philippe Jorion GARP. WILEY John Wiley & Sons, Inc.

Additional sources Compilation of sources:

Risk and return in Þxed income arbitrage: Nickels in front of a steamroller?

Monte Carlo Simulation

Risk Management for Alternative Investments

POINT Innovative Multi-Asset Portfolio Analysis

Executive Summary of Finance 430 Professor Vissing-Jørgensen Finance /63/64, Winter 2011

James X. Xiong, Ph.D., CFA Thomas Idzorek, CFA

Permutation Tests for Comparing Two Populations

Implied Volatility of Leveraged ETF Options

Haksun Li MY EXPERIENCE WITH ALGORITHMIC TRADING

Forecasting increases in the VIX: A timevarying long volatility hedge for equities

Transcription:

Using R for Hedge Fund of Funds Risk Management R/Finance 2009: Applied Finance with R University of Illinois Chicago, April 25, 2009 Eric Zivot Professor and Gary Waterman Distinguished Scholar, Department of Economics Adjunct Professor, Departments of Finance and Statistics University of Washington

Outline Hedge fund of funds environment Factor model risk measurement R implementation i in corporate environment Dealing with unequal data histories Some thoughts on S-PLUS and S+FinMetrics vs. R in Finance

Hedge Fund of Funds Environment HFoFs are hedge funds that invest in other hedge funds 20 to 30 portfolios of hedge funds Typical portfolio size is 30 funds Hedge fund universe is large: 5000 live funds Segmented into 10-15 distinct strategy types Hedge funds voluntarily report monthly performance to commercial databases Altvest, CISDM, HedgeFund.net, Lipper TASS, CS/Tremont, HFR HFoFs often have partial position level data on invested funds

Hedge Fund Universe Live funds Convertible Arbitrage Dedicated Short Bias Emerging Markets Equity Market Neutral Event Driven Fixed Income Arbitrage Global Macro Long/Short Equity Hedge Managed Futures Multi-Strategy Fund of Funds

Characteristics of Monthly Returns Reporting biases Survivorship, backfill Non-normal lbehavior Asymmetry (skewness) and fat tails (excess kurtosis) Serial correlation Performance smoothing, illiquid positions Unequal histories

Characteristics of Hedge Fund Data fund1 fund2 fund3 fund4 fund5 Observations 122.0000 107.0000 135.0000 135.0000 135.0000 NAs 13.0000 28.0000 0.0000 0.0000 0.0000 Minimum -0.0842-0.3649-0.0519-0.1556-0.2900 Quartile 1-0.0016-0.0051 0.0020-0.0017-0.0021 Median 0.0058 0.0046 0.0060 0.0073 0.0049 Arithmetic Mean 0.0038-0.0017 0.0063 0.0059 0.0021 Geometric Mean 0.0037-0.0029 0.0062 0.0055 0.0014 Quartile 3 0.0158 0.0129 0.0127 0.0157 0.0127 Maximum 0.0311 0.0861 0.0502 0.0762 0.0877 Variance 0.0003 0.0020 0.0002 0.0008 0.0013 Stdev 0.0176 0.0443 0.0152 0.0275 0.0357 Skewness -1.7753-5.6202-0.8810-2.4839-4.9948 Kurtosis 5.2887 40.9681 3.7960 13.8201 35.8623 Rho1 0.6060 0.3820 0.3590 0.4400 0.383 Sample: January 1998 March 2009

Factor Model Risk Measurement in HFoFs Portfolio Quantify factor risk exposures Equity, rates, credit, volatility, currency, commodity, etc. Quantify tail risk VRETL VaR, Risk budgeting Component, incremental, marginal Stress testing and scenario analysis

Commercial Products www.riskdata.com www.finanalytica.com com Very expensive! R is not!

Factor Model: Methodology R F F it = αi + βi 1 1 t + + β ε ik kt + it, = αi + β if ε t + it i = 1,, n; t = t,, T F ~ ( μ, Σ ) t ε 2 ~ (0, σ it ε, i ) cov( f, ε ) = 0 for all j, i and t jt it cov( ε, ε it jt ) = 0 for i j F F i

Practical Considerations Many potential risk factors ( > 50) High collinearity among some factors Risk ikfactors vary across discipline/strategy ili Nonlinear effects Dynamic effects Time varying coefficients Common histories for factors; unequal histories for fund performance

Expected Return Decomposition E[ R ] = α + β E [ F ] + + β E [ F ] [ it i i1 1t ik kt Expected return due to beta exposure β i E F ] + + β i 1 [ 1 t ik E[ F kt ] Expected return due to manager specific alpha α = E R ] ( β E[ F ] + + i [ it i1 1t β ik E[ Fkt ])

Variance Decomposition var( R ) var( ) var( ε ) σ 2 it = βi Ft βi + εit = βi ΣF βi + σε, i systematic specific Variance contribution due to factor exposures 2 2 β var( F ) + β var( F ) + + β var( F 2 1 1t 2 2t k kt ) Variance contribution due to covariances between factors 2 β1 β2 cov( F1 t, F2 t ) + + 2 βk 1 βk cov( Fk 1t, Fkt )

Covariance R = α + B F + ε t t t n 1 n 1 n k k 1 n 1 var( R ) =Σ = BΣ B + D = t FM diag( σ,, σ ) 2 2 ε ε,1 ε,n n F D ε Note: cov( R, R ) = β var( F ) β = β ΣFβ it jt i t j i j

Portfolio Analysis w = ( w,, w ) = portfolio weights 1 n R = w R = w α + w BF + w ε pt = n i= 1 = α p t w R i it p = + β F t n i= 1 + ε i i t n n + w i β i F t + i= 1 i= 1 w α + pt t w ε i it

Portfolio Variance Decomposition σ σ σ = var( R ) = w var( R ) w = w BΣ B w + w Dw 2 p R pt 2 p, systematic 2 p, specific = = w BΣ F B w t n 2 = 2 2 p, systematic w Dw wiσ ε, i R p = 2 i= 1 σ p k 2 2 2 p systematic p F p p j jj j= 1 σ, = β Σ β = β, σ + covariance terms covariance terms F σ k 2 2 2 p, systematic β p, j jj j= 1 = σ β σ

Risk Budgeting: Volatility MCR MCR σ p BΣ F B w + Dw = = Marginal contributions w σ p systematic MCR = specific = BΣ Dw σ σ p σ B w F p to risk CR σ p w ( BΣ FBw+ Dw) = w = w σ p Components to risk 1 CR = n CR i = σ i= 1 p

Value-at-Risk (VaR) Tail Risk Measures VaR = q = F α α α 1 ( ) F = CDF of returns R Expected Shortfall (ES) ES = E [ R R VaR ] α α

Tail Risk Measures: Normal Distribution ~ ( μ, σ 2 ), σ 2 = Σ p p p p FM R N w w N α p p α α VaR = μ σ z, z =Φ ( α) ES N α = μ σ φ p p α 1 ( z ) α 1 See functions in PerformanceAnalytics

Tail Risk Measures: Non-NormalNormal Distributions Use Cornish-Fisher expansion to account for asymmetry y and fat tails VaR CF α = μ σ i i z α 1 1 1 + σ ( zα 1) skew ( zα 3zα ) ekurt + ( 2zα 5zα ) skew 6 24 36 2 3 3 2 i i i i CF ES α : Formula given in Boudt, Peterson and Croux (2008) "Estimation and Decomposition of Downside Risk for Portfolios with Non-Normal Returns," Journal of Risk and implementation in PerformanceAnalytics

Risk Budgeting: Tail Risk Value-at-Risk (VaR) cvar α,i VaR VaR = w = w mvar α n n α i i α, i i= 1 wi i= 1 VaRα mvarα, i = = E[ Ri Rp = VaRα ] wi ces α,i Expected Shortfall (ES) n n ES α ES α = wi = wi mes α, i, w i= 1 i i= 1 ES α mes α, i = = E [ Ri Rp VaR α ] w i,

Risk Budgeting: Explicit Formulas Normal distribution See Jorian (2007) or Dowd (2002) Non-normal distribution ib ti using Cornish-Fisher h expansion See Boudt, Peterson and dc Croux (2008) "Estimation i and Decomposition of Downside Risk for Portfolios with Non-Normal Normal Returns, " Journal of Risk and implementation in PerformanceAnalytics Eric 9ivot 2008

Risk Budgeting: Simulation { R } M simulated returns it M = t= 1 Method 1: Brute Force mvar ΔVaR, mes = α α, i α, i Δw i ΔES Δw α i Method 2: Average R it around values for which R pt = VaR α mvar R, mes R α, i it α, i it tr : = VaR ± ε tr : VaR pt α pt α

R Functions for Factor Model Risk Analysis Function factormodelcovariance factormodelriskdecomposition normalvar normalportfoliovar normalmarginalvar normalcomponentvar normalvarreport modifiedvar modifiedportfoliovar modifiedmarginalvar modifiedcomponentvar Function normales normalportfolioes normalmarginales normalcomponentes modifiedes modifiedportfolioes modifiedesreport simulatedmarginalvar simulatedcomponentvar simulatedmarginales simulatedcomponentes

Unequal Histories Risk factors F F F,, F 1, T k, T 1, T T k, T T i,, F,, Fk 1,1,1 i Fund performance R 1,T R1,T T 1 R nt, R nt, Tn Observe full history Observe partial histories Eric Zivot 9008

Example Portfolio: Unequal Histories of Individual Funds X11316 69 X29554 X165939-0.04 0.00 0 0.02 0.04-0.3-0.2-0.1 0.0 0.1-0.08-0.04 0.00 X15614 45-0.06-0.02 0.02 X153684-0.0 08-0.04 0.0000-0.15-0.10 X104314-0.05 0.00 0.05 1998 2000 2002 2004 2006 2008 1998 2000 2002 2004 2006 2008

Implication of Unequal Histories Can t fit factor models to some funds Need to create proxy factor model Statistics ti ti on common histories i (truncated t data) may be unreliable Difficult to compute non-normal tail risk measures

Extract Data from Database Analysis and Reporting Flow Process Excel Spreadsheets xlsreadwrite R: Fit factor models R data files RODBC Excel Spreadsheets RODBC R: Simulation, portfolio calculations, risk analysis Reports

Factor Model Construction Sufficient i history? No Yes Fit factor model : Variable selection: leaps, MASS Collinearity diagnostics: car dynamic regression: dynlm Create proxy factor model from models with sufficient history R data file

Evaluation of Fitted Factor Models Graphical diagnostics Created plot method appropriate for time series regression. Stability analysis CUSUM etc: strucchange Rolling analysis: rollapply (zoo) Time varying parameters: dlm Dynamic effects dynlm, lmtest

Diagnostic Plots: Example Fund p, Mon nthly performanc ce 0.00 0.02-0.08-0.06-0.04-0.02 Actual Fitted 2005 2006 2007 2008 2009 Index Eric Zivot 2008

Time Series Regression Residual diagnostics PACF ACF -0.2 0.0 0.2 0.4 0.6 0.8 1.0-0.2 0.0 0.2 0.4 0 0.6 0.8 1.0 0 10 20 Density 30 40 50 60 5 10 15 Lag -0.04-0.02 0.00 0.02 Returns OLS-based CUSUM test Empirica al Quantiles -0.04-0.02 0.00 0..02 Empirical fluctu uation process -1.0-0.5 0.00 0.5 1.0 1.5-2 -1 0 1 2 norm Quantiles 0.0 0.2 0.4 0.6 0.8 1.0 Time

24-month rolling estimates X14487 75 X144874 (Intercept) -0.1 0.0-0.05 0.05 0.15 0.25-0.004 0.000 0.004 0.0 X144911 0.1 0.2 0.3 X144887-0.05 0.05 0.15 2007 2008 2009 Index 2007 2008 2009 Index -0.4-0.3-0.2

Dealing with Unequal Histories Estimate conditional distribution of R i given F Fitted factor model or proxy factor model Eti Estimate t marginal lditibti distribution of fff Empirical distribution, multivariate normal, copula Derive marginal distribution of R i from p(r i F) and p(f) Simulate R i and Calculate functional of interest Unobserved performance, Sharpe ratio, ETL etc

Simulation Algorithm Draw { F 1,, F } M by resampling from the empirical distribution of F. For each F F u (u =1 1,, M), drawavalue a R iu, from the estimated conditional distribution of R i given F= F F u (e.g., from fitted factor model assuming normal errors) { R } M iu, is the desired d sample for R u = 1 i M 5000

What to do with R? iu, { } M u = 1 Backfill missing fund performance Compute fund and portfolio performance measures Estimate non-parametric fund and portfolio tail risk ikmeasures Compute non-parametric risk budgeting measures Standard errors can be computed using a bootstrap procedure

Example: Backfilled Fund Performance -0.05 0.00 0.05 1998 2000 2002 2004 2006 Index Eric Zivot 2008

Example: Simulated portfolio distribution 10 20 0 1 Density 30 40 50 60 99 % ModVaR 99% VaR -0.08-0.06-0.04-0.02 0.00 0.02 0.04 Returns

S-PLUS and S+FinMetrics vs R Dealing with time series objects in R can be difficult and confusing timeseries, zoo, xts Time series regression in R is incompletely implemented Diagnostic plots, prediction R packages give about 80% functional coverage to S+FinMetrics

Some Thoughts About Using R in a Corporate Environment IT doesn t want to support it Firewalls block R downloads The world runs from an Excel spreadsheet Analysts with some programming experience learn R quickly Not good for the casual user

References Boudt, K., B. Peterson and C. Croux (2008) "Estimation and Decomposition of Downside Risk for Portfolios with Non- Normal Returns," Journal of Risk Dowd, K. (2002), Measuring Market Risk, John Wiley and Sons Goodworth, T. and C. Jones (2007). Factor-based, Nonparametric Risk Measurement Framework for Hedge Funds and Fund-of-Funds, The European Journal of Finance. Hll Hallerback, kj J. (2003). Decomposing Portfolio Value-at-Risk: A General Analysis, The Journal of Risk 5/2. Jorian, P. (2007), Value at Risk, Third Edition, McGraw Hill

References Jiang, Y. (2009). Overcoming Data Challenges in Fund-of- Funds Portfolio Management, PhD Thesis, Department of Statistics, University of Washington. Lo, A. (2007). Hd Hedge Funds: An Analytic Perspective, Princeton. Yamai, a Y. and T. Yoshiba (2002). Comparative at Analyses of Expected Shortfall and Value-at-Risk: Their Estimation Error, Decomposition, and Optimization, Institute for Monetary and Economic Studies, Bank of Japan.