% First project (exercise 24)
disp("First project")
CF=[-100000,    % investment at year 0
    10000,      % collect at year 1
    20000,      % collect at year 2
    30000,      % collect at year 3
    40000,      % collect at year 4
    50000]      % collect at year 5
i=irr(CF)

% Second project (slide on page 48)
disp("Second project")
CF = [-30 10 25]
T = ["01/01/2000"; "01/01/2001"; "07/01/2001"]
i = xirr(CF, T)