fe670 algorithmic trading strategies -...

22
Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics FE670 Algorithmic Trading Strategies Lecture 3. Factor Models and Their Estimation Steve Yang Stevens Institute of Technology 09/19/2013

Upload: buituyen

Post on 29-Jul-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

FE670 Algorithmic Trading StrategiesLecture 3. Factor Models and Their Estimation

Steve Yang

Stevens Institute of Technology

09/19/2013

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Outline

1 Factor Based Trading

2 Risks to Trading Strategies

3 Desirable Properties of Factors

4 Building Factors from Company Characteristics

5 R Time Series Factor Analysis Package tsfa

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Broadly we can classify investment strategies into thefollowing categories:

1 factor-based trading strategies (also called stock selection oralpha models).

2 statistical arbitrage.3 high-frequency strategies.4 event studies.

* Most academics and practitioners agree that the efficientmarket hypothesis does not hold all the time and that it ispossible to beat the market.

** Industry survey shows factors and factor-based modelsfrom the core of a major part of today’s quantitativetrading strategies.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Security Analysis by Benjamin Graham and David Dodd(1934) was considered the first contribution to factor-basedstrategies. Today’s quantitative managers use factors asfundamental building blocks for trading strategies. Within atrading strategy, factors determine when to buy and when tosell securities.

We define a factor as a common characteristic among a groupof assets. For example, the credit rating on a bond, or aparticular financial ratio (P/E) or the book-to-price ratios, etc.

* We further expand: 1). Factors frequently are intended tocapture some economic intuition. 2). We should recognizethat assets with similar factors tend to behave in similar ways.3). We’d like our factor to be able to differentiate acrossdifferent markets and samples. 4). We want our factor to berobust across different time periods.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Factors fall into three categories – macroeconomic influences,cross-sectional characteristics, and statistical factors.

Macroeconomic influences are time series that measureobservable economic activities. Examples include interest ratelevels, gross domestic production, and industrial production.

Cross-sectional characteristics are observable asset specificsor firm characteristics. Examples include, dividend yield, bookvalue, and volatility.

Statistical factors are unobservable or latent factors commonacross a group of assets. These factors make no explicitassumptions about the asset characteristics that drivecommonality in returns. Statistical factors are not determinedusing exogenous data but are extracted from other variablessuch as returns.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Basic Framework and Building Blocks

We focus on using factors to build forecasting models, alsoreferred to as alpha or stock selection models. We begin bydesigning a framework that is flexible enough so that thecomponents can be easily modified, yet structured enoughthat we remain focused on our end goal of designing aprofitable trading strategy. The typical steps in thedevelopment of a trading strategy are:

Defining a trading idea orinvestment strategyDeveloping factorsAcquiring and processing dataAnalyzing the factors

Building the strategyEvaluating the strategyBacktesting the strategyImplementing the strategy

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Basic Framework and Building Blocks

Defining a Trading Idea or Investing Strategy:A successful trading strategy often starts as an idea based onsound economic intuition, market insight, or the discovery ofan anomaly. Background research can be helpful in order tounderstand what others have tried or implemented in the past.A trading idea has a more short-term horizon often associatedwith an event or mis-pricing. A trading strategy has a longerhorizon and is frequently based on the exploration of apremium associated with an anomaly or a characteristic.

Developing Factors:Factors provide building blocks of the model used to build aninvestment strategy. After having established the tradingstrategy, we move from the economic concepts to theconstruction of factors that may be available to capture ourintuition.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Basic Framework and Building Blocks

Acquiring and Processing Data:

A trading strategy relies on accurate and clean data to buildfactors. There are a number of third-party solutions anddatabases available for this purpose such as Thomson RoutersMarketQA, Factset Research Systems, and Compustats.

Analyzing the Factors:

A variety of statistical and econometric techniques must beperformed on the data to evaluate the empirical properties offactors. This empirical research is used to understand the riskand return potential of a factor. The analysis is the startingpoint for building a model of a trading strategy.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Basic Framework and Building Blocks

