是help中的一段代码,运行没有问题,但是经济学上的含义我就不太明白了。
有关平滑样条法可变惩罚项问题。
代码如下:
%Load the data:
%load ukdata20080430
%Convert repo rates to be equivalent zero coupon bonds:
RepoCouponRate = repmat(0,size(RepoRates));
RepoPrice = bndprice(RepoRates, RepoCouponRate, RepoSettle, RepoMaturity);
%Aggregate the data:
Settle = [RepoSettle;BondSettle];
Maturity = [RepoMaturity;BondMaturity];
CleanPrice = [RepoPrice;BondCleanPrice];
CouponRate = [RepoCouponRate;BondCouponRate];
Instruments = [Settle Maturity CleanPrice CouponRate];
InstrumentPeriod = [repmat(0,6,1);repmat(2,31,1)];
CurveSettle = datenum('30-Apr-2008');
%Choose parameters for Lambdafun:
L = 9.2;
S = -1;
mu = 1;
%Define the Lambdafun penalty function:
lambdafun = @(t) exp(L - (L-S)*exp(-t/mu));
t = 0:.1:25;
y = lambdafun(t);
figure
semilogy(t,y);
title('Penalty Function for VRP Approach')
ylabel('Penalty')
xlabel('Time')
就是红色部分,是一个惩罚函数,但是我不清楚这个函数形式是怎么得来的。看了好多文献,他们所使用的VRP似乎更复杂。
请高手帮忙解答一下吧,非常感谢。