Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: how to merge three dataset to facilitate subsequent calculation

From   "Darren White" <>
To   "" <>
Subject   Re: st: how to merge three dataset to facilitate subsequent calculation
Date   Tue, 16 Apr 2013 14:53:56 +1000

Hi Mengjia

This may not be your answer but data merging can be achieved by using
the function in the menu/data/combine datasets/ (list of merging

The dialogue windows are pretty strait-forward.


>>> 李 梦佳<> 4/16/2013 2:46 pm >>>
Dear statalist,

I want to replicate Huang, Sialm, Zhang (JF, 2012) to use" risk
shifting" to measure mutual fund's risk taking. To start with, I need to
calculate the holdings return (RHf,t)of mutual fund and its volatility
(sigma). As the authors point out, it's easier to first calculate the
holdings return of the past 36 months and then use these values to reach
the sigma. For each fund i at each month t in the past 36 month:

RH i,t= si * Rstockt + b1*Rbondt + ci*Rcasht
         = si * sum(Rstockj,t * pj,t) + b1*Rbondt + ci*Rcasht

I've collected the data needed in calculation but they exist in 3
different files whose structures are like the following:

(1) Asset composition file: (where si+bi+ci=100%)
Fund|stock%|bond%|cash%| Time

(2) Stock Holding file: (where for each Fund at each time, sum of the
second column equals 100%)
Fund|stockholding|%of all stock|Time

(3) Stock Return File:
stocknnn 2010-12  rnnn

How can I "merge" (probably not appropriate term here) these 3 data set
to calculate the RH and its volatility (sigma) using the RHs of past 36

Many thanks and best regards,

*   For searches and help try:

This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited.  The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email.  You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index