Building Strategy:

The model represents a mathematical specification of thetrading strategy. There are two important considerations inthis specification: the selection of which factors and howthese factors are combined. Both considerations need to bemotivated by the economic intuition behind the tradingstrategy.

Evaluating, Backtesting, and Implementing the Strategy:

The final step involves assessing the estimation, specification,and forecasting quality of the model. This analysis includesexamining the goodness of fit (often done in sample),forecasting ability (often done out of sample), and sensitivityand risk characteristics of the model.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Risks to Trading Strategies

In investment management, risk is a primary concern. Themajority of trading strategies are not risk free but rathersubject to various risks. Here we describe some common risksto factor trading strategies as well as other trading strategies.

Fundamental risk is the risk of suffering adverse fundamentalnews. For example, a good company with high earnings toprice ratios may suddenly face a class-action litigation. Wecan minimizing the exposure to fundamental risk bydiversifying across many companies. But sometime,fundamental risk could be systemic. In this case, portfoliomanagers that were sector or market neutral in general maydo well.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Noise risk is the risk that a mispricing may worsen in the shortrun. The idea here is that the premium or value takes toolong to be realized, resulting in a realized lower than atargeted rate of return.

Model risk, also referred to as misspecification risk, refers tothe risk associated with making wrong modeling assumptionsand decisions. This includes the choice of variables,methodology, and context the model operates in. Wereviewed several remedies based on information theory,Bayesian methods, shrinkage, and random coefficient models.

Liquidity risk is a concern for investors. Liquidity is defined asthe ability to trade quickly without significant price changes,and the ability to trade large volume without significant pricechanges. Liquidity could be dried up under a stressed marketcircumstance.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Desirable Properties of Factors

Factors should be founded on sound economic intuition,market insight, or an anomaly. In addition to the underlyingeconomic reasoning, factors should have other properties thatmake them effective for forecasting:

- It is an advantage if factors are intuitive to investors. Manyinvestors will only invest in particular fund if they understandand agree with the basic ideas behind the trading strategies.Factors give portfolio managers a tool in communicating toinvestors what themes they are investing in.

- The search for the economic meaningful factors should avoidstrictly relying on pure historical analysis. Factors used in amodel should not emerge from a sequential process ofevaluating successful factors while removing less favorableones.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

- A group of factors should be parsimonious in its description ofthe trading strategy. This will require careful evaluation of theinteraction between the different factors. For example, highlycorrelated factors will cause the interferences made in amultivariate approach to be less reliable.

- The success of failure of factors selected should not dependon a few outliers. It is desirable to construct factors that arereasonably robust to outliers.

Source of Factors: The sources are widespread with no onedominating clearly. Search through a variety of sources seemsto provide the best opportunity to uncover factors that will bevaluable for new models. Example sources include economicfoundations, inefficiency in processing information, financialreports, discussions with portfolio managers or traders,sell-side reports or equity research reports, and academicliterature in finance, accounting, and economics, etc.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Building Factors from Company Characteristics

- We desire our factors to relate the financial data provided by acompany to metrics that investors use when making decisionsabout the attractiveness of a stock such as valuation ratios,operating efficiency ratios, profitability ratios, and solvencyratios.

- Factors should also relate to the market data such asforecasts, prices and returns, and trading volume. Wedistinguish three categories of financial data: time series,cross-sectional, and panel data.

- Time series data consist of information and variables collectedover multiple time periods. Cross-sectional data consist ofdata collected at one point in time for many differentcompanies. A panel data set consists of cross-sectional datacollected at different points in time.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Data Integrity

Quality data maintain several attributes such as providing aconsistent view of history, maintaining good data availability,containing no survivorship, and avoid look-ahead bias. It isimportant for the quantitative researchers to be able torecognize the limitations and adjust the data accordingly.

- Backfilling of data happens when a company is first enteredinto a database at the current period and its historical data arealso added.

- Restatement of data are prevalent in distorting consistency ofdata. Many database companies may overwrite the numberinitially recorded.

