<div>Hi,</div><div><br></div><div>I'm a data analyst new to the world of quantiative finance. I have at my access a large history of performance data for around 150,000 different automated trading systems. I have minute by minute data starting from 2003 to present.</div>
<div><br></div><div>One of the first thing's I'm trying to do is compare the daily performance data of a subset of a few hundred of the total number of systems to a baseline metric, call it MetricX.</div><div><br>
</div><div>My question is twofold, the first part about being more math-centric and the 2nd part being R based.</div><div><br></div><div>1st part:</div><div><br></div><div>I want a measure of the relation between a system and MetricX.</div>
<div>What would your first step be to see which systems have any kind of relationship with MetricX?</div><div> </div><div>2nd part:</div><div>how would you perform the above analysis using R? Are there particular libraries that would simplify this analysis?</div>
<div> </div><div>As an example of what I'm trying to do, see the code and graphs below. The red line is MetricX, and the four plots are different systems. I am looking for a way to find which systems have the strongest relationship wiht MetricX, and the ones that have the weakest relationship with MetricX.</div>
<div><br></div><div>Thanks in advance, </div><div>EHL</div><div><br></div><div><div>require(ggplot2)</div><div>require(plyr)</div><div>set.seed(786)</div><div>n <- 100</div><div>sys1 <- rnorm(n, mean=100, sd=10) </div>
<div>sys2 <- rnorm(n, mean=80, sd=50)</div><div>sys3 <- rnorm(n, mean=120, sd=10)</div><div>sys4 <- rnorm(n, mean=90, sd=5)</div><div>date <- seq(1, n)</div><div>metricX <- 50*(sin(0.1*date)) + 100</div><div>
temp_df <- data.frame(sys1, sys2, sys3, sys4, date, metricX)</div><div>df <- melt(temp_df, id=c("date", "metricX"))</div><div>p <- ggplot(df, aes(x=date, y=value)) + geom_line() + facet_wrap("variable")</div>
<div>p <- p + geom_line(aes(x=date, y=metricX), colour="red", size=1.0)</div><div>p</div></div><div><br></div><div><br></div>