当前位置: 代码迷 >> 综合 >> 【金融量化分析】#HW2 (Effective return;Duration and convexity;bootstrap method; minimum variance portfolios)
  详细解决方案

【金融量化分析】#HW2 (Effective return;Duration and convexity;bootstrap method; minimum variance portfolios)

热度:15   发布时间:2023-12-11 22:44:24.0

case study1

  • Q1(Effective return)
    • info
  • Q2(Duration and convexity)
    • info
  • Q3(bootstrap and related rates)
  • Q4( The minimum variance portfolios for target returns)
    • Info

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_AMYdisp('The pension of Tom has higher effective rate')
elseif EffectiveR_Tom<EffectiveR_AMYdisp('The pension of Amy has higher effective rate')
elsedisp('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 ConvexityTime=0.5:0.5:Maturity; % time for paymentsC = 0.5*Coupon*Face; % one coupon paymentPrice = sum(C*exp(-yield*Time)) + Face*exp(-yield*Maturity);duration= sum( (C* Time.* exp(-yield*Time) )/ Price )+Fa
  相关解决方案