Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Correlation between stocks


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: Correlation between stocks
Date   Thu, 6 Sep 2012 09:24:56 +0100

You must -reshape- first to get different stock values as variables.

. reshape wide value , i(date) j(stock) string

Nick

On Thu, Sep 6, 2012 at 9:11 AM, André Gyllenram <[email protected]> wrote:
>
>
> Hello,
>
>
>
> I want to compute the correlation
> between different stocks. My data is in this format:
>
>
>
> STOCK      VALUE     DATE
>
> Stock1       7       20000101
>
> Stock1       9       20000102
>
> Stock2       19      20000101
>
> Stock2       66      20000102
>
> Stock3       44      20000101
>
> Stock3       88      20000102
>
> Stock183     55      20000101
>
> Stock183     51      20000102
>
>
>
>
> I want to compute the correlation between Stock1 and
> Stock2,  Stock1 and Stock3, Stock3 and Stock2 and so on. Anyone knows how
> to do this?
>
>
>
> Kind regards
>
> Andre Gyllenram
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index