diff --git a/ExerciseSet1_AdwoaBanful.Rmd b/ExerciseSet1_AdwoaBanful.Rmd new file mode 100644 index 00000000..58a4c658 --- /dev/null +++ b/ExerciseSet1_AdwoaBanful.Rmd @@ -0,0 +1,251 @@ + +--- +title: "Exercise Set 1" +author: "T. Evgeniou" +output: html_document +--- + + +
+ +The purpose of this exercise is to become familiar with: + +1. Basic statistics functions in R; +2. Simple matrix operations; +3. Simple data manipulations; +4. The idea of functions as well as some useful customized functions provided. + +While doing this exercise we will also see how to generate replicable and customizable reports. For this purpose the exercise uses the R Markdown capabilities (see [Markdown Cheat Sheet](https://www.rstudio.com/wp-content/uploads/2015/02/rmarkdown-cheatsheet.pdf) or a [basic introduction to R Markdown](http://rmarkdown.rstudio.com/authoring_basics.html)). These capabilities allow us to create dynamic reports. For example today's date is `r Sys.Date()` (you need to see the .Rmd to understand that this is *not* a static typed-in date but it changes every time you compile the .Rmd - if the date changed of course). + +Before starting, make sure you have pulled the [exercise files](https://github.com/InseadDataAnalytics/INSEADAnalytics/tree/master/Exercises/Exerciseset1) on your github repository (if you pull the course github repository you also get the exercise set files automatically). Moreover, make sure you are in the directory of this exercise. Directory paths may be complicated, and sometimes a frustrating source of problems, so it is recommended that you use these R commands to find out your current working directory and, if needed, set it where you have the main files for the specific exercise/project (there are other ways, but for now just be aware of this path issue). For example, assuming we are now in the "MYDIRECTORY/INSEADAnalytics" directory, we can do these: + +```{r echo=TRUE, eval=FALSE, tidy=TRUE} +#getwd() + +#setwd("Exercises/Exerciseset1/") + +#list.files() +``` + +**Note:** you can always use the `help` command in Rstudio to find out about any R function (e.g. type `help(list.files)` to learn what the R function `list.files` does). + +Let's now see the exercise. + +**IMPORTANT:** You should answer all questions by simply adding your code/answers in this document through editing the file ExerciseSet1.Rmd and then clicking on the "Knit HTML" button in RStudio. Once done, please post your .Rmd and html files in your github repository. + +
+
+ +### Exercise Data + +We download daily prices (open, high, low, close, and adjusted close) and volume data of publicly traded companies and markets from the web (e.g. Yahoo! or Google, etc). This is done by sourcing the file data.R as well as some helper functions in herpersSet1.R which also installs a number of R libraries (hence the first time you run this code you will see a lot of red color text indicating the *download* and *installation* process): + +```{r eval = TRUE, echo=TRUE, error = FALSE, warning=FALSE,message=FALSE,results='asis'} +source("helpersSet1.R") +source("dataSet1.R") +``` + +For more information on downloading finance data from the internet as well as on finance related R tools see these starting points (there is a lot more of course available): + +* [Some finance data loading tools](http://www.r-bloggers.com/r-code-yahoo-finance-data-loading/) +* [Connecting directly to Bloomberg](http://www.r-bloggers.com/rblpapi-connecting-r-to-bloomberg/) +* [Some time series plot tools](http://www.r-bloggers.com/plotting-time-series-in-r-using-yahoo-finance-data/) +* [Various finance code links](https://cran.r-project.org/web/views/Finance.html) +* [More links](http://blog.revolutionanalytics.com/2013/12/quantitative-finance-applications-in-r.html) +* [Even more links](http://www.r-bloggers.com/financial-data-accessible-from-r-part-iv/) +* Of course endless available code (e.g. like this one that seems to [get companies' earnings calendars](https://github.com/gsee/qmao/blob/master/R/getCalendar.R)) + +#### Optional Question + +1. Can you find some interesting finance related R package or github repository? +**Your Answers here:** +
+
+ +
+
+ +### Part I: Statistics of S&P Daily Returns + +We have `r nrow(StockReturns)` days of data, starting from `r rownames(StockReturns)[1]` until `r tail(rownames(StockReturns),1)`. Here are some basic statistics about the S&P returns: + +1. The cumulative returns of the S&P index during this period is `r round(100*sum(StockReturns[,1]),1)`%. +2. The average daily returns of the S&P index during this period is `r round(100*mean(StockReturns[,1]),3)`%; +2. The standard deviation of the daily returns of the S&P index during this period is `r round(100*sd(StockReturns[,1]),3)`%; + +Here are returns of the S&P in this period (note the use of the helper function pnl_plot - defined in file helpersSet1.R): + +```{r echo=FALSE, comment=NA, warning=FALSE, message=FALSE,results='asis',fig.align='center', fig.height=4,fig.width= 6, fig=TRUE} +SPY = StockReturns[,"SPY"] +pnl_plot(SPY) +``` + +#### Questions + +1. Notice that the code also downloads the returns of Apple during the same period. Can you explain where this is done in the code (including the .R files used)? +2. What are the cumulative, average daily returns, and the standard deviation of the daily returns of Apple in the same period? +3. *(Extra points)* What if we want to also see the returns of another company, say Yahoo!, in the same period? Can you get that data and report the statistics for Yahoo!'s stock, too? + +**Your Answers here:** +
+*Question 1*: +Code downloads code of Apple in the line mytickers = c("SPY", "AAPL") in file dataSet1.R + +
+*Question 2*: +```{r echo=FALSE, comment=NA, warning=FALSE, message=FALSE,results='asis',fig.align='center', fig.height=4,fig.width= 6, fig=TRUE} +AAPL = StockReturns[,"AAPL"] +pnl_plot(AAPL) +``` +
+*Question 3*: +This would be the same as above for Apple, but with `c(Yahoo (YHOO)` instead. This would require the `dataSet1.R` file to also be updated. However, since the source file doesn't have the Yahoo data, running it produces an error. +
+ +
+
+ +### Part II: Simple Matrix Manipulations + +For this part of the exercise we will do some basic manipulations of the data. First note that the data are in a so-called matrix format. If you run these commands in RStudio (use help to find out what they do) you will see how matrices work: + +```{r eval = FALSE, echo=TRUE} +class(StockReturns) +dim(StockReturns) +nrow(StockReturns) +ncol(StockReturns) +StockReturns[1:4,] +head(StockReturns,5) +tail(StockReturns,5) +``` + +We will now use an R function for matrices that is extremely useful for analyzing data. It is called *apply*. Check it out using help in R. + +For example, we can now quickly estimate the average returns of S&P and Apple (of course this can be done manually, too, but what if we had 500 stocks - e.g. a matrix with 500 columns?) and plot the returns of that 50-50 on S&P and Apple portfolio: + +```{r echo=FALSE, comment=NA, warning=FALSE, message=FALSE,results='asis',fig.align='center', fig=TRUE} +portfolio = apply(StockReturns,1,mean) +names(portfolio) <- rownames(StockReturns) +pnl_plot(portfolio) +``` + + +We can also transpose the matrix of returns to create a new "horizontal" matrix. Let's call this matrix (variable name) transposedData. We can do so using this command: `transposedData = t(StockReturns)`. + +#### Questions + +1. What R commands can you use to get the number of rows and number of columns of the new matrix called transposedData? +2. Based on the help for the R function *apply* (`help(apply)`), can you create again the portfolio of S&P and Apple and plot the returns in a new figure below? + +**Your Answers here:** +
+*Question 1*: +nrow(transposedData) will give the number of rows +ncol(transposedData) will give the number of columns +
+*Question 2*: +The return of the portfolio reflects the mean of the returns of each product. So we use 'apply' to take the mean of the new transposed matrix `apply(transposedData,2,mean)` and call it tplot. To graph it, the code will be as follows +```{r echo=FALSE, comment=NA, warning=FALSE, message=FALSE,results='asis',fig.align='center', fig=TRUE} +transposedData = t(StockReturns) +tplot = apply(transposedData,2,mean) +names(tplot) <- rownames(StockReturns) +pnl_plot(tplot) +``` +
+
+ +
+
+ +### Part III: Reproducibility and Customization + +This is an important step and will get you to think about the overall process once again. + +#### Questions + +1. We want to re-do all this analysis with data since 2001-01-01: what change do we need to make in the code (hint: all you need to change is one line - exactly 1 number! - in data.R file), and how can you get the new exercise set with the data since 2001-01-01? +2. *(Extra Exercise)* Can you get the returns of a few companies and plot the returns of an equal weighted portfolio with those companies during some period you select? + +**Your Answers here:** +
+*Question 1*: +Since the `dataSet1.R` file is already set to pull data from that date, nothing will change. If it had been 2003, for example, you would change the 2003 to 2001, and run that file again. +
+
+
+ +
+
+ +### Part IV: Read/Write .CSV files + +Finally, one can read and write data in .CSV files. For example, we can save the first 20 days of data for S&P and Apple in a file using the command: + +```{r eval = TRUE, echo=TRUE, comment=NA, warning=FALSE, message=FALSE,results='asis'} +write.csv(StockReturns[1:20,c("SPY","AAPL")], file = "twentydays.csv", row.names = TRUE, col.names = TRUE) +``` + +Do not get surpsised if you see the csv file in your directories suddenly! You can then read the data from the csv file using the read.csv command. For example, this will load the data from the csv file and save it in a new variable that now is called "myData": + +```{r eval = TRUE, echo=TRUE, comment=NA, warning=FALSE, message=FALSE,results='asis'} +myData <- read.csv(file = "twentydays.csv", header = TRUE, sep=";") +``` + +Try it! + +#### Questions + +1. Once you write and read the data as described above, what happens when you run this command in the console of the RStudio: `sum(myData != StockReturns[1:20,])` +2. *(Extra exercise)* What do you think will happen if you now run this command, and why: + +```{r eval = FALSE, echo=TRUE} +myData + StockReturns[1:40,] +``` + +**Your Answers here:** +
+*Question 1*: +The function returns [1] 20, which is the sum of the number of items in myData that are not in 1st 20 stock returns in the original matrix. +
+
+
+ +
+
+ +### Extra Question + +Can you now load another dataset from some CSV file and report some basic statistics about that data? + +
+ +### Creating Interactive Documents + +Finally, just for fun, one can add some interactivity in the report using [Shiny](http://rmarkdown.rstudio.com/authoring_shiny.html).All one needs to do is set the eval flag of the code chunk below (see the .Rmd file) to "TRUE", add the line "runtime: shiny" at the very begining of the .Rmd file, make the markdown output to be "html_document", and then press "Run Document". + +```{r, eval=FALSE, echo = TRUE} +sliderInput("startdate", "Starting Date:", min = 1, max = length(portfolio), + value = 1) +sliderInput("enddate", "End Date:", min = 1, max = length(portfolio), + value = length(portfolio)) + +renderPlot({ + pnl_plot(portfolio[input$startdate:input$enddate]) +}) +``` + +
+ +
+
+ +### Endless explorations (optional homework) + +This is a [recent research article](http://poseidon01.ssrn.com/delivery.php?ID=851091091009083082092113118102076099034023058067019062072066007100008111081022102123034016097101060099003106125099002090116089026058012038004030005113111105079028059062024121067073126072090091089069014121102110107075029090001011087028011082124103085&EXT=pdf) that won an award in 2016. Can you implement a simple strategy as in Figure 1 of this paper? You may find these R commands useful: `names`, `which`, `str_sub`,`diff`,`as.vector`, `length`, `pmin`, `pmax`, `sapply`, `lapply`,`Reduce`,`unique`, `as.numeric`, `%in%` +![A Simple Trading Startegy](simpletrade.png) + +What if you also include information about bonds? (e.g. download the returns of the the ETF with ticker "TLT") Is there any relation between stocks and bonds? + + +**Have fun** + diff --git a/Exercises/Exerciseset2/Exercise Set 2_AdwoaBanful.Rmd b/Exercises/Exerciseset2/Exercise Set 2_AdwoaBanful.Rmd new file mode 100644 index 00000000..3c0dd87a --- /dev/null +++ b/Exercises/Exerciseset2/Exercise Set 2_AdwoaBanful.Rmd @@ -0,0 +1,344 @@ +--- +title: 'Exercise Set 2: A $300 Billion Strategy' +author: "T. Evgeniou" +output: + html_document: + css: ../../AnalyticsStyles/default.css + theme: paper + toc: yes + toc_float: + collapsed: no + smooth_scroll: yes + pdf_document: + includes: + in_header: ../../AnalyticsStyles/default.sty +always_allow_html: yes +--- + +> **IMPORTANT**: Please make sure you create a copy of this file with a customized name, so that your work (e.g. answers to the questions) is not over-written when you pull the latest content from the course github. + +```{r setuplibraries, echo=FALSE, message=FALSE} +suppressWarnings(source("../../AnalyticsLibraries/library.R")) +# Package options +suppressWarnings(ggthemr('fresh')) # ggplot theme +opts_knit$set(progress=FALSE, verbose=FALSE) +opts_chunk$set(echo=FALSE, fig.align="center", fig.width=10, fig.height=6.35, results="asis") +options(knitr.kable.NA = '') + +iplot.pnl <- function(x) { + df <- data.frame(Date=as.Date(names(x)), value=cumsum(x)*100) + p <- iplot.df(df, x="Date", y="value", v=NULL, ylab="Cumulative Return") + if (getDocumentOutputFormat() == "html") + p <- p %>% xAxis(type="timeseries", tick=list(format="%d/%m/%Y", count=10), label="Date") %>% legend() + p +} +``` + +The purpose of this exercise is to become familiar with: + +1. Some time series analysis tools; +2. Correlation matrices and principal component analysis (PCA) (see [readings of sessions 3-4](http://inseaddataanalytics.github.io/INSEADAnalytics/CourseSessions/Sessions23/FactorAnalysisReading.html)); +3. More data manipulation and reporting tools (including Google Charts). + +As always, while doing this exercise we will also see how to generate replicable and customizable reports. For this purpose the exercise uses the R Markdown capabilities (see [Markdown Cheat Sheet](https://www.rstudio.com/wp-content/uploads/2015/02/rmarkdown-cheatsheet.pdf) or a [basic introduction to R Markdown](http://rmarkdown.rstudio.com/authoring_basics.html)). These capabilities allow us to create dynamic reports. For example today's date is `r Sys.Date()` (you need to see the .Rmd to understand that this is *not* a static typed-in date but it changes every time you compile the .Rmd - if the date changed of course). + +Before starting, make sure you have pulled the [exercise set 2 souce code files](https://github.com/InseadDataAnalytics/INSEADAnalytics/tree/master/Exercises/Exerciseset2) on your github repository (if you pull the course github repository you also get the exercise set files automatically). Moreover, make sure you are in the directory of this exercise. Directory paths may be complicated, and sometimes a frustrating source of problems, so it is recommended that you use these R commands to find out your current working directory and, if needed, set it where you have the main files for the specific exercise/project (there are other ways, but for now just be aware of this path issue). For example, assuming we are now in the "Data Analytics R version/INSEADAnalytics" directory, we can do these: + +```{r echo=TRUE, eval=FALSE, tidy=TRUE} +getwd() +setwd("Exercises/Exerciseset2/") +list.files() +``` + +**Note:** as always, you can use the `help` command in Rstudio to find out about any R function (e.g. type `help(list.files)` to learn what the R function `list.files` does). + +Let's now see the exercise. + +**IMPORTANT:** You should answer all questions by simply adding your code/answers in this document through editing the file ExerciseSet2.Rmd and then clicking on the "Knit HTML" button in RStudio. Once done, please post your .Rmd and html files in your github repository. + +# The Exercise: Introduction + +For this exercise we will use the Futures' daily returns to develop what is considered to be a *"classic" hedge fund trading strategy*, a **futures trend following strategy**. There is a lot written about this, so it is worth doing some online search about "futures trend following", or "Managed Futures", or "Commodity Trading Advisors (CTA)". There is about **[$300 billion](http://www.barclayhedge.com/research/indices/cta/Money_Under_Management.html)** invested on this strategy today, and is considered to be one of the **oldest hedge fund strategies**. Some example links are: + +* [A fascinating report on 2 centuries of trend following from the CFM hedge - a $6 billion fund](https://www.trendfollowing.com/whitepaper/Two_Centuries_Trend_Following.pdf) +* [Another fascinating report on 1 century of trend following investing from AQR - a $130 billion fund](https://www.aqr.com/library/aqr-publications/a-century-of-evidence-on-trend-following-investing) +* [Wikipedia on CTAs](https://en.wikipedia.org/wiki/Commodity_trading_advisor) +* [Morningstar on CTAs](http://www.morningstar.co.uk/uk/news/69379/commodity-trading-advisors-(cta)-explained.aspx) +* [A report](http://perspectives.pictet.com/wp-content/uploads/2011/01/Trading-Strategies-Final.pdf) +* [Man AHL (a leading hedge fund on CTAs - among others) - an $80 billion fund](https://www.ahl.com) + +Of course there are also many starting points for developing such a strategy (for example [this R bloggers one](http://www.r-bloggers.com/system-from-trend-following-factors/) (also on [github](https://gist.github.com/timelyportfolio/2855303)), or the [turtle traders website](http://turtletrader.com) which has many resources. + +In this exercise we will develop our own strategy from scratch. + +*Note (given today's market conditions):* **Prices of commodities, like oil or gold, can be excellent indicators of the health of the economy and of various industries, as we will also see below**. + +# Getting the Futures Data + +There are many ways to get futures data. For example, one can use the [Quandl package,](https://www.quandl.com/browse) or the [turtle traders resources,](http://turtletrader.com/hpd/) or (for INSEAD only) get data from the [INSEAD library finance data resources](http://sites.insead.edu/library/E_resources/ER_subject.cfm#Stockmarket) website. One has to pay attention on how to create continuous time series from underlying contracts with varying deliveries (e.g. see [here](https://www.quantstart.com/articles/Continuous-Futures-Contracts-for-Backtesting-Purposes) ). Using a combination of the resources above, we will use data for a number of commodities. + + +# Data description + +Let's load the data and see what we have. + +```{r echo=TRUE} +suppressPackageStartupMessages(source("helpersSet2.R")) +load("data/FuturesTrendFollowingData.Rdata") +``` + +We have data from `r head(rownames(futures_data),1)` to `r tail(rownames(futures_data),1)` of daily returns for the following `r ncol(futures_data)` futures: + +```{r echo=TRUE, results='markup'} +print(colnames(futures_data)) +``` + +# Basic data analysis + +Let's see how these are correlated. The correlation matrix is as follows: + +```{r} +show_data = round(cor(futures_data),2) +iprint.df(show_data, scale=TRUE) +``` + +We see quite high correlations among some of the futures. Does it make sense? Why? Do you see some negative correlations? Do those make sense? + +Given such high correlations, we can try to see whether there are some "principal components" (see [reading on dimensionality reduction](http://inseaddataanalytics.github.io/INSEADAnalytics/CourseSessions/Sessions23/FactorAnalysisReading.html)). This analysis can also indicate whether all futures (the global economy!) are driven by some common "factors" (let's call them **"risk factors"**). + +```{r echo=TRUE} +Variance_Explained_Table_results<-PCA(futures_data, graph=FALSE) +Variance_Explained_Table<-Variance_Explained_Table_results$eig +colnames(Variance_Explained_Table)<-c("Eigenvalue", + "Pct of explained variance", "Cumulative pct of explained variance") +``` + +```{r} +show_data = round(Variance_Explained_Table, 2) +iprint.df(show_data) +``` + +Here is the scree plot (see Sessions 3-4 readings): + +```{r echo=TRUE} +eigenvalues <- Variance_Explained_Table[, "Eigenvalue"] +``` + +```{r} +df <- cbind(as.data.frame(eigenvalues), c(1:length(eigenvalues)), rep(1, length(eigenvalues))) +colnames(df) <- c("eigenvalues", "components", "abline") +iplot.df(melt(df, id="components")) +``` + +Let's now see how the 20 first (**rotated**) principal components look like. Let's also use the *rotated* factors (note that these are not really the "principal component", as explained in the [reading on dimensionality reduction](http://inseaddataanalytics.github.io/INSEADAnalytics/CourseSessions/Sessions23/FactorAnalysisReading.html)) and not show any numbers less than 0.3 in absolute value, to avoid cluttering. + +```{r echo=TRUE, tidy=TRUE} +corused = cor(futures_data[,apply(futures_data!=0,2,sum) > 10, drop=F]) +Rotated_Results<-principal(corused, nfactors=20, rotate="varimax",score=TRUE) +Rotated_Factors<-round(Rotated_Results$loadings,2) +Rotated_Factors<-as.data.frame(unclass(Rotated_Factors)) +colnames(Rotated_Factors)<-paste("comp",1:ncol(Rotated_Factors),sep=" ") + +sorted_rows <- sort(Rotated_Factors[,1], decreasing = TRUE, index.return = TRUE)$ix +Rotated_Factors <- Rotated_Factors[sorted_rows,] +Rotated_Factors[abs(Rotated_Factors) < 0.3]<-NA +``` + +```{r} +show_data <- Rotated_Factors +iprint.df(show_data, scale=TRUE) +``` + +**Questions** + +1. How many principal components ("factors") do we need to explain at least 50% of the variance in this data? +2. What are the highest weights (in absolute value) of the first principal component portfolio above on the `r ncol(futures_data)` futures? +3. Can we interpret the first 10 components? How would you call these factors? +4. Can you now generate the principal components and scree plot using only: a) the pre-crisis bull market years (e.g. only using the data between November 1, 2002, and October 1, 2007)? b) the financial crisis years (e.g. only using the data between October 1, 2007 and March 1, 2009), (Hint: you can select subsets of the data using for example the command `crisis_data` `=` `futures_data[` `as.Date(rownames(futures_data))` `>` `"2007-10-01"` `&` `as.Date(rownames(futures_data))` `<` `"2009-03-01"` `,` `]`) +5. Based on your analysis in question 3, please discuss any differences you observe about the futures returns during bull and bear markets. What implications may these results have? What do the results imply about how assets are correlated during bear years compared to bull years? + +**Answers** + +* 6 factors are required to explain about 53% of the variance. +* 5-yr and 10-yr Treasury notes, which both have a weight of 93% +* The first 10 components derive sets of factors with common characteristics that can predict or explain the health of the economy. For example, Component 1 uses government bonds, Component 2 uses currency prices, Components 3&4 use stock indices, Component 8 uses commodities. +* a) For the bull market years +```{r} +crisis_data = futures_data[ as.Date(rownames(futures_data)) > "2002-11-01" & as.Date(rownames(futures_data)) < "2007-10-01" , ] +Variance_Explained_Table_results<-PCA(crisis_data, graph=FALSE) +Variance_Explained_Table<-Variance_Explained_Table_results$eig +colnames(Variance_Explained_Table)<-c("Eigenvalue", "Pct of explained variance", "Cumulative pct of explained variance") +``` + +```{r} +show_data = round(Variance_Explained_Table, 2) +iprint.df(show_data) +``` + +this generates a scree plot as follows +```{r echo=TRUE} +eigenvalues <- Variance_Explained_Table[, "Eigenvalue"] +``` + +```{r} +df <- cbind(as.data.frame(eigenvalues), c(1:length(eigenvalues)), rep(1, length(eigenvalues))) +colnames(df) <- c("eigenvalues", "components", "abline") +iplot.df(melt(df, id="components")) +``` + +b) for the bear years, +```{r} +crisis_data = futures_data[ as.Date(rownames(futures_data)) > "2007-10-01" & as.Date(rownames(futures_data)) < "2009-03-01" , ] +Variance_Explained_Table_results<-PCA(crisis_data, graph=FALSE) +Variance_Explained_Table<-Variance_Explained_Table_results$eig +colnames(Variance_Explained_Table)<-c("Eigenvalue", "Pct of explained variance", "Cumulative pct of explained variance") +``` + +```{r} +show_data = round(Variance_Explained_Table, 2) +iprint.df(show_data) +``` + +this generates a scree plot as follows +```{r echo=TRUE} +eigenvalues <- Variance_Explained_Table[, "Eigenvalue"] +``` + +```{r} +df <- cbind(as.data.frame(eigenvalues), c(1:length(eigenvalues)), rep(1, length(eigenvalues))) +colnames(df) <- c("eigenvalues", "components", "abline") +iplot.df(melt(df, id="components")) +``` + +* Based on the analysis above, it would appear that bear markets feature fewer futures that trade succesfully, whereas in bull markets, more futures/industries flourish. This is inferred from the number of components required to explain at least 50% of variance. In bear markets, 4 components explain at least 50% of variance, whilst in bull markets, 6 components are required. This suggests that in bull markets, certain sectors lose their significant correlation with the results, since they are not doing well. +* +* +* +* +* + +# A Simple Futures Trend Following Strategy + +We can now develop a simple futures trend following trading strategy, as outlined in the papers in the Exercise Introduction above. There are about $300 billion invested in such strategies! Of course we cannot develop here a sophisticated product, but with some more work... + +We will do the following: + +1. Calculate a number of moving averages of different "window lengths" for each of the `r ncol(futures_data)` futures - there are [many](http://www.r-bloggers.com/stock-analysis-using-r/) so called [technical indicators](http://www.investopedia.com/active-trading/technical-indicators/) one can use. We will use the "moving average" function `ma` for this (try for example to see what this returns `ma(1:10,2)` ). +2. Add the signs (can also use the actual moving average values of course - try it!) of these moving averages (as if they "vote"), and then scale this sum across all futures so that the sum of their (of the sum across all futures!) absolute value across all futures is 1 (hence we invest $1 every day - you see why?). +3. Then invest every day in each of the `r ncol(futures_data)` an amount that is defined by the weights calculated in step 2, using however the weights calculated using data until 2 days ago (why 2 days and not 1 day?) - see the use of the helper function `shift` for this. +4. Finally see the performance of this strategy. + +Here is the code: + +```{r echo=TRUE, tidy=TRUE} +signal_used = 0*futures_data # just initialize the trading signal to be 0 +# Take many moving Average (MA) Signals and let them "vote" with their sign (+-1, e.g. long or short vote, for each signal) +MAfreq<-seq(10,250,by=20) +for (iter in 1:length(MAfreq)) + signal_used = signal_used + sign(apply(futures_data,2, function(r) ma(r,MAfreq[iter]))) +# Now make sure we invest $1 every day (so the sum of the absolute values of the weights is 1 every day) +signal_used = t(apply(signal_used,1,function(r) { + res = r + if ( sum(abs(r)) !=0 ) + res = r/sum(abs(r)) + res +})) +colnames(signal_used) <- colnames(futures_data) +# Now create the returns of the strategy for each futures time series +strategy_by_future <- scrub(shift(signal_used,2)*futures_data) # signal 2 days ago +# finally, this is our futures trend following strategy +trading_strategy = apply(strategy_by_future,1,sum) +names(trading_strategy) <- rownames(futures_data) +``` + +# Reporting the performance results + +Let's see how this strategy does: + +```{r} +iplot.pnl(trading_strategy) +``` + +Here is how this strategy has performed during this period: + +```{r} +show_data = round(pnl_matrix(trading_strategy),2) +iprint.df(show_data) +``` + +How does this compare with **existing CTA products** such as [this one from Societe Generale?](https://cib.societegenerale.com/fileadmin/indices_feeds/SG_CTA_Monthly_Report.pdf) (Note: one can easily achieve a correlation of more than 0.8 with this specific product - as well as with many other ones) + +![Compare our strategy with this product](societegenerale.png) + +**Questions** + +1. Can you describe in more detail what the code above does? +2. What happens if you use different moving average technical indicators in the code above? Please explore and report below the returns of a trading strategy you build. (Hint: check that the command line `MAfreq<-seq(10,250,by=20)` above does for example - but not only of course, the possibilities are endless) + +**Answers** + +*1. the code looks at futures returns over the specified window, and determines whether and how much of a future to short or long, based on the moving average return it has generated (positive or negative) over the window. It's output is the trading strategy for each month, and results in the return plot that we see above. Compared to the SG strategy, it appears quite similar. +*2. For example, if the moving average is done by 30s, and not 20s, the results become +```{r} +signal_used = 0*futures_data # just initialize the trading signal to be 0 +# Take many moving Average (MA) Signals and let them "vote" with their sign (+-1, e.g. long or short vote, for each signal) +MAfreq<-seq(10,250,by=30) +for (iter in 1:length(MAfreq)) + signal_used = signal_used + sign(apply(futures_data,2, function(r) ma(r,MAfreq[iter]))) +# Now make sure we invest $1 every day (so the sum of the absolute values of the weights is 1 every day) +signal_used = t(apply(signal_used,1,function(r) { + res = r + if ( sum(abs(r)) !=0 ) + res = r/sum(abs(r)) + res +})) +colnames(signal_used) <- colnames(futures_data) +# Now create the returns of the strategy for each futures time series +strategy_by_future <- scrub(shift(signal_used,2)*futures_data) # signal 2 days ago +# finally, this is our futures trend following strategy +trading_strategy = apply(strategy_by_future,1,sum) +names(trading_strategy) <- rownames(futures_data) +``` + +```{r} +iplot.pnl(trading_strategy) +``` + +```{r} +show_data = round(pnl_matrix(trading_strategy),2) +iprint.df(show_data) +``` + +The results appear quite similar to the previous strategy, but with different magnitudes of return + +* +* +* +* +* +* + +# A class competition + +Now you have seen how to develop some trading strategies that hedge funds have been using for centuries. Clearly this is only the very first step - as many of the online resources on technical indicators also suggest. Can you now explore more such strategies? How good a **futures trend following hedge fund strategy** can you develop? Let's call this.... a **class competition**! Explore as much as you can and report your best strategy as we move along the course... + +Here is for example something that can be achieved relatively easily... + +```{r} +load("data/sample_strategy.Rdata") +iplot.pnl(sample_strategy) +``` + +Here is how this strategy has performed during this period: + +```{r} +show_data = round(pnl_matrix(sample_strategy),2) +iprint.df(show_data) +``` + +As always, **have fun** + + + + + diff --git a/Exercises/Exerciseset2/Exercise_Set_2_AdwoaBanful.html b/Exercises/Exerciseset2/Exercise_Set_2_AdwoaBanful.html new file mode 100644 index 00000000..a7c723bc --- /dev/null +++ b/Exercises/Exerciseset2/Exercise_Set_2_AdwoaBanful.html @@ -0,0 +1,8304 @@ + + + + + + + + + + + + + + +Exercise Set 2: A $300 Billion Strategy + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + +
+
+
+
+
+ +
+ + + + + + + +
+

IMPORTANT: Please make sure you create a copy of this file with a customized name, so that your work (e.g. answers to the questions) is not over-written when you pull the latest content from the course github.

+
+

The purpose of this exercise is to become familiar with:

+
    +
  1. Some time series analysis tools;
  2. +
  3. Correlation matrices and principal component analysis (PCA) (see readings of sessions 3-4);
  4. +
  5. More data manipulation and reporting tools (including Google Charts).
  6. +
+

As always, while doing this exercise we will also see how to generate replicable and customizable reports. For this purpose the exercise uses the R Markdown capabilities (see Markdown Cheat Sheet or a basic introduction to R Markdown). These capabilities allow us to create dynamic reports. For example today’s date is 2017-01-27 (you need to see the .Rmd to understand that this is not a static typed-in date but it changes every time you compile the .Rmd - if the date changed of course).

+

Before starting, make sure you have pulled the exercise set 2 souce code files on your github repository (if you pull the course github repository you also get the exercise set files automatically). Moreover, make sure you are in the directory of this exercise. Directory paths may be complicated, and sometimes a frustrating source of problems, so it is recommended that you use these R commands to find out your current working directory and, if needed, set it where you have the main files for the specific exercise/project (there are other ways, but for now just be aware of this path issue). For example, assuming we are now in the “Data Analytics R version/INSEADAnalytics” directory, we can do these:

+
getwd()
+setwd("Exercises/Exerciseset2/")
+list.files()
+

Note: as always, you can use the help command in Rstudio to find out about any R function (e.g. type help(list.files) to learn what the R function list.files does).

+

Let’s now see the exercise.

+

IMPORTANT: You should answer all questions by simply adding your code/answers in this document through editing the file ExerciseSet2.Rmd and then clicking on the “Knit HTML” button in RStudio. Once done, please post your .Rmd and html files in your github repository.

+
+

The Exercise: Introduction

+

For this exercise we will use the Futures’ daily returns to develop what is considered to be a “classic” hedge fund trading strategy, a futures trend following strategy. There is a lot written about this, so it is worth doing some online search about “futures trend following”, or “Managed Futures”, or “Commodity Trading Advisors (CTA)”. There is about $300 billion invested on this strategy today, and is considered to be one of the oldest hedge fund strategies. Some example links are:

+ +

Of course there are also many starting points for developing such a strategy (for example this R bloggers one (also on github), or the turtle traders website which has many resources.

+

In this exercise we will develop our own strategy from scratch.

+

Note (given today’s market conditions): Prices of commodities, like oil or gold, can be excellent indicators of the health of the economy and of various industries, as we will also see below.

+
+
+

Getting the Futures Data

+

There are many ways to get futures data. For example, one can use the Quandl package, or the turtle traders resources, or (for INSEAD only) get data from the INSEAD library finance data resources website. One has to pay attention on how to create continuous time series from underlying contracts with varying deliveries (e.g. see here ). Using a combination of the resources above, we will use data for a number of commodities.

+
+
+

Data description

+

Let’s load the data and see what we have.

+
suppressPackageStartupMessages(source("helpersSet2.R"))
+
## Warning in doTryCatch(return(expr), name, parentenv, handler): unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
+##   dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded: /opt/X11/lib/libSM.6.dylib
+##   Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
+##   Reason: image not found
+
load("data/FuturesTrendFollowingData.Rdata")
+

We have data from 2001-01-02 to 2015-09-24 of daily returns for the following 64 futures:

+
print(colnames(futures_data))
+
##  [1] "Corn"               "Wheat"              "Soybeans"          
+##  [4] "Soybean Oil"        "Soybean Meal"       "Lean Hoggs"        
+##  [7] "Sugar"              "Coffee"             "Cocoa"             
+## [10] "Cotton"             "Canola"             "Orange Juice"      
+## [13] "Lumber"             "Natural Gas"        "Crude Oil"         
+## [16] "Brent Crude"        "Heating Oil"        "Kerosene"          
+## [19] "Gas Oil"            "Gasoline"           "Copper NY"         
+## [22] "Copper LDN"         "Silver"             "Gold"              
+## [25] "Platinum"           "Palladium"          "Aluminium"         
+## [28] "Zinc"               "Nickel"             "Treasury Bonds"    
+## [31] "5 yr T-Notes US"    "2 yr T-Note US"     "10yr T-Notes"      
+## [34] "Euro-Bund"          "Euro-Bobl"          "Euro-Schatz"       
+## [37] "Canadian Bond"      "JGB Japan"          "Gilts UK"          
+## [40] "Euroyen"            "Eurodollar"         "Euroswiss"         
+## [43] "Euribor"            "SP500 E-Mini"       "DAX 30"            
+## [46] "Eurostoxx"          "Hang Seng"          "FTSE 100 UK"       
+## [49] "Nasdaq 100 Mini"    "Russel 2000 E-Mini" "Dow Jones"         
+## [52] "TSE Toronto"        "CAC 40 France"      "OMX 30 Stockholm"  
+## [55] "NIKKEI 225"         "Euro"               "Norwegian Krone"   
+## [58] "New Zealand Dollar" "Australian Dollar"  "British Pound"     
+## [61] "Canadian Dollar"    "Swiss Franc"        "Japanese Yen"      
+## [64] "Singapore Dollar"
+
+
+

Basic data analysis

+

Let’s see how these are correlated. The correlation matrix is as follows:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Corn Wheat Soybeans Soybean Oil Soybean Meal Lean Hoggs Sugar Coffee Cocoa Cotton Canola Orange Juice Lumber Natural Gas Crude Oil Brent Crude Heating Oil Kerosene Gas Oil Gasoline Copper NY Copper LDN Silver Gold Platinum Palladium Aluminium Zinc Nickel Treasury Bonds 5 yr T-Notes US 2 yr T-Note US 10yr T-Notes Euro-Bund Euro-Bobl Euro-Schatz Canadian Bond JGB Japan Gilts UK Euroyen Eurodollar Euroswiss Euribor SP500 E-Mini DAX 30 Eurostoxx Hang Seng FTSE 100 UK Nasdaq 100 Mini Russel 2000 E-Mini Dow Jones TSE Toronto CAC 40 France OMX 30 Stockholm NIKKEI 225 Euro Norwegian Krone New Zealand Dollar Australian Dollar British Pound Canadian Dollar Swiss Franc Japanese Yen Singapore Dollar
Corn 1.00 0.63 0.60 0.51 0.52 0.02 0.21 0.17 0.10 0.23 0.45 0.06 0.08 0.12 0.24 0.25 0.22 0.02 0.15 0.25 0.23 0.22 0.23 0.18 0.13 0.17 0.20 0.18 0.16 -0.08 -0.07 -0.05 -0.07 -0.08 -0.06 -0.08 -0.07 -0.03 -0.06 -0.01 -0.01 -0.05 -0.07 0.14 0.13 0.13 0.08 0.16 0.10 0.12 0.11 0.18 0.13 0.15 0.05 0.17 0.20 0.18 0.21 0.16 -0.20 0.11 -0.02 0.17
Wheat 0.63 1.00 0.45 0.42 0.39 0.03 0.20 0.18 0.09 0.22 0.38 0.03 0.07 0.09 0.21 0.21 0.18 0.00 0.12 0.21 0.21 0.21 0.20 0.16 0.12 0.15 0.17 0.17 0.14 -0.10 -0.09 -0.07 -0.09 -0.07 -0.06 -0.06 -0.07 -0.02 -0.06 -0.01 -0.04 -0.06 -0.06 0.13 0.13 0.13 0.06 0.15 0.10 0.13 0.11 0.17 0.13 0.13 0.05 0.16 0.20 0.18 0.20 0.15 -0.20 0.12 0.00 0.16
Soybeans 0.60 0.45 1.00 0.74 0.84 0.04 0.20 0.16 0.12 0.26 0.64 0.08 0.08 0.11 0.27 0.27 0.25 0.04 0.18 0.28 0.28 0.26 0.24 0.17 0.17 0.21 0.23 0.21 0.18 -0.12 -0.11 -0.09 -0.11 -0.11 -0.10 -0.10 -0.09 -0.02 -0.12 -0.02 -0.05 -0.09 -0.09 0.15 0.17 0.17 0.13 0.20 0.11 0.14 0.13 0.20 0.18 0.20 0.08 0.17 0.22 0.19 0.25 0.17 -0.22 0.11 -0.01 0.21
Soybean Oil 0.51 0.42 0.74 1.00 0.47 0.04 0.20 0.18 0.13 0.28 0.64 0.10 0.09 0.13 0.34 0.34 0.31 0.09 0.25 0.37 0.32 0.30 0.29 0.23 0.20 0.24 0.27 0.25 0.22 -0.14 -0.12 -0.09 -0.12 -0.11 -0.10 -0.11 -0.10 -0.02 -0.13 0.00 -0.04 -0.08 -0.08 0.20 0.20 0.20 0.19 0.25 0.14 0.19 0.18 0.24 0.22 0.24 0.12 0.20 0.26 0.24 0.30 0.21 -0.28 0.13 -0.05 0.23
Soybean Meal 0.52 0.39 0.84 0.47 1.00 0.02 0.16 0.13 0.09 0.20 0.51 0.08 0.07 0.09 0.17 0.17 0.16 0.02 0.11 0.17 0.20 0.18 0.17 0.12 0.12 0.15 0.16 0.15 0.13 -0.08 -0.08 -0.07 -0.08 -0.07 -0.07 -0.07 -0.06 -0.02 -0.08 -0.01 -0.04 -0.07 -0.07 0.10 0.13 0.13 0.09 0.15 0.08 0.09 0.09 0.15 0.13 0.15 0.07 0.13 0.16 0.15 0.19 0.12 -0.17 0.08 0.01 0.16
Lean Hoggs 0.02 0.03 0.04 0.04 0.02 1.00 0.03 0.02 0.03 0.02 0.01 0.01 0.03 0.04 0.07 0.06 0.05 -0.02 0.02 0.05 0.06 0.06 0.02 0.01 0.05 0.04 0.05 0.07 0.06 -0.04 -0.05 -0.04 -0.04 -0.04 -0.03 -0.02 -0.04 0.01 -0.05 0.00 -0.05 -0.05 -0.04 0.04 0.04 0.06 0.01 0.06 0.01 0.02 0.03 0.05 0.06 0.04 0.02 0.00 0.01 0.01 0.02 0.02 -0.03 -0.02 -0.03 0.01
Sugar 0.21 0.20 0.20 0.20 0.16 0.03 1.00 0.22 0.15 0.19 0.17 0.06 0.04 0.07 0.20 0.19 0.17 0.02 0.14 0.19 0.23 0.21 0.18 0.13 0.12 0.16 0.19 0.18 0.16 -0.07 -0.06 -0.04 -0.06 -0.09 -0.10 -0.09 -0.05 0.00 -0.08 0.00 -0.01 -0.04 -0.06 0.11 0.12 0.13 0.08 0.15 0.08 0.11 0.08 0.13 0.13 0.14 0.08 0.13 0.15 0.17 0.20 0.13 -0.15 0.09 -0.04 0.16
Coffee 0.17 0.18 0.16 0.18 0.13 0.02 0.22 1.00 0.18 0.16 0.12 0.06 0.07 0.05 0.15 0.14 0.13 0.04 0.12 0.15 0.19 0.18 0.20 0.15 0.13 0.17 0.17 0.17 0.15 -0.06 -0.05 -0.03 -0.05 -0.06 -0.06 -0.06 -0.05 0.00 -0.05 -0.01 -0.01 -0.05 -0.04 0.12 0.13 0.13 0.11 0.13 0.07 0.12 0.11 0.14 0.13 0.14 0.07 0.15 0.17 0.19 0.20 0.15 -0.17 0.08 0.00 0.16
Cocoa 0.10 0.09 0.12 0.13 0.09 0.03 0.15 0.18 1.00 0.12 0.08 0.05 0.06 0.04 0.16 0.15 0.13 0.06 0.15 0.14 0.17 0.17 0.21 0.18 0.13 0.14 0.16 0.16 0.12 -0.08 -0.06 -0.02 -0.07 -0.10 -0.09 -0.06 -0.07 -0.01 -0.09 -0.03 -0.01 -0.05 -0.05 0.10 0.11 0.12 0.12 0.11 0.06 0.11 0.09 0.13 0.13 0.14 0.07 0.21 0.22 0.22 0.23 0.24 -0.20 0.14 0.01 0.19
Cotton 0.23 0.22 0.26 0.28 0.20 0.02 0.19 0.16 0.12 1.00 0.22 0.08 0.07 0.04 0.20 0.20 0.18 0.03 0.16 0.19 0.23 0.22 0.17 0.13 0.10 0.15 0.19 0.18 0.18 -0.10 -0.10 -0.08 -0.10 -0.09 -0.09 -0.10 -0.08 -0.02 -0.08 0.01 -0.06 -0.07 -0.07 0.17 0.16 0.17 0.09 0.18 0.13 0.16 0.15 0.18 0.17 0.17 0.05 0.17 0.20 0.17 0.21 0.15 -0.20 0.11 -0.01 0.17
Canola 0.45 0.38 0.64 0.64 0.51 0.01 0.17 0.12 0.08 0.22 1.00 0.06 0.06 0.06 0.17 0.19 0.16 0.03 0.11 0.21 0.18 0.16 0.18 0.13 0.12 0.15 0.15 0.14 0.12 -0.09 -0.09 -0.07 -0.08 -0.06 -0.07 -0.09 -0.05 -0.02 -0.07 -0.01 -0.05 -0.06 -0.09 0.09 0.10 0.10 0.11 0.13 0.07 0.07 0.07 0.16 0.11 0.13 0.06 0.09 0.13 0.11 0.15 0.10 -0.06 0.05 -0.02 0.12
Orange Juice 0.06 0.03 0.08 0.10 0.08 0.01 0.06 0.06 0.05 0.08 0.06 1.00 0.04 0.05 0.10 0.08 0.08 0.04 0.08 0.09 0.09 0.08 0.10 0.06 0.06 0.07 0.10 0.07 0.08 -0.05 -0.03 -0.02 -0.04 -0.06 -0.06 -0.06 -0.07 -0.03 -0.06 -0.02 -0.01 -0.02 -0.04 0.08 0.08 0.09 0.07 0.10 0.06 0.06 0.08 0.10 0.08 0.11 0.07 0.06 0.05 0.07 0.09 0.03 -0.09 0.03 -0.03 0.07
Lumber 0.08 0.07 0.08 0.09 0.07 0.03 0.04 0.07 0.06 0.07 0.06 0.04 1.00 0.00 0.07 0.07 0.07 0.04 0.05 0.09 0.12 0.11 0.07 0.02 0.03 0.06 0.10 0.08 0.09 -0.10 -0.11 -0.09 -0.11 -0.08 -0.08 -0.07 -0.09 0.01 -0.10 -0.01 -0.07 -0.08 -0.06 0.12 0.14 0.14 0.08 0.14 0.12 0.10 0.11 0.10 0.14 0.12 0.04 0.05 0.08 0.09 0.11 0.08 -0.09 0.01 -0.07 0.09
Natural Gas 0.12 0.09 0.11 0.13 0.09 0.04 0.07 0.05 0.04 0.04 0.06 0.05 0.00 1.00 0.29 0.27 0.34 0.00 0.20 0.16 0.10 0.09 0.08 0.07 0.04 0.06 0.09 0.06 0.05 -0.02 -0.02 -0.02 -0.02 0.00 0.00 0.01 -0.02 -0.01 -0.01 0.00 -0.01 -0.01 0.00 0.04 0.04 0.03 0.03 0.04 0.02 0.03 0.03 0.10 0.04 0.04 0.03 0.07 0.07 0.07 0.09 0.06 -0.10 0.06 0.01 0.05
Crude Oil 0.24 0.21 0.27 0.34 0.17 0.07 0.20 0.15 0.16 0.20 0.17 0.10 0.07 0.29 1.00 0.89 0.84 0.10 0.56 0.66 0.37 0.35 0.29 0.26 0.20 0.24 0.30 0.27 0.25 -0.20 -0.14 -0.10 -0.17 -0.15 -0.14 -0.12 -0.15 -0.02 -0.14 -0.03 -0.05 -0.08 -0.08 0.23 0.19 0.20 0.15 0.25 0.13 0.23 0.19 0.33 0.22 0.25 0.10 0.23 0.32 0.25 0.32 0.22 -0.34 0.13 -0.06 0.25
Brent Crude 0.25 0.21 0.27 0.34 0.17 0.06 0.19 0.14 0.15 0.20 0.19 0.08 0.07 0.27 0.89 1.00 0.85 0.11 0.62 0.69 0.36 0.34 0.29 0.25 0.20 0.24 0.29 0.27 0.25 -0.17 -0.13 -0.09 -0.14 -0.13 -0.12 -0.10 -0.13 -0.02 -0.12 -0.01 -0.03 -0.08 -0.07 0.23 0.18 0.19 0.16 0.25 0.13 0.24 0.19 0.33 0.22 0.25 0.12 0.23 0.31 0.26 0.32 0.24 -0.34 0.14 -0.05 0.24
Heating Oil 0.22 0.18 0.25 0.31 0.16 0.05 0.17 0.13 0.13 0.18 0.16 0.08 0.07 0.34 0.84 0.85 1.00 0.10 0.64 0.63 0.31 0.30 0.26 0.23 0.18 0.21 0.25 0.24 0.21 -0.14 -0.10 -0.08 -0.11 -0.10 -0.09 -0.08 -0.11 -0.01 -0.09 -0.02 -0.03 -0.06 -0.05 0.19 0.15 0.15 0.13 0.20 0.11 0.21 0.16 0.28 0.18 0.21 0.10 0.20 0.26 0.22 0.28 0.20 -0.30 0.13 -0.03 0.21
Kerosene 0.02 0.00 0.04 0.09 0.02 -0.02 0.02 0.04 0.06 0.03 0.03 0.04 0.04 0.00 0.10 0.11 0.10 1.00 0.28 0.10 0.09 0.10 0.08 0.05 0.14 0.15 0.10 0.08 0.07 -0.03 -0.01 0.00 -0.02 -0.08 -0.06 -0.05 -0.02 -0.14 -0.11 -0.05 0.02 -0.04 -0.02 0.04 0.07 0.09 0.23 0.11 0.01 0.04 0.03 0.08 0.08 0.11 0.33 0.05 0.12 0.11 0.12 0.10 -0.11 0.04 -0.13 0.05
Gas Oil 0.15 0.12 0.18 0.25 0.11 0.02 0.14 0.12 0.15 0.16 0.11 0.08 0.05 0.20 0.56 0.62 0.64 0.28 1.00 0.40 0.29 0.30 0.24 0.19 0.18 0.21 0.25 0.25 0.21 -0.11 -0.07 -0.04 -0.09 -0.10 -0.09 -0.07 -0.09 -0.03 -0.11 -0.01 -0.01 -0.06 -0.04 0.13 0.15 0.16 0.14 0.21 0.08 0.15 0.11 0.19 0.17 0.21 0.09 0.20 0.29 0.23 0.27 0.20 -0.31 0.16 -0.03 0.21
Gasoline 0.25 0.21 0.28 0.37 0.17 0.05 0.19 0.15 0.14 0.19 0.21 0.09 0.09 0.16 0.66 0.69 0.63 0.10 0.40 1.00 0.36 0.34 0.28 0.23 0.21 0.25 0.30 0.27 0.26 -0.18 -0.15 -0.10 -0.16 -0.15 -0.15 -0.15 -0.15 -0.02 -0.14 -0.05 -0.06 -0.11 -0.12 0.26 0.22 0.23 0.18 0.28 0.16 0.26 0.23 0.35 0.25 0.28 0.13 0.19 0.28 0.23 0.31 0.21 -0.31 0.10 -0.08 0.22
Copper NY 0.23 0.21 0.28 0.32 0.20 0.06 0.23 0.19 0.17 0.23 0.18 0.09 0.12 0.10 0.37 0.36 0.31 0.09 0.29 0.36 1.00 0.91 0.45 0.36 0.31 0.39 0.67 0.68 0.57 -0.20 -0.17 -0.13 -0.18 -0.20 -0.19 -0.17 -0.17 -0.06 -0.19 -0.03 -0.06 -0.14 -0.14 0.28 0.36 0.37 0.25 0.40 0.21 0.23 0.26 0.33 0.38 0.38 0.18 0.29 0.35 0.38 0.45 0.29 -0.38 0.20 -0.08 0.32
Copper LDN 0.22 0.21 0.26 0.30 0.18 0.06 0.21 0.18 0.17 0.22 0.16 0.08 0.11 0.09 0.35 0.34 0.30 0.10 0.30 0.34 0.91 1.00 0.42 0.33 0.31 0.39 0.72 0.75 0.60 -0.19 -0.17 -0.12 -0.17 -0.22 -0.20 -0.19 -0.17 -0.06 -0.21 -0.02 -0.06 -0.15 -0.15 0.28 0.38 0.39 0.26 0.43 0.20 0.24 0.26 0.33 0.41 0.41 0.18 0.28 0.35 0.38 0.45 0.28 -0.39 0.18 -0.07 0.33
Silver 0.23 0.20 0.24 0.29 0.17 0.02 0.18 0.20 0.21 0.17 0.18 0.10 0.07 0.08 0.29 0.29 0.26 0.08 0.24 0.28 0.45 0.42 1.00 0.78 0.44 0.51 0.37 0.37 0.29 -0.01 0.02 0.04 0.01 -0.01 0.01 0.01 0.00 0.00 0.00 -0.01 0.06 -0.01 0.00 0.09 0.13 0.13 0.17 0.18 0.04 0.11 0.08 0.23 0.15 0.19 0.12 0.40 0.43 0.40 0.43 0.37 -0.39 0.35 0.14 0.37
Gold 0.18 0.16 0.17 0.23 0.12 0.01 0.13 0.15 0.18 0.13 0.13 0.06 0.02 0.07 0.26 0.25 0.23 0.05 0.19 0.23 0.36 0.33 0.78 1.00 0.43 0.44 0.29 0.30 0.23 0.10 0.12 0.12 0.12 0.11 0.12 0.12 0.10 0.03 0.12 -0.01 0.10 0.07 0.08 -0.02 -0.02 -0.02 0.06 0.04 -0.04 0.01 -0.03 0.14 0.00 0.07 0.05 0.42 0.41 0.35 0.37 0.36 -0.34 0.41 0.23 0.36
Platinum 0.13 0.12 0.17 0.20 0.12 0.05 0.12 0.13 0.13 0.10 0.12 0.06 0.03 0.04 0.20 0.20 0.18 0.14 0.18 0.21 0.31 0.31 0.44 0.43 1.00 0.46 0.30 0.27 0.23 -0.08 -0.06 -0.05 -0.06 -0.09 -0.09 -0.08 -0.06 -0.02 -0.07 0.00 -0.01 -0.07 -0.06 0.12 0.14 0.14 0.15 0.16 0.08 0.13 0.11 0.20 0.16 0.18 0.13 0.24 0.28 0.29 0.33 0.23 -0.27 0.20 0.03 0.27
Palladium 0.17 0.15 0.21 0.24 0.15 0.04 0.16 0.17 0.14 0.15 0.15 0.07 0.06 0.06 0.24 0.24 0.21 0.15 0.21 0.25 0.39 0.39 0.51 0.44 0.46 1.00 0.36 0.36 0.29 -0.11 -0.08 -0.05 -0.09 -0.10 -0.08 -0.06 -0.08 -0.04 -0.09 -0.02 0.00 -0.06 -0.04 0.19 0.21 0.22 0.18 0.26 0.13 0.20 0.17 0.27 0.23 0.27 0.15 0.28 0.32 0.32 0.36 0.25 -0.33 0.22 0.03 0.31
Aluminium 0.20 0.17 0.23 0.27 0.16 0.05 0.19 0.17 0.16 0.19 0.15 0.10 0.10 0.09 0.30 0.29 0.25 0.10 0.25 0.30 0.67 0.72 0.37 0.29 0.30 0.36 1.00 0.68 0.53 -0.16 -0.13 -0.10 -0.14 -0.17 -0.16 -0.15 -0.15 -0.05 -0.16 -0.04 -0.04 -0.13 -0.12 0.23 0.30 0.31 0.18 0.33 0.17 0.20 0.22 0.28 0.32 0.32 0.15 0.27 0.32 0.31 0.36 0.26 -0.34 0.20 -0.04 0.31
Zinc 0.18 0.17 0.21 0.25 0.15 0.07 0.18 0.17 0.16 0.18 0.14 0.07 0.08 0.06 0.27 0.27 0.24 0.08 0.25 0.27 0.68 0.75 0.37 0.30 0.27 0.36 0.68 1.00 0.57 -0.14 -0.14 -0.11 -0.13 -0.16 -0.16 -0.16 -0.14 -0.05 -0.16 -0.03 -0.06 -0.13 -0.12 0.21 0.29 0.30 0.22 0.35 0.15 0.19 0.20 0.26 0.33 0.33 0.16 0.24 0.30 0.31 0.37 0.23 -0.33 0.15 -0.06 0.27
Nickel 0.16 0.14 0.18 0.22 0.13 0.06 0.16 0.15 0.12 0.18 0.12 0.08 0.09 0.05 0.25 0.25 0.21 0.07 0.21 0.26 0.57 0.60 0.29 0.23 0.23 0.29 0.53 0.57 1.00 -0.13 -0.12 -0.09 -0.12 -0.16 -0.13 -0.12 -0.12 -0.04 -0.15 -0.03 -0.05 -0.10 -0.09 0.20 0.26 0.27 0.18 0.30 0.14 0.17 0.19 0.23 0.29 0.27 0.13 0.19 0.24 0.26 0.31 0.18 -0.28 0.13 -0.06 0.23
Treasury Bonds -0.08 -0.10 -0.12 -0.14 -0.08 -0.04 -0.07 -0.06 -0.08 -0.10 -0.09 -0.05 -0.10 -0.02 -0.20 -0.17 -0.14 -0.03 -0.11 -0.18 -0.20 -0.19 -0.01 0.10 -0.08 -0.11 -0.16 -0.14 -0.13 1.00 0.85 0.66 0.93 0.61 0.56 0.46 0.81 0.09 0.54 0.04 0.54 0.33 0.33 -0.35 -0.35 -0.35 -0.12 -0.31 -0.29 -0.31 -0.33 -0.28 -0.34 -0.28 -0.09 0.04 -0.05 -0.09 -0.13 -0.01 0.17 0.15 0.31 -0.09
5 yr T-Notes US -0.07 -0.09 -0.11 -0.12 -0.08 -0.05 -0.06 -0.05 -0.06 -0.10 -0.09 -0.03 -0.11 -0.02 -0.14 -0.13 -0.10 -0.01 -0.07 -0.15 -0.17 -0.17 0.02 0.12 -0.06 -0.08 -0.13 -0.14 -0.12 0.85 1.00 0.90 0.96 0.55 0.57 0.52 0.77 0.09 0.49 0.04 0.76 0.37 0.40 -0.35 -0.35 -0.34 -0.13 -0.30 -0.31 -0.27 -0.33 -0.26 -0.32 -0.25 -0.08 0.11 0.00 -0.05 -0.09 0.04 0.11 0.21 0.34 -0.03
2 yr T-Note US -0.05 -0.07 -0.09 -0.09 -0.07 -0.04 -0.04 -0.03 -0.02 -0.08 -0.07 -0.02 -0.09 -0.02 -0.10 -0.09 -0.08 0.00 -0.04 -0.10 -0.13 -0.12 0.04 0.12 -0.05 -0.05 -0.10 -0.11 -0.09 0.66 0.90 1.00 0.81 0.45 0.50 0.51 0.64 0.07 0.39 0.04 0.85 0.38 0.42 -0.33 -0.31 -0.30 -0.12 -0.27 -0.30 -0.22 -0.30 -0.23 -0.28 -0.21 -0.07 0.15 0.05 -0.02 -0.06 0.08 0.06 0.22 0.31 0.02
10yr T-Notes -0.07 -0.09 -0.11 -0.12 -0.08 -0.04 -0.06 -0.05 -0.07 -0.10 -0.08 -0.04 -0.11 -0.02 -0.17 -0.14 -0.11 -0.02 -0.09 -0.16 -0.18 -0.17 0.01 0.12 -0.06 -0.09 -0.14 -0.13 -0.12 0.93 0.96 0.81 1.00 0.59 0.59 0.51 0.82 0.10 0.53 0.04 0.68 0.36 0.38 -0.35 -0.35 -0.35 -0.12 -0.30 -0.30 -0.28 -0.32 -0.27 -0.33 -0.26 -0.08 0.09 -0.02 -0.06 -0.10 0.02 0.13 0.20 0.34 -0.06
Euro-Bund -0.08 -0.07 -0.11 -0.11 -0.07 -0.04 -0.09 -0.06 -0.10 -0.09 -0.06 -0.06 -0.08 0.00 -0.15 -0.13 -0.10 -0.08 -0.10 -0.15 -0.20 -0.22 -0.01 0.11 -0.09 -0.10 -0.17 -0.16 -0.16 0.61 0.55 0.45 0.59 1.00 0.93 0.76 0.62 0.14 0.81 0.08 0.34 0.49 0.59 -0.30 -0.43 -0.46 -0.16 -0.40 -0.23 -0.27 -0.29 -0.25 -0.45 -0.36 -0.12 -0.02 -0.08 -0.09 -0.13 -0.04 0.17 0.11 0.33 -0.11
Euro-Bobl -0.06 -0.06 -0.10 -0.10 -0.07 -0.03 -0.10 -0.06 -0.09 -0.09 -0.07 -0.06 -0.08 0.00 -0.14 -0.12 -0.09 -0.06 -0.09 -0.15 -0.19 -0.20 0.01 0.12 -0.09 -0.08 -0.16 -0.16 -0.13 0.56 0.57 0.50 0.59 0.93 1.00 0.91 0.59 0.14 0.74 0.08 0.41 0.56 0.73 -0.31 -0.43 -0.46 -0.16 -0.41 -0.25 -0.26 -0.29 -0.25 -0.45 -0.35 -0.12 0.00 -0.05 -0.07 -0.11 -0.02 0.14 0.15 0.33 -0.09
Euro-Schatz -0.08 -0.06 -0.10 -0.11 -0.07 -0.02 -0.09 -0.06 -0.06 -0.10 -0.09 -0.06 -0.07 0.01 -0.12 -0.10 -0.08 -0.05 -0.07 -0.15 -0.17 -0.19 0.01 0.12 -0.08 -0.06 -0.15 -0.16 -0.12 0.46 0.52 0.51 0.51 0.76 0.91 1.00 0.51 0.12 0.59 0.07 0.45 0.59 0.81 -0.29 -0.41 -0.43 -0.16 -0.39 -0.24 -0.22 -0.26 -0.24 -0.42 -0.32 -0.13 0.02 -0.02 -0.06 -0.11 0.00 0.11 0.17 0.30 -0.06
Canadian Bond -0.07 -0.07 -0.09 -0.10 -0.06 -0.04 -0.05 -0.05 -0.07 -0.08 -0.05 -0.07 -0.09 -0.02 -0.15 -0.13 -0.11 -0.02 -0.09 -0.15 -0.17 -0.17 0.00 0.10 -0.06 -0.08 -0.15 -0.14 -0.12 0.81 0.77 0.64 0.82 0.62 0.59 0.51 1.00 0.10 0.55 0.05 0.54 0.34 0.38 -0.34 -0.35 -0.35 -0.11 -0.30 -0.29 -0.29 -0.32 -0.27 -0.34 -0.27 -0.09 0.06 -0.02 -0.07 -0.09 0.00 0.17 0.17 0.30 -0.06
JGB Japan -0.03 -0.02 -0.02 -0.02 -0.02 0.01 0.00 0.00 -0.01 -0.02 -0.02 -0.03 0.01 -0.01 -0.02 -0.02 -0.01 -0.14 -0.03 -0.02 -0.06 -0.06 0.00 0.03 -0.02 -0.04 -0.05 -0.05 -0.04 0.09 0.09 0.07 0.10 0.14 0.14 0.12 0.10 1.00 0.14 0.38 0.06 0.15 0.12 -0.06 -0.09 -0.09 -0.19 -0.10 -0.05 -0.04 -0.06 -0.06 -0.10 -0.11 -0.35 0.03 0.01 -0.06 -0.08 0.00 0.03 0.06 0.08 0.00
Gilts UK -0.06 -0.06 -0.12 -0.13 -0.08 -0.05 -0.08 -0.05 -0.09 -0.08 -0.07 -0.06 -0.10 -0.01 -0.14 -0.12 -0.09 -0.11 -0.11 -0.14 -0.19 -0.21 0.00 0.12 -0.07 -0.09 -0.16 -0.16 -0.15 0.54 0.49 0.39 0.53 0.81 0.74 0.59 0.55 0.14 1.00 0.07 0.28 0.44 0.49 -0.27 -0.38 -0.40 -0.18 -0.37 -0.20 -0.24 -0.26 -0.24 -0.41 -0.33 -0.16 0.02 -0.05 -0.08 -0.12 -0.10 0.16 0.12 0.33 -0.08
Euroyen -0.01 -0.01 -0.02 0.00 -0.01 0.00 0.00 -0.01 -0.03 0.01 -0.01 -0.02 -0.01 0.00 -0.03 -0.01 -0.02 -0.05 -0.01 -0.05 -0.03 -0.02 -0.01 -0.01 0.00 -0.02 -0.04 -0.03 -0.03 0.04 0.04 0.04 0.04 0.08 0.08 0.07 0.05 0.38 0.07 1.00 0.17 0.30 0.25 -0.06 -0.06 -0.06 -0.09 -0.07 -0.05 -0.04 -0.06 -0.07 -0.06 -0.08 -0.17 0.00 0.00 -0.04 -0.06 -0.02 0.03 0.01 0.00 -0.03
Eurodollar -0.01 -0.04 -0.05 -0.04 -0.04 -0.05 -0.01 -0.01 -0.01 -0.06 -0.05 -0.01 -0.07 -0.01 -0.05 -0.03 -0.03 0.02 -0.01 -0.06 -0.06 -0.06 0.06 0.10 -0.01 0.00 -0.04 -0.06 -0.05 0.54 0.76 0.85 0.68 0.34 0.41 0.45 0.54 0.06 0.28 0.17 1.00 0.41 0.48 -0.23 -0.23 -0.21 -0.06 -0.18 -0.23 -0.12 -0.21 -0.17 -0.19 -0.10 -0.03 0.20 0.11 0.03 0.02 0.13 -0.01 0.24 0.26 0.07
Euroswiss -0.05 -0.06 -0.09 -0.08 -0.07 -0.05 -0.04 -0.05 -0.05 -0.07 -0.06 -0.02 -0.08 -0.01 -0.08 -0.08 -0.06 -0.04 -0.06 -0.11 -0.14 -0.15 -0.01 0.07 -0.07 -0.06 -0.13 -0.13 -0.10 0.33 0.37 0.38 0.36 0.49 0.56 0.59 0.34 0.15 0.44 0.30 0.41 1.00 0.69 -0.24 -0.33 -0.33 -0.16 -0.32 -0.20 -0.18 -0.22 -0.20 -0.35 -0.24 -0.17 0.00 -0.05 -0.08 -0.11 -0.03 0.12 0.13 0.21 -0.06
Euribor -0.07 -0.06 -0.09 -0.08 -0.07 -0.04 -0.06 -0.04 -0.05 -0.07 -0.09 -0.04 -0.06 0.00 -0.08 -0.07 -0.05 -0.02 -0.04 -0.12 -0.14 -0.15 0.00 0.08 -0.06 -0.04 -0.12 -0.12 -0.09 0.33 0.40 0.42 0.38 0.59 0.73 0.81 0.38 0.12 0.49 0.25 0.48 0.69 1.00 -0.20 -0.31 -0.32 -0.14 -0.31 -0.18 -0.14 -0.18 -0.19 -0.33 -0.21 -0.15 0.02 -0.01 -0.03 -0.06 0.01 0.06 0.14 0.22 -0.03
SP500 E-Mini 0.14 0.13 0.15 0.20 0.10 0.04 0.11 0.12 0.10 0.17 0.09 0.08 0.12 0.04 0.23 0.23 0.19 0.04 0.13 0.26 0.28 0.28 0.09 -0.02 0.12 0.19 0.23 0.21 0.20 -0.35 -0.35 -0.33 -0.35 -0.30 -0.31 -0.29 -0.34 -0.06 -0.27 -0.06 -0.23 -0.24 -0.20 1.00 0.63 0.61 0.25 0.56 0.84 0.76 0.93 0.73 0.58 0.49 0.16 0.09 0.17 0.26 0.31 0.12 -0.28 -0.06 -0.22 0.22
DAX 30 0.13 0.13 0.17 0.20 0.13 0.04 0.12 0.13 0.11 0.16 0.10 0.08 0.14 0.04 0.19 0.18 0.15 0.07 0.15 0.22 0.36 0.38 0.13 -0.02 0.14 0.21 0.30 0.29 0.26 -0.35 -0.35 -0.31 -0.35 -0.43 -0.43 -0.41 -0.35 -0.09 -0.38 -0.06 -0.23 -0.33 -0.31 0.63 1.00 0.94 0.35 0.81 0.52 0.42 0.59 0.51 0.88 0.64 0.26 0.04 0.16 0.26 0.32 0.10 -0.29 -0.09 -0.26 0.23
Eurostoxx 0.13 0.13 0.17 0.20 0.13 0.06 0.13 0.13 0.12 0.17 0.10 0.09 0.14 0.03 0.20 0.19 0.15 0.09 0.16 0.23 0.37 0.39 0.13 -0.02 0.14 0.22 0.31 0.30 0.27 -0.35 -0.34 -0.30 -0.35 -0.46 -0.46 -0.43 -0.35 -0.09 -0.40 -0.06 -0.21 -0.33 -0.32 0.61 0.94 1.00 0.35 0.86 0.48 0.41 0.57 0.51 0.94 0.65 0.26 0.05 0.19 0.27 0.33 0.11 -0.31 -0.09 -0.28 0.23
Hang Seng 0.08 0.06 0.13 0.19 0.09 0.01 0.08 0.11 0.12 0.09 0.11 0.07 0.08 0.03 0.15 0.16 0.13 0.23 0.14 0.18 0.25 0.26 0.17 0.06 0.15 0.18 0.18 0.22 0.18 -0.12 -0.13 -0.12 -0.12 -0.16 -0.16 -0.16 -0.11 -0.19 -0.18 -0.09 -0.06 -0.16 -0.14 0.25 0.35 0.35 1.00 0.40 0.19 0.19 0.23 0.27 0.38 0.34 0.56 0.10 0.19 0.27 0.34 0.15 -0.21 0.00 -0.15 0.23
FTSE 100 UK 0.16 0.15 0.20 0.25 0.15 0.06 0.15 0.13 0.11 0.18 0.13 0.10 0.14 0.04 0.25 0.25 0.20 0.11 0.21 0.28 0.40 0.43 0.18 0.04 0.16 0.26 0.33 0.35 0.30 -0.31 -0.30 -0.27 -0.30 -0.40 -0.41 -0.39 -0.30 -0.10 -0.37 -0.07 -0.18 -0.32 -0.31 0.56 0.81 0.86 0.40 1.00 0.41 0.42 0.52 0.51 0.89 0.68 0.31 0.10 0.24 0.33 0.40 0.10 -0.34 -0.06 -0.28 0.26
Nasdaq 100 Mini 0.10 0.10 0.11 0.14 0.08 0.01 0.08 0.07 0.06 0.13 0.07 0.06 0.12 0.02 0.13 0.13 0.11 0.01 0.08 0.16 0.21 0.20 0.04 -0.04 0.08 0.13 0.17 0.15 0.14 -0.29 -0.31 -0.30 -0.30 -0.23 -0.25 -0.24 -0.29 -0.05 -0.20 -0.05 -0.23 -0.20 -0.18 0.84 0.52 0.48 0.19 0.41 1.00 0.55 0.71 0.60 0.44 0.34 0.12 0.03 0.09 0.19 0.21 0.06 -0.19 -0.08 -0.15 0.15
Russel 2000 E-Mini 0.12 0.13 0.14 0.19 0.09 0.02 0.11 0.12 0.11 0.16 0.07 0.06 0.10 0.03 0.23 0.24 0.21 0.04 0.15 0.26 0.23 0.24 0.11 0.01 0.13 0.20 0.20 0.19 0.17 -0.31 -0.27 -0.22 -0.28 -0.27 -0.26 -0.22 -0.29 -0.04 -0.24 -0.04 -0.12 -0.18 -0.14 0.76 0.42 0.41 0.19 0.42 0.55 1.00 0.75 0.60 0.43 0.50 0.09 0.15 0.20 0.27 0.29 0.16 -0.28 0.00 -0.21 0.26
Dow Jones 0.11 0.11 0.13 0.18 0.09 0.03 0.08 0.11 0.09 0.15 0.07 0.08 0.11 0.03 0.19 0.19 0.16 0.03 0.11 0.23 0.26 0.26 0.08 -0.03 0.11 0.17 0.22 0.20 0.19 -0.33 -0.33 -0.30 -0.32 -0.29 -0.29 -0.26 -0.32 -0.06 -0.26 -0.06 -0.21 -0.22 -0.18 0.93 0.59 0.57 0.23 0.52 0.71 0.75 1.00 0.66 0.54 0.49 0.14 0.08 0.16 0.24 0.28 0.11 -0.26 -0.06 -0.22 0.20
TSE Toronto 0.18 0.17 0.20 0.24 0.15 0.05 0.13 0.14 0.13 0.18 0.16 0.10 0.10 0.10 0.33 0.33 0.28 0.08 0.19 0.35 0.33 0.33 0.23 0.14 0.20 0.27 0.28 0.26 0.23 -0.28 -0.26 -0.23 -0.27 -0.25 -0.25 -0.24 -0.27 -0.06 -0.24 -0.07 -0.17 -0.20 -0.19 0.73 0.51 0.51 0.27 0.51 0.60 0.60 0.66 1.00 0.51 0.44 0.22 0.13 0.22 0.27 0.32 0.18 -0.24 0.01 -0.16 0.24
CAC 40 France 0.13 0.13 0.18 0.22 0.13 0.06 0.13 0.13 0.13 0.17 0.11 0.08 0.14 0.04 0.22 0.22 0.18 0.08 0.17 0.25 0.38 0.41 0.15 0.00 0.16 0.23 0.32 0.33 0.29 -0.34 -0.32 -0.28 -0.33 -0.45 -0.45 -0.42 -0.34 -0.10 -0.41 -0.06 -0.19 -0.35 -0.33 0.58 0.88 0.94 0.38 0.89 0.44 0.43 0.54 0.51 1.00 0.69 0.30 0.07 0.21 0.30 0.36 0.13 -0.33 -0.08 -0.28 0.25
OMX 30 Stockholm 0.15 0.13 0.20 0.24 0.15 0.04 0.14 0.14 0.14 0.17 0.13 0.11 0.12 0.04 0.25 0.25 0.21 0.11 0.21 0.28 0.38 0.41 0.19 0.07 0.18 0.27 0.32 0.33 0.27 -0.28 -0.25 -0.21 -0.26 -0.36 -0.35 -0.32 -0.27 -0.11 -0.33 -0.08 -0.10 -0.24 -0.21 0.49 0.64 0.65 0.34 0.68 0.34 0.50 0.49 0.44 0.69 1.00 0.26 0.21 0.32 0.36 0.42 0.22 -0.38 0.04 -0.25 0.34
NIKKEI 225 0.05 0.05 0.08 0.12 0.07 0.02 0.08 0.07 0.07 0.05 0.06 0.07 0.04 0.03 0.10 0.12 0.10 0.33 0.09 0.13 0.18 0.18 0.12 0.05 0.13 0.15 0.15 0.16 0.13 -0.09 -0.08 -0.07 -0.08 -0.12 -0.12 -0.13 -0.09 -0.35 -0.16 -0.17 -0.03 -0.17 -0.15 0.16 0.26 0.26 0.56 0.31 0.12 0.09 0.14 0.22 0.30 0.26 1.00 0.06 0.12 0.20 0.26 0.11 -0.15 -0.01 -0.18 0.11
Euro 0.17 0.16 0.17 0.20 0.13 0.00 0.13 0.15 0.21 0.17 0.09 0.06 0.05 0.07 0.23 0.23 0.20 0.05 0.20 0.19 0.29 0.28 0.40 0.42 0.24 0.28 0.27 0.24 0.19 0.04 0.11 0.15 0.09 -0.02 0.00 0.02 0.06 0.03 0.02 0.00 0.20 0.00 0.02 0.09 0.04 0.05 0.10 0.10 0.03 0.15 0.08 0.13 0.07 0.21 0.06 1.00 0.78 0.56 0.58 0.66 -0.48 0.76 0.29 0.57
Norwegian Krone 0.20 0.20 0.22 0.26 0.16 0.01 0.15 0.17 0.22 0.20 0.13 0.05 0.08 0.07 0.32 0.31 0.26 0.12 0.29 0.28 0.35 0.35 0.43 0.41 0.28 0.32 0.32 0.30 0.24 -0.05 0.00 0.05 -0.02 -0.08 -0.05 -0.02 -0.02 0.01 -0.05 0.00 0.11 -0.05 -0.01 0.17 0.16 0.19 0.19 0.24 0.09 0.20 0.16 0.22 0.21 0.32 0.12 0.78 1.00 0.57 0.60 0.61 -0.52 0.60 0.17 0.56
New Zealand Dollar 0.18 0.18 0.19 0.24 0.15 0.01 0.17 0.19 0.22 0.17 0.11 0.07 0.09 0.07 0.25 0.26 0.22 0.11 0.23 0.23 0.38 0.38 0.40 0.35 0.29 0.32 0.31 0.31 0.26 -0.09 -0.05 -0.02 -0.06 -0.09 -0.07 -0.06 -0.07 -0.06 -0.08 -0.04 0.03 -0.08 -0.03 0.26 0.26 0.27 0.27 0.33 0.19 0.27 0.24 0.27 0.30 0.36 0.20 0.56 0.57 1.00 0.82 0.54 -0.56 0.40 0.07 0.56
Australian Dollar 0.21 0.20 0.25 0.30 0.19 0.02 0.20 0.20 0.23 0.21 0.15 0.09 0.11 0.09 0.32 0.32 0.28 0.12 0.27 0.31 0.45 0.45 0.43 0.37 0.33 0.36 0.36 0.37 0.31 -0.13 -0.09 -0.06 -0.10 -0.13 -0.11 -0.11 -0.09 -0.08 -0.12 -0.06 0.02 -0.11 -0.06 0.31 0.32 0.33 0.34 0.40 0.21 0.29 0.28 0.32 0.36 0.42 0.26 0.58 0.60 0.82 1.00 0.54 -0.62 0.40 0.06 0.59
British Pound 0.16 0.15 0.17 0.21 0.12 0.02 0.13 0.15 0.24 0.15 0.10 0.03 0.08 0.06 0.22 0.24 0.20 0.10 0.20 0.21 0.29 0.28 0.37 0.36 0.23 0.25 0.26 0.23 0.18 -0.01 0.04 0.08 0.02 -0.04 -0.02 0.00 0.00 0.00 -0.10 -0.02 0.13 -0.03 0.01 0.12 0.10 0.11 0.15 0.10 0.06 0.16 0.11 0.18 0.13 0.22 0.11 0.66 0.61 0.54 0.54 1.00 -0.46 0.51 0.18 0.48
Canadian Dollar -0.20 -0.20 -0.22 -0.28 -0.17 -0.03 -0.15 -0.17 -0.20 -0.20 -0.06 -0.09 -0.09 -0.10 -0.34 -0.34 -0.30 -0.11 -0.31 -0.31 -0.38 -0.39 -0.39 -0.34 -0.27 -0.33 -0.34 -0.33 -0.28 0.17 0.11 0.06 0.13 0.17 0.14 0.11 0.17 0.03 0.16 0.03 -0.01 0.12 0.06 -0.28 -0.29 -0.31 -0.21 -0.34 -0.19 -0.28 -0.26 -0.24 -0.33 -0.38 -0.15 -0.48 -0.52 -0.56 -0.62 -0.46 1.00 -0.33 -0.03 -0.48
Swiss Franc 0.11 0.12 0.11 0.13 0.08 -0.02 0.09 0.08 0.14 0.11 0.05 0.03 0.01 0.06 0.13 0.14 0.13 0.04 0.16 0.10 0.20 0.18 0.35 0.41 0.20 0.22 0.20 0.15 0.13 0.15 0.21 0.22 0.20 0.11 0.15 0.17 0.17 0.06 0.12 0.01 0.24 0.13 0.14 -0.06 -0.09 -0.09 0.00 -0.06 -0.08 0.00 -0.06 0.01 -0.08 0.04 -0.01 0.76 0.60 0.40 0.40 0.51 -0.33 1.00 0.39 0.45
Japanese Yen -0.02 0.00 -0.01 -0.05 0.01 -0.03 -0.04 0.00 0.01 -0.01 -0.02 -0.03 -0.07 0.01 -0.06 -0.05 -0.03 -0.13 -0.03 -0.08 -0.08 -0.07 0.14 0.23 0.03 0.03 -0.04 -0.06 -0.06 0.31 0.34 0.31 0.34 0.33 0.33 0.30 0.30 0.08 0.33 0.00 0.26 0.21 0.22 -0.22 -0.26 -0.28 -0.15 -0.28 -0.15 -0.21 -0.22 -0.16 -0.28 -0.25 -0.18 0.29 0.17 0.07 0.06 0.18 -0.03 0.39 1.00 0.27
Singapore Dollar 0.17 0.16 0.21 0.23 0.16 0.01 0.16 0.16 0.19 0.17 0.12 0.07 0.09 0.05 0.25 0.24 0.21 0.05 0.21 0.22 0.32 0.33 0.37 0.36 0.27 0.31 0.31 0.27 0.23 -0.09 -0.03 0.02 -0.06 -0.11 -0.09 -0.06 -0.06 0.00 -0.08 -0.03 0.07 -0.06 -0.03 0.22 0.23 0.23 0.23 0.26 0.15 0.26 0.20 0.24 0.25 0.34 0.11 0.57 0.56 0.56 0.59 0.48 -0.48 0.45 0.27 1.00
+

We see quite high correlations among some of the futures. Does it make sense? Why? Do you see some negative correlations? Do those make sense?

+

Given such high correlations, we can try to see whether there are some “principal components” (see reading on dimensionality reduction). This analysis can also indicate whether all futures (the global economy!) are driven by some common “factors” (let’s call them “risk factors”).

+
Variance_Explained_Table_results<-PCA(futures_data, graph=FALSE)
+Variance_Explained_Table<-Variance_Explained_Table_results$eig
+colnames(Variance_Explained_Table)<-c("Eigenvalue", 
+  "Pct of explained variance", "Cumulative pct of explained variance")
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigenvalue Pct of explained variance Cumulative pct of explained variance
comp 1 14.04 21.94 21.94
comp 2 7.84 12.25 34.19
comp 3 3.52 5.50 39.69
comp 4 3.05 4.77 44.46
comp 5 2.63 4.11 48.57
comp 6 2.38 3.72 52.29
comp 7 2.14 3.34 55.64
comp 8 1.70 2.65 58.29
comp 9 1.46 2.28 60.57
comp 10 1.31 2.04 62.61
comp 11 1.18 1.84 64.45
comp 12 1.14 1.79 66.24
comp 13 1.00 1.56 67.80
comp 14 1.00 1.56 69.36
comp 15 0.98 1.53 70.89
comp 16 0.94 1.47 72.37
comp 17 0.90 1.41 73.78
comp 18 0.87 1.36 75.14
comp 19 0.84 1.32 76.46
comp 20 0.82 1.29 77.75
comp 21 0.79 1.23 78.98
comp 22 0.78 1.22 80.20
comp 23 0.76 1.19 81.39
comp 24 0.70 1.09 82.48
comp 25 0.63 0.98 83.46
comp 26 0.60 0.93 84.40
comp 27 0.59 0.92 85.32
comp 28 0.55 0.86 86.18
comp 29 0.53 0.83 87.01
comp 30 0.51 0.80 87.81
comp 31 0.50 0.78 88.59
comp 32 0.49 0.76 89.35
comp 33 0.45 0.70 90.06
comp 34 0.43 0.67 90.73
comp 35 0.39 0.62 91.34
comp 36 0.38 0.60 91.94
comp 37 0.37 0.57 92.52
comp 38 0.36 0.56 93.07
comp 39 0.35 0.55 93.62
comp 40 0.34 0.53 94.15
comp 41 0.33 0.51 94.67
comp 42 0.32 0.51 95.18
comp 43 0.31 0.48 95.65
comp 44 0.30 0.46 96.12
comp 45 0.29 0.45 96.56
comp 46 0.23 0.36 96.92
comp 47 0.21 0.32 97.24
comp 48 0.20 0.31 97.56
comp 49 0.19 0.30 97.85
comp 50 0.18 0.27 98.13
comp 51 0.16 0.24 98.37
comp 52 0.15 0.24 98.61
comp 53 0.14 0.23 98.84
comp 54 0.13 0.21 99.04
comp 55 0.11 0.16 99.21
comp 56 0.09 0.14 99.35
comp 57 0.09 0.13 99.49
comp 58 0.08 0.13 99.62
comp 59 0.08 0.12 99.74
comp 60 0.06 0.09 99.83
comp 61 0.04 0.06 99.89
comp 62 0.03 0.05 99.94
comp 63 0.02 0.03 99.97
comp 64 0.02 0.03 100.00
+

Here is the scree plot (see Sessions 3-4 readings):

+
eigenvalues  <- Variance_Explained_Table[, "Eigenvalue"]
+
+ +

Let’s now see how the 20 first (rotated) principal components look like. Let’s also use the rotated factors (note that these are not really the “principal component”, as explained in the reading on dimensionality reduction) and not show any numbers less than 0.3 in absolute value, to avoid cluttering.

+
corused = cor(futures_data[, apply(futures_data != 0, 2, sum) > 10, drop = F])
+Rotated_Results <- principal(corused, nfactors = 20, rotate = "varimax", score = TRUE)
+Rotated_Factors <- round(Rotated_Results$loadings, 2)
+Rotated_Factors <- as.data.frame(unclass(Rotated_Factors))
+colnames(Rotated_Factors) <- paste("comp", 1:ncol(Rotated_Factors), sep = " ")
+
+sorted_rows <- sort(Rotated_Factors[, 1], decreasing = TRUE, index.return = TRUE)$ix
+Rotated_Factors <- Rotated_Factors[sorted_rows, ]
+Rotated_Factors[abs(Rotated_Factors) < 0.3] <- NA
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
comp 1 comp 2 comp 3 comp 4 comp 5 comp 6 comp 7 comp 8 comp 9 comp 10 comp 11 comp 12 comp 13 comp 14 comp 15 comp 16 comp 17 comp 18 comp 19 comp 20
5 yr T-Notes US 0.93
10yr T-Notes 0.93
Treasury Bonds 0.86
2 yr T-Note US 0.85
Canadian Bond 0.79
Eurodollar 0.74 -0.45
Euro-Bund 0.43 0.67 0.44
Euro-Bobl 0.41 0.79
Gilts UK 0.39 0.55 0.47
Euro-Schatz 0.34 0.83
Japanese Yen 0.33 0.36
Euribor 0.87
Euroswiss 0.72
Swiss Franc 0.74
Euro 0.87
Gold 0.34 0.74
Canadian Dollar -0.61
JGB Japan 0.75
British Pound 0.74
Silver 0.32 0.73
Norwegian Krone 0.79
Kerosene 0.87
Sugar 0.67
Coffee 0.64
Orange Juice 0.98
Natural Gas 0.91
Euroyen 0.83
Singapore Dollar 0.70
Corn 0.72
Canola 0.77
NIKKEI 225 0.78
Soybean Meal 0.82
Lean Hoggs 0.99
Gas Oil 0.65 0.40
Platinum 0.69
Soybeans 0.90
Cocoa 0.87
Heating Oil 0.89
Hang Seng 0.78
New Zealand Dollar 0.73
Wheat 0.59 0.36
Soybean Oil 0.74
Brent Crude 0.90
Palladium 0.66
Aluminium 0.77
Zinc 0.81
Nickel 0.72
Gasoline 0.72
Copper LDN 0.84
Australian Dollar 0.72
Cotton 0.73
Lumber 0.98
Crude Oil 0.88
Copper NY 0.79
TSE Toronto 0.71
OMX 30 Stockholm 0.62
FTSE 100 UK 0.81
Russel 2000 E-Mini 0.79
CAC 40 France 0.85
DAX 30 0.82 0.34
Eurostoxx 0.85 0.30
Nasdaq 100 Mini 0.80
Dow Jones 0.85
SP500 E-Mini 0.30 0.89
+

Questions

+
    +
  1. How many principal components (“factors”) do we need to explain at least 50% of the variance in this data?
  2. +
  3. What are the highest weights (in absolute value) of the first principal component portfolio above on the 64 futures?
  4. +
  5. Can we interpret the first 10 components? How would you call these factors?
  6. +
  7. Can you now generate the principal components and scree plot using only: a) the pre-crisis bull market years (e.g. only using the data between November 1, 2002, and October 1, 2007)? b) the financial crisis years (e.g. only using the data between October 1, 2007 and March 1, 2009), (Hint: you can select subsets of the data using for example the command crisis_data = futures_data[ as.Date(rownames(futures_data)) > "2007-10-01" & as.Date(rownames(futures_data)) < "2009-03-01" , ])
  8. +
  9. Based on your analysis in question 3, please discuss any differences you observe about the futures returns during bull and bear markets. What implications may these results have? What do the results imply about how assets are correlated during bear years compared to bull years?
  10. +
+

Answers

+
    +
  • 6 factors are required to explain about 53% of the variance.
  • +
  • 5-yr and 10-yr Treasury notes, which both have a weight of 93%
  • +
  • The first 10 components derive sets of factors with common characteristics that can predict or explain the health of the economy. For example, Component 1 uses government bonds, Component 2 uses currency prices, Components 3&4 use stock indices, Component 8 uses commodities.
  • +
    1. +
    2. For the bull market years
    3. +
  • +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigenvalue Pct of explained variance Cumulative pct of explained variance
comp 1 11.19 17.49 17.49
comp 2 8.02 12.53 30.02
comp 3 4.26 6.65 36.67
comp 4 3.55 5.54 42.21
comp 5 3.22 5.02 47.23
comp 6 2.51 3.92 51.16
comp 7 2.16 3.38 54.54
comp 8 1.55 2.41 56.95
comp 9 1.45 2.27 59.22
comp 10 1.37 2.14 61.36
comp 11 1.22 1.90 63.26
comp 12 1.16 1.81 65.06
comp 13 1.06 1.65 66.72
comp 14 1.04 1.63 68.34
comp 15 1.03 1.60 69.95
comp 16 0.99 1.54 71.49
comp 17 0.95 1.48 72.97
comp 18 0.94 1.47 74.45
comp 19 0.90 1.40 75.85
comp 20 0.88 1.37 77.22
comp 21 0.84 1.32 78.54
comp 22 0.81 1.26 79.80
comp 23 0.78 1.22 81.03
comp 24 0.73 1.13 82.16
comp 25 0.71 1.10 83.26
comp 26 0.70 1.10 84.36
comp 27 0.67 1.05 85.41
comp 28 0.65 1.02 86.43
comp 29 0.62 0.96 87.40
comp 30 0.58 0.91 88.31
comp 31 0.55 0.86 89.16
comp 32 0.51 0.79 89.96
comp 33 0.47 0.74 90.69
comp 34 0.43 0.67 91.36
comp 35 0.41 0.64 92.00
comp 36 0.39 0.61 92.61
comp 37 0.38 0.60 93.21
comp 38 0.37 0.58 93.79
comp 39 0.35 0.54 94.33
comp 40 0.34 0.53 94.87
comp 41 0.31 0.48 95.35
comp 42 0.30 0.47 95.82
comp 43 0.28 0.44 96.26
comp 44 0.27 0.43 96.69
comp 45 0.23 0.35 97.04
comp 46 0.22 0.34 97.38
comp 47 0.21 0.32 97.70
comp 48 0.19 0.29 98.00
comp 49 0.17 0.27 98.27
comp 50 0.16 0.26 98.52
comp 51 0.16 0.24 98.77
comp 52 0.15 0.24 99.01
comp 53 0.11 0.17 99.17
comp 54 0.10 0.16 99.33
comp 55 0.08 0.13 99.46
comp 56 0.07 0.11 99.57
comp 57 0.07 0.11 99.68
comp 58 0.05 0.08 99.76
comp 59 0.04 0.07 99.83
comp 60 0.03 0.05 99.88
comp 61 0.03 0.04 99.92
comp 62 0.03 0.04 99.97
comp 63 0.01 0.02 99.99
comp 64 0.01 0.01 100.00
+

this generates a scree plot as follows

+
eigenvalues  <- Variance_Explained_Table[, "Eigenvalue"]
+
+ +
    +
  1. for the bear years,
  2. +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Eigenvalue Pct of explained variance Cumulative pct of explained variance
comp 1 19.06 29.78 29.78
comp 2 7.72 12.06 41.84
comp 3 3.87 6.04 47.88
comp 4 3.29 5.15 53.03
comp 5 2.45 3.83 56.85
comp 6 2.17 3.40 60.25
comp 7 2.02 3.16 63.41
comp 8 1.76 2.75 66.16
comp 9 1.48 2.32 68.47
comp 10 1.25 1.95 70.42
comp 11 1.13 1.76 72.19
comp 12 1.07 1.68 73.86
comp 13 1.01 1.57 75.44
comp 14 0.98 1.53 76.97
comp 15 0.89 1.39 78.36
comp 16 0.85 1.32 79.68
comp 17 0.77 1.20 80.88
comp 18 0.74 1.16 82.04
comp 19 0.70 1.09 83.14
comp 20 0.65 1.02 84.16
comp 21 0.63 0.98 85.14
comp 22 0.60 0.93 86.07
comp 23 0.56 0.87 86.94
comp 24 0.54 0.84 87.78
comp 25 0.50 0.78 88.56
comp 26 0.49 0.76 89.32
comp 27 0.46 0.71 90.04
comp 28 0.44 0.69 90.73
comp 29 0.43 0.68 91.41
comp 30 0.42 0.65 92.06
comp 31 0.40 0.62 92.68
comp 32 0.36 0.57 93.25
comp 33 0.34 0.54 93.79
comp 34 0.32 0.50 94.29
comp 35 0.30 0.47 94.76
comp 36 0.29 0.46 95.22
comp 37 0.28 0.43 95.65
comp 38 0.25 0.40 96.05
comp 39 0.23 0.36 96.41
comp 40 0.22 0.34 96.75
comp 41 0.21 0.32 97.07
comp 42 0.20 0.31 97.38
comp 43 0.18 0.29 97.67
comp 44 0.16 0.26 97.92
comp 45 0.15 0.23 98.16
comp 46 0.13 0.21 98.36
comp 47 0.12 0.19 98.55
comp 48 0.11 0.17 98.72
comp 49 0.11 0.17 98.89
comp 50 0.10 0.16 99.05
comp 51 0.08 0.13 99.18
comp 52 0.07 0.11 99.29
comp 53 0.07 0.11 99.40
comp 54 0.06 0.10 99.50
comp 55 0.06 0.09 99.59
comp 56 0.05 0.08 99.67
comp 57 0.05 0.07 99.74
comp 58 0.04 0.07 99.81
comp 59 0.03 0.05 99.86
comp 60 0.03 0.05 99.91
comp 61 0.02 0.03 99.94
comp 62 0.02 0.02 99.97
comp 63 0.01 0.02 99.98
comp 64 0.01 0.02 100.00
+

this generates a scree plot as follows

+
eigenvalues  <- Variance_Explained_Table[, "Eigenvalue"]
+
+ +
    +
  • Based on the analysis above, it would appear that bear markets feature fewer futures that trade succesfully, whereas in bull markets, more futures/industries flourish. This is inferred from the number of components required to explain at least 50% of variance. In bear markets, 4 components explain at least 50% of variance, whilst in bull markets, 6 components are required. This suggests that in bull markets, certain sectors lose their significant correlation with the results, since they are not doing well.
  • +
  • +
  • +
  • +
  • +
  • +
+
+
+

A Simple Futures Trend Following Strategy

+

We can now develop a simple futures trend following trading strategy, as outlined in the papers in the Exercise Introduction above. There are about $300 billion invested in such strategies! Of course we cannot develop here a sophisticated product, but with some more work…

+

We will do the following:

+
    +
  1. Calculate a number of moving averages of different “window lengths” for each of the 64 futures - there are many so called technical indicators one can use. We will use the “moving average” function ma for this (try for example to see what this returns ma(1:10,2) ).
  2. +
  3. Add the signs (can also use the actual moving average values of course - try it!) of these moving averages (as if they “vote”), and then scale this sum across all futures so that the sum of their (of the sum across all futures!) absolute value across all futures is 1 (hence we invest $1 every day - you see why?).
  4. +
  5. Then invest every day in each of the 64 an amount that is defined by the weights calculated in step 2, using however the weights calculated using data until 2 days ago (why 2 days and not 1 day?) - see the use of the helper function shift for this.
  6. +
  7. Finally see the performance of this strategy.
  8. +
+

Here is the code:

+
signal_used = 0 * futures_data  # just initialize the trading signal to be 0
+# Take many moving Average (MA) Signals and let them 'vote' with their sign
+# (+-1, e.g. long or short vote, for each signal)
+MAfreq <- seq(10, 250, by = 20)
+for (iter in 1:length(MAfreq)) signal_used = signal_used + sign(apply(futures_data, 
+    2, function(r) ma(r, MAfreq[iter])))
+# Now make sure we invest $1 every day (so the sum of the absolute values of
+# the weights is 1 every day)
+signal_used = t(apply(signal_used, 1, function(r) {
+    res = r
+    if (sum(abs(r)) != 0) 
+        res = r/sum(abs(r))
+    res
+}))
+colnames(signal_used) <- colnames(futures_data)
+# Now create the returns of the strategy for each futures time series
+strategy_by_future <- scrub(shift(signal_used, 2) * futures_data)  # signal 2 days ago
+# finally, this is our futures trend following strategy
+trading_strategy = apply(strategy_by_future, 1, sum)
+names(trading_strategy) <- rownames(futures_data)
+
+
+

Reporting the performance results

+

Let’s see how this strategy does:

+
+ +

Here is how this strategy has performed during this period:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Year
2001 0.61 1.55 1.81 -2.00 0.54 0.69 0.75 1.35 4.30 0.33 -2.26 -2.45 5.13
2002 0.20 -0.44 -2.61 1.01 0.39 1.72 2.06 1.65 3.38 -2.50 -1.27 3.07 6.64
2003 2.39 3.37 -2.85 -0.92 1.25 -1.25 0.73 -0.13 -0.33 4.23 0.10 3.10 9.86
2004 1.22 3.16 0.06 -1.66 -0.13 -1.40 3.00 -2.75 4.36 -0.77 0.98 -0.07 5.91
2005 -0.55 1.03 0.27 -2.03 -0.27 0.84 0.42 1.51 0.25 -1.05 2.17 0.30 2.86
2006 2.00 -0.87 2.05 3.85 -0.30 -1.63 -0.76 0.00 0.60 2.23 0.50 1.17 9.05
2007 0.13 -0.52 -0.96 1.69 0.01 0.77 -0.90 -1.28 3.15 1.81 -0.05 1.98 5.88
2008 2.52 5.71 -3.06 0.36 2.38 4.06 -4.41 -1.66 5.35 14.30 3.88 1.61 34.20
2009 1.23 2.07 -5.43 -2.20 -0.82 -0.93 1.92 3.00 0.12 0.39 2.02 0.91 2.01
2010 -3.39 0.19 3.88 1.10 -5.04 -2.45 -1.27 0.01 2.31 3.59 -1.06 6.41 3.75
2011 1.27 2.48 -1.58 2.63 -4.07 -2.15 0.58 -0.77 1.23 -4.67 0.63 -0.38 -5.01
2012 -0.94 0.20 0.34 -0.12 1.57 -1.80 1.35 -0.33 -0.74 -0.92 -0.36 0.13 -1.65
2013 1.29 -0.58 1.07 0.15 1.29 0.52 0.51 -0.72 0.14 0.42 1.29 0.44 5.96
2014 -1.12 0.80 -0.11 0.54 -0.41 -0.16 0.69 0.96 0.89 0.52 2.53 2.64 7.98
2015 1.77 -0.73 1.63 -2.32 0.39 -0.43 1.50 -1.70 1.17 1.18
+

How does this compare with existing CTA products such as this one from Societe Generale? (Note: one can easily achieve a correlation of more than 0.8 with this specific product - as well as with many other ones)

+
+Compare our strategy with this product +

Compare our strategy with this product

+
+

Questions

+
    +
  1. Can you describe in more detail what the code above does?
  2. +
  3. What happens if you use different moving average technical indicators in the code above? Please explore and report below the returns of a trading strategy you build. (Hint: check that the command line MAfreq<-seq(10,250,by=20) above does for example - but not only of course, the possibilities are endless)
  4. +
+

Answers

+

1. the code looks at futures returns over the specified window, and determines whether and how much of a future to short or long, based on the moving average return it has generated (positive or negative) over the window. It’s output is the trading strategy for each month, and results in the return plot that we see above. Compared to the SG strategy, it appears quite similar. 2. For example, if the moving average is done by 30s, and not 20s, the results become

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Year
2001 0.61 1.57 1.08 -2.32 0.84 0.28 0.55 1.24 4.48 0.48 -2.34 -2.36 3.96
2002 0.40 -0.63 -2.46 0.70 0.67 1.89 1.95 1.55 3.36 -2.23 -1.33 3.07 6.95
2003 2.15 3.15 -2.95 -0.98 1.04 -1.37 0.56 -0.25 -0.26 4.24 0.16 2.96 8.53
2004 1.09 3.16 0.19 -1.49 0.00 -1.40 2.51 -2.79 4.39 -0.79 1.30 -0.01 6.09
2005 -0.64 1.04 0.26 -1.97 -0.03 0.78 0.41 1.63 0.47 -0.88 2.18 0.33 3.57
2006 2.16 -0.84 1.89 3.60 -0.40 -1.51 -0.69 -0.13 0.71 2.03 0.45 1.06 8.52
2007 0.18 -0.69 -0.67 1.68 0.12 0.68 -0.84 -1.42 3.02 1.67 -0.05 2.18 5.90
2008 2.83 5.87 -2.98 0.51 2.17 3.93 -4.05 -1.42 4.95 13.99 3.72 1.92 34.84
2009 1.11 2.30 -5.87 -1.70 -1.12 -0.39 2.32 2.78 0.04 0.64 1.95 0.69 2.46
2010 -3.21 -0.24 3.86 1.00 -5.01 -2.92 -1.34 0.29 2.97 3.46 -0.85 6.35 3.84
2011 1.16 2.47 -1.77 2.61 -3.72 -2.28 1.10 -0.23 1.95 -4.41 0.56 -0.09 -2.92
2012 -0.72 0.14 0.00 -0.44 1.55 -1.64 0.98 -0.17 -0.83 -1.03 -0.02 0.38 -1.83
2013 1.27 -0.62 1.05 0.35 1.32 0.11 0.37 -0.73 0.03 0.34 1.41 0.49 5.47
2014 -1.17 0.82 -0.25 0.60 -0.29 -0.19 0.56 0.74 0.86 0.61 2.45 2.89 7.80
2015 1.95 -0.34 1.67 -2.30 0.44 -0.65 1.29 -1.43 1.44 2.00
+

The results appear quite similar to the previous strategy, but with different magnitudes of return

+
    +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
+

A class competition

+

Now you have seen how to develop some trading strategies that hedge funds have been using for centuries. Clearly this is only the very first step - as many of the online resources on technical indicators also suggest. Can you now explore more such strategies? How good a futures trend following hedge fund strategy can you develop? Let’s call this…. a class competition! Explore as much as you can and report your best strategy as we move along the course…

+

Here is for example something that can be achieved relatively easily…

+
+ +

Here is how this strategy has performed during this period:

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Year
2001 0.00 0.00 0.68 -1.00 0.02 -0.05 0.60 0.95 2.41 1.25 -2.21 -0.98 1.59
2002 -0.56 -0.18 -0.81 0.21 1.09 1.92 1.85 1.25 1.75 -0.93 -0.68 2.76 7.85
2003 1.33 1.53 -0.83 0.12 1.86 -0.90 -0.31 -0.20 -0.03 1.98 0.09 1.82 6.58
2004 0.76 1.90 -0.07 -1.83 -0.19 -0.32 0.33 -1.02 1.32 0.19 1.33 0.26 2.62
2005 -0.36 0.37 0.02 -0.70 0.51 0.93 0.13 0.17 0.69 -0.04 1.55 0.41 3.72
2006 1.21 -0.04 2.10 2.03 -0.42 -0.17 -0.89 -0.54 -0.15 0.95 0.71 0.73 5.61
2007 0.39 -0.98 -0.08 1.70 1.18 1.33 -1.27 -2.41 2.01 1.11 0.29 0.67 3.92
2008 2.60 2.96 -0.98 -0.37 0.69 1.68 -1.97 -0.14 1.78 4.35 1.62 0.73 13.57
2009 0.05 0.72 -1.36 -1.15 0.41 -0.73 0.88 0.83 0.71 -0.14 1.64 -0.63 1.19
2010 -1.26 0.47 1.34 0.77 -1.30 -0.49 -0.45 1.10 1.04 1.67 -0.89 2.38 4.38
2011 0.58 1.16 -0.69 1.74 -1.71 -1.50 0.98 0.64 0.81 -1.86 0.46 0.39 0.93
2012 -0.29 -0.15 -0.05 -0.10 1.27 -1.08 0.66 -0.25 -0.22 -0.77 -0.18 -0.13 -1.31
2013 1.09 -0.98 0.82 -0.03 0.72 0.85 0.20 -0.26 0.12 0.23 0.90 1.01 4.73
2014 -1.33 0.46 -0.12 0.06 0.32 0.42 0.01 1.15 1.85 0.68 2.07 1.49 7.24
2015 2.17 -0.30 1.10 -1.49 0.27 0.04 0.40 -0.77 0.73 2.11
+

As always, have fun

+
+ + + +
+
+ +
+ + + + + + + +