I have montly macroeconomic data series and I am planning to use them for a weekly (every Monday) regression analysis. How can I match a data point which release once a month to my date template( 4 times during that month) since the new point release and so on.
for u=2:size(daily,1)
l=find(dailytemplate(u)==monthly)
%# when the monthly date is not equal to my daily template
if isempty(l)
%# I need a clearver code for this part to find the previous release
dailyclose(u)=dailyclose(u-1)
else
dailyclose(u)=monthlyclose(l)
end
end
UPDATE from comment
I have the following monthly macro data. I want to use them to feed the weekly dates. For example, at March 31/03/2012 the M-input
was 2.7
. So any weekly date after that date should be
W_output=2.7
until the April 30/04/2012. Then the weekly W_output
will be 2.3
which is the new monthly point, M_input
. The following table provides examples for the weekly W_ouput
and monthly M_Input
:
08/06/2012 1.7
30/06/2012 1.7
01/06/2012 1.7
31/05/2012 1.7
25/05/2012 2.3
30/04/2012 2.3
18/05/2012 2.3
31/03/2012 2.7
11/05/2012 2.3
29/02/2012 2.9
04/05/2012 2.3
31/01/2012 2.9
27/04/2012 2.7
31/12/2011 3
20/04/2012 2.7