Today's Agenda

1. Review seven steps for model building
2. Derive probability density function using bootstrap method

Seven Steps

1. task
2. data and representation
3. model class
4. objectives (in sample)
5. search, optimization
6. evaluation (out of sample)
7. analysis

Bayesian Method

Update probability density function based on new information. (posterior vs. prior)

Bootstrap, a different approach

Example, DJIA and SP500 price data are correlated.
    plot(DateSpDj(:,2), DateSpDj(:,3))
What can we learn from the plot?
The curve follows a linear, then shift, then linear, ........ pattern. Why?
Not: weighting of stock in the indices changes.
But: at drops,  DJIA dropped more points than SP500 did!

The DJIA and SP500 returns are highlycorrelated.
    plot(SPr, DJr)
 

Obtain the distribution of the correlation using a bootstrap

For the DJIA and SP500 data, sample with replacement N times and get N pairs of data, compute their correlation coefficient
    L=length(SPr);
    cor = [];
    for i=1:1000
        set=ceil(L*rand(1,L));
        temp=corrcof(SPr(set), DJr(set));
        cor=[cor, temp(2,1)];
    end

Plot the distribution
    hist(cor, 40);