case study1
https://zhuanlan.zhihu.com/p/139262608#
利率衍生品定价的基础内容回顾
Q1(Effective return)
info

two ways to calculate the average of return
1)arithmetic average
2) geometric average
Head:
Tom and Amy both bought a 20-year pension with different return schemes. Tom’s pension has first year interest rate of 3% and will increase by 0.5% every year whilst Amy’s pension has a continuous interest rate of 7%. Both pension pays the interest annually. Compare the benefits of the two pensions by computing their effective rates of return.
%% Solution:
InterestR_Tom=[3:0.5:12.5]/100;
EffectiveR_Tom=(prod(1+[3:0.5:12.5]/100))^(1/20)-1;% 用平均来算
EffectiveR_Tom=prod(
EffectiveR_AMY=exp(0.07)-1;
if EffectiveR_Tom>EffectiveR_AMY
disp('The pension of Tom has higher effective rate')
elseif EffectiveR_Tom<EffectiveR_AMY
disp('The pension of Amy has higher effective rate')
else
disp('The effective rates are equal')
end
Q2(Duration and convexity)
info
wirte a user_defined matlab-code and call it
function [Price,duration,convexity] = DurationConvexity(Face,Coupon,Maturity,yield)
% BondPrice, Duration and Convexity
Time=0.5:0.5:Maturity; % time for payments
C = 0.5*Coupon*Face; % one coupon payment
Price = sum(C*exp(-yield*Time)) + Face*exp(-yield*Maturity);
duration= sum( (C* Time.* exp(-yield*Time) )/ Price )+Face*Maturity*exp(-yield*Maturity)/Price;
convexity = sum( (C.* (Time.

该博客详细介绍了金融量化分析中的关键概念,包括有效回报的比较(算术平均与几何平均)、债券组合的久期和凸度计算、利用bootstrapping方法求解零息率及其对投资组合的影响,以及如何构建目标回报下的最小方差投资组合。通过MATLAB代码实现相关计算,并对比不同方法的近似结果。
2万+

被折叠的 条评论
为什么被折叠?