- Survivorship bias occurs when companies are removed from thedatabase when the no longer exists.

- Lookahead bias occurs when data are used in a study thatwould not have been available during the actual periodanalyzed.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Data Integrity Example

This example illustrates how the nuances of data handling caninfluence the results of a particular study. When use datafrom Compustats database to calculate EBITA/EV factors.

Figure : Percentage of Companies in Russell 1000 with Different RankingAccording to the EBITA/EV Factor.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Data Integrity Example

Our universe of stocks is the Russell 1000 from December toDecember 2008, excluding financial companies. We calculateEBITA/EV by two equivalent but different approaches.

1 EBITA = Sales (Compustats data item 2) - Cost of GoodsSold (Compustats data item 30) - Selling and GeneralAdministrative Expense (Compustats item 1)

2 EBITA = Operating Income before Depreciation (Compustatsdata item 21)

* According to Compustats manual these two quantity should beequal. But we observe the results are not identical. As matterthere are large differences, particularly in the earlier period.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

Methods to Adjust Factors

- A factor may need to be adjusted using analytical orstatistical techniques to be more useful for modeling. Thefollowing three adjustment are common:

- Standardization: It rescales a variable while preserving itsorder. Typically, we choose the standardized variable to havea mean of zero and a standard deviation of one by using thetransformation

xnewi =xi − x̄iσx

- Orthogonalization: Orthogonalizing a factor for otherspecified factor(s) removes this relationship. To orthogonalizethe factor using averages according to industries or sectors, wecan first calculate industry scores

sk =

∑ni=1 xi · indi ,k∑n

i=1 indi ,k

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

where xi is a factor and indi ,k represent the weight of stock iin industry k . Next we subtract the industry average of theindustry scores, sk , from each stock. We compute

xnewi = xi −∑

k∈Industries

indi ,k · sk

where xnewi is the new industry neutral factor.

We can also use linear regression to orthogonalize a factor.We first determine the coefficients in the equation

xi = a + b · fi + εi

where fi is the factor to orthogonalize the factor xi by, b is thecontribution of fi to xi , and εi is the component of the factorxi not related to fi · εi is orthogonal to fi (that is, εi isindependent of fi ) and represents the neutralized factorxnew = εi

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

In the same fashion, we can orthogonalize our variable relativeto a set of factors by using the multivariate linear regression

xi = a +∑j

bj · fj + εi

and then setting xnewj = εi .

The interaction between factors in a risk model and an alphamodel often concerns portfolio managers. One possibleapproach to address this concern is to orthogonalize thefactors or final scores from the alpha model against thefactors used in the risk model.

- Transformation: It is a common practice to applytransformations to data used in statistical and econometricmodels. In particular, factors are often transformed such thatthe resulting series is symmetric or close to being normallydistributed. Frequently used transformations include naturallogarithms, exponentials, and square roots.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

- Outliers Detection and Management: Outliers areobservations that seem to be inconsistent with the othervalues in a data set. Financial data contain outliers for anumber of reasons including data errors, measurement errors,or unusual events.

Outliers can be detected by several methods. Graphs such asboxplots, scatter plots, or histograms can be useful to visuallyidentify them. Alternatively there are number of numericaltechniques available. One common method is to compute theinter-quantile-range and then identify outliers as a measure ofdispersion and is calculated as the difference between thethird and first quartiles of a sample.Winsorization is the process of transforming extreme values inthe data. First, we calculate percentiles of the data. Next wedefine outliers by referencing a certain percentile ranking. It isimportant to fully investigate the practical consequences ofusing either one of these procedures.

Factor Based Trading Risks to Trading Strategies Desirable Properties of Factors Building Factors from Company Characteristics R Time Series Factor Analysis Package tsfa

- This example illustrates the steps for estimating a factormodel using as an example the data and process which led toresults reported in Gilbert and Meijer (2006). The backgroundtheory is reported in Gilbert and Meijer (2005)

Figure : Data Explained by a 4 Factor Model