Download LINGO - TStat

Transcript
STOCHASTIC PROGRAMMING
683
Next, we have the core model. You will recall that the core model is the model we would construct if
the random variables were know with certainty.
! Core Model -------------------------------------------+;
NP = @SIZE( PERIODS); ! Number of periods;
! Maximize the present value of the option in period 0;
[R_OBJ] MAX = WLTH( NP)/( 1 + RISK_FREE_RATE) ^ ( NP - 1);
! Compute stock's price in each period;
[R_PRICE_INIT] PRICE( 1) = INIT_PRICE;
@FOR( PERIODS( P) | P #GT# 1:
[R_PRICE] PRICE( P) = PRICE( P - 1) * ( 1 + RETURN( P));
);
! Calculate our compounded wealth in each period;
[R_PV_1] WLTH( 1) =
SELL( 1) *
( STRIKE_PRICE - PRICE( 1));
@FOR( PERIODS( P) | P #GT# 1:
[R_PV] WLTH( P) = SELL( P) * ( STRIKE_PRICE - PRICE( P)) +
WLTH( P - 1) * ( 1 + RISK_FREE_RATE);
);
! Can't sell more than we have;
[R_SELL_EQ_1] @SUM( PERIODS( P): SELL( P)) <= 1;
! Random variables not allowed in initial period;
[R_RETURN_P0] RETURN( 1) = 0;
Core Model for Stock Option Example
As mentioned, our objective is to maximize the present value of the option in the initial period, which
will tell us the maximum we should be willing to pay for the option. To compute the present value in
period 0, we discount wealth in the final period back to the initial period using the risk-free rate:
! Maximize the present value of the option in period 0;
[R_OBJ] MAX = WLTH( NP)/( 1 + RISK_FREE_RATE) ^ ( NP - 1);
where NP is the number of periods, calculated using the @SIZE function:
NP = @SIZE( PERIODS); ! Number of periods;
Technically, NP is actually equal to the number of periods plus 1, due to P0 being part of the
PERIODS set. So, when we discount wealth, we discount by NP - 1 periods as opposed to NP periods.
In the next section of the core model we compute wealth in each period: