Date=date
A, B, C are closing prices for stocks A,B, and C respectively.
How can I write a simple program to do the following:
(I) calculate the 10 day rolling returns
(II) caclulate a ratio=10day rollign returns/std. dev.
(II) loop so as to repeat this caclulation across other variables (B,C,
etc.)
Thank you!
kj
date A B C
05 Aug 05 43.34 45.27 33.52
04 Aug 05 43.83 45.46 34.06
03 Aug 05 44.55 46.11 34.51
02 Aug 05 44.75 46.51 33.88
01 Aug 05 43.61 44.93 33.3299
29 Jul 05 41.78 45.15 33.34
28 Jul 05 42.02 45.68 34.01
27 Jul 05 41.99 43.65 34.29
26 Jul 05 40.42 37.74 34.15
25 Jul 05 40.88 37.95 33.85
22 Jul 05 41.02 37.95 33.53
.
.
.
21 Jul 03 42.1 37.95 32.94