Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

protective put protective call

%protective put %protective call


clear; p = 2; %權利金
p = 2; %權利金 X = 100;
X = 100; S0 = 90:1:110;
S0 = 90:1:110; figure(2);
figure(1); plot(S0,100-S0,'--'); % short S
plot(S0,S0-100,'--'); % long S hold on;
hold on; plot(S0,max(S0 - X,0) - p,'.');
plot(S0,max(X-S0,0)-p,'.'); %long %long call
put plot(S0,100-S0+max(S0 - X,0) -
plot(S0,S0-100+max(X-S0,0)-p); p);
grid on; grid on;
title('protective put'); title('protective call');
xlabel('S0'); xlabel('S0');
ylabel('profit'); ylabel('profit');
covered call covered put
%covered call %covered put
clear; clear;
c = 2; c = 6;
X = 105; X = 105;
S0 = 92:1:112; S0 = 92:1:112;
figure(1); figure(2);
plot(S0,S0-100,'--'); % long S plot(S0,100-S0,'--'); % short S
hold on; hold on;
plot(S0,-(max(S0-X,0)-c),'.'); % plot(S0,-(max(X-S0,0)-c),'.'); %
short call short put
plot(S0,S0-100-(max(S0-X,0)-c)); plot(S0,100-S0-(max(X-S0,0)-c));
grid on; grid on;
title('covered call'); title('covered put');
xlabel('S0'); xlabel('S0');
ylabel('profit'); ylabel('profit');
Bull spread - call
%Bull spread - call
clear;
c1 = 3;
c2 = 1;
X1 = 100;
X2 = 105;
S0 = 95:1:110;
figure(1);
plot(S0,max(S0-X1,0)-c1,'--'); %long c(X1)
hold on;
plot(S0,-(max(S0-X2,0)-c2),'.'); %short c(X2)
plot(S0,max(S0-X1,0)-c1-(max(S0-X2,0)-c2));
grid on;
title('bull spread(call)');
xlabel('S0');
ylabel('profit');
plot(S0,zeros(1,16),'black');
bull spread - call 正收益 bull spread - call 負收益
%bull spread - call 應付錢但未付反而收錢 %bull spread - call c1-c2 大於k2-k1
clear; clear;
c1 = 1; c1 = 7;
c2 = 3; c2 = 1;
X1 = 100; X1 = 100;
X2 = 105; X2 = 105;
S0 = 95:1:110; S0 = 95:1:110;
figure(2); figure(3);
plot(S0,max(S0-X1,0)-c1, '--'); %long plot(S0,max(S0-X1,0)-c1, '--'); %long
c(X1) c(X1)
hold on; hold on;
plot(S0,-(max(S0-X2,0)-c2), '.'); plot(S0,-(max(S0-X2,0)-c2), '.');
%short c(X2) %short c(X2)
plot(S0,max(S0-X1,0)-c1-(max(S0-X2,0) plot(S0,max(S0-X1,0)-c1-(max(S0-X2,0)
-c2)); -c2));
grid on; grid on;
title('bull spread(call)' ); title('bull spread' );
xlabel('S0'); xlabel('S0');
ylabel('profit' ); ylabel('profit' );
plot(S0,zeros(1,16), 'black'); plot(S0,zeros(1,16), 'black');
Bull spread - put
%bull spread - put
clear;
c1 = 1;
c2 = 3;
X1 = 100;
X2 = 105;
S0 = 95:1:110;
plot(S0,max(X1-S0,0)-c1, '--'); %long p(X1)
hold on;
plot(S0,-(max(X2-S0,0)-c2), '.'); %short p(X2)
plot(S0,max(X1-S0,0)-c1-(max(X2-S0,0)-c2));
grid on;
title('bull spread(put)' );
xlabel('S0');
ylabel('profit');
plot(S0,zeros(1,16), 'black');
Bear spread - call Bear spread - put
%Bear spread - call %Bear spread - put
clear; clear;
c1 = 3; c1 = 1;
c2 = 1; c2 = 3;
X1 = 100; X1 = 100;
X2 = 105; X2 = 105;
S0 = 95:1:110; S0 = 95:1:110;
figure(1); figure(2);
plot(S0,-(max(S0-X1,0)-c1), '--'); plot(S0,-(max(X1-S0,0)-c1), '--');
%short c(X1) %short p(X1)
hold on; hold on;
plot(S0,max(S0-X2,0)-c2, '.'); %long plot(S0,max(X2-S0,0)-c2, '.'); %long
c(X2) p(X2)
plot(S0,-(max(S0-X1,0)-c1)+max(S0-X2, plot(S0,-(max(X1-S0,0)-c1)+max(X2-S0,
0)-c2); 0)-c2);
grid on; grid on;
title('bear spread(call)' ); title('bear spread(put)' );
xlabel('S0'); xlabel('S0');
ylabel('profit' ); ylabel('profit' );
plot(S0,zeros(1,16), 'black'); plot(S0,zeros(1,16), 'black')
Butterfly spread
%Butterfly spread
clear;
c1 = 6;
c2 = 3;
c3 = 1;
X1 = 95;
X2 = 100;
X3 = 105;
S0 = 90:1:110;
figure(1);
plot(S0,max(S0-X1,0)-c1, '--'); %long c(X1)
hold on;
plot(S0,max(S0-X3,0)-c3, '.'); %long c(X3)
plot(S0,-2*(max(S0-X2,0)-c2), '*'); %short c(X2) * 2
plot(S0,max(S0-X1,0)-c1+max(S0-X3,0)-c3-2*(max(S0-X2,0)-c2));
grid on;
title('butterfly spread' );
xlabel('S0');
ylabel('profit' );
plot(S0,zeros(1,21), 'black');
Butterfly spread - 收益為正 Butterfly spread - 收益為負
%Butterfly spread - 收益為正 %Butterfly spread - 收益為負
clear; clear;
c1 = 6; c1 = 10;
c2 = 4; c2 = 3;
c3 = 1; c3 = 2;
X1 = 95; X1 = 95;
X2 = 100; X2 = 100;
X3 = 105; X3 = 105;
S0 = 90:1:110; S0 = 90:1:110;
figure(2); figure(3);
plot(S0,max(S0-X1,0)-c1,'--'); %long c(X1) plot(S0,max(S0-X1,0)-c1,'--'); %long c(X1)
hold on; hold on;
plot(S0,max(S0-X3,0)-c3,'.'); %long c(X3) plot(S0,max(S0-X3,0)-c3,'.'); %long c(X3)
plot(S0,-2*(max(S0-X2,0)-c2),'*'); %short plot(S0,-2*(max(S0-X2,0)-c2),'*'); %short
c(X2) * 2 c(X2) * 2
plot(S0,max(S0-X1,0)-c1+max(S0-X3,0)-c3-2*( plot(S0,max(S0-X1,0)-c1+max(S0-X3,0)-c3-2*(
max(S0-X2,0)-c2)); max(S0-X2,0)-c2));
grid on; grid on;
title('butterfly spread'); title('butterfly spread');
xlabel('S0'); xlabel('S0');
ylabel('profit'); ylabel('profit');
plot(S0,zeros(1,21),'black'); plot(S0,zeros(1,21),'black');
condor spread
%condor spread
clear;
c1 = 2;
c2 = 4;
c3 = 3;
c4 = 1;
X1 = 95;
X2 = 100;
X3 = 105;
X4 = 110;
S0 = 90:1:115;
plot(S0,max(X1-S0,0)-c1,'--'); %long p(X1)
hold on;
plot(S0,-(max(X2-S0,0)-c2),'*'); %short p(X2)
plot(S0,-(max(S0-X3,0)-c3),'.'); %short c(X3)
plot(S0,max(S0-X4,0)-c4,'^'); %long c(X4)
plot(S0,max(X1-S0,0)-c1-(max(X2-S0,0)-c2)-(max(S0-X3,0)-c3)+max(S0-X4,0)-c4);
grid on;
title('condor spread');
xlabel('S0');
ylabel('profit');
plot(S0,zeros(1,26),'black');
bull spread + BS
%bull spread + BS
clear;
c1=3;c2=1;
X1=100;X2=105;
r=0.02; T1=0.05;T2=0.1; sigma=0.2;
S0=90:1:115;
[m,n]=size(S0);
for i=1:n
[C11(i),P1(i)]=blsprice(S0(i),X1,r,T1,sigma);
[C21(i),P2(i)]=blsprice(S0(i),X2,r,T1,sigma);
[C12(i),P1(i)]=blsprice(S0(i),X1,r,T2,sigma);
[C22(i),P2(i)]=blsprice(S0(i),X2,r,T2,sigma);
end
plot(S0,max(S0-X1,0)-max(S0-X2,0)-c1+c2);%bull spread-call
hold on;
plot(S0,C11-C21-c1+c2,'--');
plot(S0,C12-C22-c1+c2,'.');
grid on;
title('bull spread');
xlabel('S0');
ylabel('profit');
plot(S0,zeros(1,26),'black');
legend({'t=0','t=0.05','t=0.1'},'Location','SouthEast');
butterfly spread + BS
clear;
c1=6;c2=3;c3=1;
X1=95;X2=100;X3=105;
r=0.02; T1=0.05;T2=0.1;sigma=0.2;
S0=90:1:110;
[m,n]=size(S0);
for i=1:n
[C11(i),P1(i)]=blsprice(S0(i),X1,r,T1,sigma);
[C21(i),P2(i)]=blsprice(S0(i),X2,r,T1,sigma);
[C31(i),P3(i)]=blsprice(S0(i),X3,r,T1,sigma);
[C12(i),P1(i)]=blsprice(S0(i),X1,r,T2,sigma);
[C22(i),P2(i)]=blsprice(S0(i),X2,r,T2,sigma);
[C32(i),P3(i)]=blsprice(S0(i),X3,r,T2,sigma);
end
plot(S0,max(S0-X1,0)+max(S0-X3,0)-2*max(S0-X2,0)-c1+2*c2-c3);
%butterfly spread
hold on;
plot(S0,C11+C31-2*C21-c1+2*c2-c3,'--');
plot(S0,C12+C32-2*C22-c1+2*c2-c3,'.');
grid on;
title('butterfly spread');
xlabel('S0');
ylabel('profit');
plot(S0,zeros(1,21),'black');
legend({'t=0','t=0.05','t=0.1'},'Location','NorthEast');
CMBO拆解為BXM and PUT
CMBO策略內容為:
每個月賣出2%價外買權,同時賣出價平的賣權,同時還持有S&P500指數長部位以及一個月
期的政府公債
PUT策略內容為:
一價平賣權的賣方與短天期政府國庫券買方
BXM策略內容為:
可看作covered call,持有S&P500指數長部位,同時賣出價內買權
因此,CMBO策略可拆解為BXM策略和PUT策略

You might also like