MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mean and covariance matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82512] Re: Mean and covariance matrix
  • From: antononcube <antononcube at gmail.com>
  • Date: Tue, 23 Oct 2007 05:28:55 -0400 (EDT)
  • References: <ffckmh$sog$1@smc.vnet.net>

How does your code look like? If something like this:

In[24]:= GEData = FinancialData["GE", "Return", {{2000, 1, 1}, {2007,
10, 17}}];
In[25]:= GEReturns = #[[2]] & /@ GEData;

In[26]:= VectorQ[GEReturns, NumberQ]
Out[26]= True

In[27]:= Mean[GEReturns]
Out[27]= -0.000186615

, then the result of Mean is expected.

Anton Antonov,
Wolfram Research, Inc.



On Oct 20, 5:18 am, KTugb... at gmail.com wrote:
> Using FinancialData[],
>
> 1.Download the price data of GE needed to compute daily returns for
> any trading days from {2000, 1, 1} to {2007, 10, 17}, inclusive, and
> then compute the daily returns.
>
> 2.Using the return data compute a raw mean vector and covariance
> matrix.
>
> I was able to do part 1,but i am not too sure if I did question 2
> correctly.
>
> For the mean,I said
>
> Mean[GEData], and I got a number instead of a vector. I did the same
> for the Covariance, and I got a single number instead of a vector. Can
> someone please tell me if I am not doing it the right way?




  • Prev by Date: Re: How to create an animation of a rotating rectangle?
  • Next by Date: Re: Problem showing a column object beside a graph using GraphicsGrid
  • Previous by thread: Mean and covariance matrix
  • Next by thread: Re: Mean and covariance matrix