me huong tra
New Member
- Joined
- Aug 6, 2011
- Messages
- 5
Hi every one,
I am doing my thesis in financial studies. I have to run a regression of stock index return against rating changes to see their relationship. The problem is I have data input as table, but I need it to be a list so I can run the regression. There are weekly data of 22 countries over 10,5 years resulting in a total of 12000 observations. It is a really huge work for me to transform it manually. I really appreciate if someone could help me. Thanks a lot
I want to attach my data for everyone to take a look but I don't know how to do it I'm a dummy
INPUT
I have 2 files. The first one is index and the second one is rating.
Index return:
<table style="border-collapse: collapse; width: 288pt;" width="384" border="0" cellpadding="0" cellspacing="0"> <col style="width: 48pt;" width="64" span="6"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl25" style="height: 12.75pt; width: 48pt;" width="64" height="17">Date
</td> <td class="xl25" style="width: 48pt;" width="64"> Argentina</td><td class="xl25" style="width: 48pt;" width="64">
</td> <td class="xl24" style="width: 48pt;" width="64">Brazil</td> <td class="xl24" style="width: 48pt;" width="64">China</td> <td class="xl24" style="width: 48pt;" width="64"> Egypt</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">1/1/2001</td> <td class="xl27"> 0.05</td> <td class="xl26">
</td> <td class="xl26">0.05
</td> <td class="xl26">0.07
</td> <td class="xl26"> 0.1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">2/1/2001
</td> <td class="xl27"> 0.06</td> <td class="xl26">
</td> <td class="xl26">-0.04
</td> <td class="xl26">0.07
</td> <td class="xl26"> 0.09</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">3/1/2001</td> <td class="xl27"> -0.03
</td> <td class="xl26">
</td> <td class="xl26">0.03
</td> <td class="xl26">-0.05
</td> <td class="xl26"> -0.08</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">4/1/2001
</td> <td class="xl27"> 0.07</td> <td class="xl26">
</td> <td class="xl26">0.06
</td> <td class="xl26">0.12
</td> <td class="xl26"> 0.09</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">
</td></tr></tbody> </table>
Rating change:
<table style="border-collapse: collapse; width: 288pt;" width="384" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="6"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl25" style="height: 12.75pt; width: 48pt;" width="64" height="17">Date
</td> <td valign="top">
</td><td class="xl25" style="width: 48pt;" width="64">Argentina</td><td class="xl25" style="width: 48pt;" width="64">
</td> <td class="xl24" style="width: 48pt;" width="64">Brazil</td> <td class="xl24" style="width: 48pt;" width="64">China</td> <td class="xl24" style="width: 48pt;" width="64"> Egypt</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">1/1/2001</td> <td valign="top">
</td><td class="xl27">0</td> <td class="xl26">
</td> <td class="xl26">0
</td> <td class="xl26">0
</td> <td class="xl26"> 0</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">2/1/2001
</td> <td valign="top">
</td><td class="xl27">0</td> <td class="xl26">
</td> <td class="xl26">0
</td> <td class="xl26">0
</td> <td class="xl26"> 1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">3/1/2001</td> <td valign="top">
</td><td class="xl27">-0.3</td> <td class="xl26">
</td> <td class="xl26">0
</td> <td class="xl26">0.3
</td> <td class="xl26"> 0</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">4/1/2001
</td> <td valign="top">
</td><td class="xl27">0</td> <td class="xl26">
</td> <td class="xl26">+0.7
</td> <td class="xl26">0
</td> <td class="xl26"> 0</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">
</td> <td valign="top">
</td><td class="xl27">
</td> <td class="xl26">
</td> <td class="xl26">
</td> <td class="xl26">
</td></tr></tbody></table>DESIRED OUTPUT
I have to combine 2 file into one list as below
<table width="384" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td></tr> </tbody></table><table width="384" border="0" cellpadding="0" cellspacing="0"><tbody><tr style="height: 12.75pt;" height="17"> <td class="xl25">Date</td> <td class="xl25">Country
</td> <td class="xl25">Index</td> <td class="xl25">rating change
</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">1/1/2001</td> <td class="xl26"> Argentina</td> <td class="xl26">0.05
</td> <td class="xl26">0</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">2/1/2001</td> <td class="xl26">Argentina
</td> <td class="xl26">0.06</td> <td class="xl26">0
</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">3/1/2001</td> <td class="xl26">Argentina</td> <td class="xl26">-0.03</td> <td class="xl26">-0.3</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">4/1/2001</td> <td class="xl26">Argentina</td> <td class="xl26">0.07</td> <td class="xl26">0</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">1/1/2001</td> <td class="xl26">Brazil
</td> <td class="xl26">0.05</td> <td class="xl26">0</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">2/1/2001</td> <td class="xl26">Brazil
</td> <td class="xl26">-0.04</td> <td class="xl26">0</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">3/1/2001</td> <td class="xl26">Brazil</td> <td class="xl26">0.03</td> <td class="xl26">4</td></tr></tbody></table><table width="384" border="0" cellpadding="0" cellspacing="0"><tbody> </tbody></table>
<table width="384" border="0" cellpadding="0" cellspacing="0" height="36"><tbody> </tbody></table>
I am doing my thesis in financial studies. I have to run a regression of stock index return against rating changes to see their relationship. The problem is I have data input as table, but I need it to be a list so I can run the regression. There are weekly data of 22 countries over 10,5 years resulting in a total of 12000 observations. It is a really huge work for me to transform it manually. I really appreciate if someone could help me. Thanks a lot
I want to attach my data for everyone to take a look but I don't know how to do it I'm a dummy
INPUT
I have 2 files. The first one is index and the second one is rating.
Index return:
<table style="border-collapse: collapse; width: 288pt;" width="384" border="0" cellpadding="0" cellspacing="0"> <col style="width: 48pt;" width="64" span="6"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl25" style="height: 12.75pt; width: 48pt;" width="64" height="17">Date
</td> <td class="xl25" style="width: 48pt;" width="64"> Argentina</td><td class="xl25" style="width: 48pt;" width="64">
</td> <td class="xl24" style="width: 48pt;" width="64">Brazil</td> <td class="xl24" style="width: 48pt;" width="64">China</td> <td class="xl24" style="width: 48pt;" width="64"> Egypt</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">1/1/2001</td> <td class="xl27"> 0.05</td> <td class="xl26">
</td> <td class="xl26">0.05
</td> <td class="xl26">0.07
</td> <td class="xl26"> 0.1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">2/1/2001
</td> <td class="xl27"> 0.06</td> <td class="xl26">
</td> <td class="xl26">-0.04
</td> <td class="xl26">0.07
</td> <td class="xl26"> 0.09</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">3/1/2001</td> <td class="xl27"> -0.03
</td> <td class="xl26">
</td> <td class="xl26">0.03
</td> <td class="xl26">-0.05
</td> <td class="xl26"> -0.08</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">4/1/2001
</td> <td class="xl27"> 0.07</td> <td class="xl26">
</td> <td class="xl26">0.06
</td> <td class="xl26">0.12
</td> <td class="xl26"> 0.09</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">
</td></tr></tbody> </table>
Rating change:
<table style="border-collapse: collapse; width: 288pt;" width="384" border="0" cellpadding="0" cellspacing="0"><col style="width: 48pt;" width="64" span="6"> <tbody><tr style="height: 12.75pt;" height="17"> <td class="xl25" style="height: 12.75pt; width: 48pt;" width="64" height="17">Date
</td> <td valign="top">
</td><td class="xl25" style="width: 48pt;" width="64">Argentina</td><td class="xl25" style="width: 48pt;" width="64">
</td> <td class="xl24" style="width: 48pt;" width="64">Brazil</td> <td class="xl24" style="width: 48pt;" width="64">China</td> <td class="xl24" style="width: 48pt;" width="64"> Egypt</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">1/1/2001</td> <td valign="top">
</td><td class="xl27">0</td> <td class="xl26">
</td> <td class="xl26">0
</td> <td class="xl26">0
</td> <td class="xl26"> 0</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">2/1/2001
</td> <td valign="top">
</td><td class="xl27">0</td> <td class="xl26">
</td> <td class="xl26">0
</td> <td class="xl26">0
</td> <td class="xl26"> 1</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">3/1/2001</td> <td valign="top">
</td><td class="xl27">-0.3</td> <td class="xl26">
</td> <td class="xl26">0
</td> <td class="xl26">0.3
</td> <td class="xl26"> 0</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">4/1/2001
</td> <td valign="top">
</td><td class="xl27">0</td> <td class="xl26">
</td> <td class="xl26">+0.7
</td> <td class="xl26">0
</td> <td class="xl26"> 0</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl26" style="height: 12.75pt;" height="17">
</td> <td valign="top">
</td><td class="xl27">
</td> <td class="xl26">
</td> <td class="xl26">
</td> <td class="xl26">
</td></tr></tbody></table>DESIRED OUTPUT
I have to combine 2 file into one list as below
<table width="384" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td><td valign="top">
</td></tr> </tbody></table><table width="384" border="0" cellpadding="0" cellspacing="0"><tbody><tr style="height: 12.75pt;" height="17"> <td class="xl25">Date</td> <td class="xl25">Country
</td> <td class="xl25">Index</td> <td class="xl25">rating change
</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">1/1/2001</td> <td class="xl26"> Argentina</td> <td class="xl26">0.05
</td> <td class="xl26">0</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">2/1/2001</td> <td class="xl26">Argentina
</td> <td class="xl26">0.06</td> <td class="xl26">0
</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">3/1/2001</td> <td class="xl26">Argentina</td> <td class="xl26">-0.03</td> <td class="xl26">-0.3</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">4/1/2001</td> <td class="xl26">Argentina</td> <td class="xl26">0.07</td> <td class="xl26">0</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">1/1/2001</td> <td class="xl26">Brazil
</td> <td class="xl26">0.05</td> <td class="xl26">0</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">2/1/2001</td> <td class="xl26">Brazil
</td> <td class="xl26">-0.04</td> <td class="xl26">0</td> <td class="xl26">
</td> </tr> <tr style="height: 12.75pt;" height="17"> <td class="xl27">3/1/2001</td> <td class="xl26">Brazil</td> <td class="xl26">0.03</td> <td class="xl26">4</td></tr></tbody></table><table width="384" border="0" cellpadding="0" cellspacing="0"><tbody> </tbody></table>
<table width="384" border="0" cellpadding="0" cellspacing="0" height="36"><tbody> </tbody></table>