system {
    base "15 Jan 2000"
}

// The same four US Treasury bonds that
// were used to calibrate the Vasicek
// model:

claim a1 {
    type ust_bond,
    maturity "15 Jan 2005",
    settlement identity,
    principal 100,
    coupon 4.5,
    price 98
}

claim a2 {
    type ust_bond,
    maturity "15 Jan 2007",
    settlement identity,
    principal 100,
    coupon 4.5,
    price 100
}

claim a3 {
    type ust_bond,
    maturity "15 Jan 2010",
    settlement identity,
    principal 100,
    coupon 5,
    price 100
}

claim a4 {
    type ust_bond,
    maturity "15 Jan 2030",
    settlement identity,
    principal 100,
    coupon 5.5,
    price 105
}

portfolio p1 {
    a1 long,
    a2 long,
    a3 long,
    a4 long
}

// Include the calibration results of example 2.

include "bootstrap02.txt"

// Re-create the model. Note that b1 is
// defined in bootstrap02.txt

factor r {
}

model m1 {
    type vasicek,
    days_per_year 365,
    factor r sigma 0.01 theta 1.0 alpha 1.0,
    initial 0.05,
    mean b1
}

// Include the calibration results of example 2.

include "pathspace02.txt"

// Re-price the benchmark bonds. Note that
// pathspace t1 is defined in pathspace02.txt.

evaluate {
    portfolio p1,
    model m1,
    path_space t1
}
