Problem 35.4

Define Preliminary Functions

d1=.;
d2=.;
St=.;delta=.;tau=.;sigma=.;r=.; K=.;
BSCall=.;
S=.;

BSPut=.;
CDelta=.;
PDelta=.;

CNorm[d_]:=CDF[NormalDistribution[0,1],d];
d1[K_,S_]:=(Log[S/K]+(r-delta+sigma^2/2)*(tau))/(sigma*Sqrt[tau]);
d2[K_,S_]:= d1[K,S]-sigma*Sqrt[tau];
BSCall[K_,S_]:= S*Exp[-delta*(tau)]*CNorm[d1[K,S]]-K*Exp[-r*(tau)]*CNorm[d2[K,S]];
BSPut[K_,S_]:= K*Exp[-r*(tau)]*CNorm[-d2[K,S]]-S*Exp[-delta*(tau)]*CNorm[-d1[K,S]];
CDelta[K_,S_]:=(1/2) (E^(delta (-tau))) (1+Erf[(((-delta+r+((sigma^2)/2))*tau+Log[(S/K)])/((Sqrt[2]) sigma (Sqrt[tau])))]);
PDelta[K_,S_]:=-(1/2) (E^(delta (-tau))) Erfc[(((-delta+r+((sigma^2)/2)) (tau)+Log[(S/K)])/((Sqrt[2]) sigma (Sqrt[tau])))];

Compute Position At Time t = 0 :

St=40;delta=0;r=.08;sigma=.3;tau=91/365;PortValue0=(BSPut[45,St]-2*BSPut[40,St])*100;
PortDelta0=PDelta[45,St]-2*PDelta[40,St];
Shares=-PortDelta0*100;
HedgeValue0=Shares*St;
BankDeposit0=-HedgeValue0-PortValue0;
Worth0 =BankDeposit0+HedgeValue0+PortValue0;

OutputData = {{"40-Strike Put",BSPut[40,St]},{"45-Strike Put",BSPut[45,St]},{"Portfolio Value",PortValue0},{"Portfolio Δ",PortDelta0},{"Shares in hedge",Shares},{"Value of hedge",HedgeValue0},{"Bank Deposit/Loan",BankDeposit0},{"Net Position at t = 0",Worth0}};
Grid[OutputData,Alignment->{Left,{Right}},Spacings->{2,2},Frame->All,ItemStyle->{"Text",Bold}]

PDelta[45,40]

Compute Position At Time t = 1 if (Subscript[S, t+h]) = 39 :

St=39;delta=0;r=.08;sigma=.3;tau=90/365;
PortValue1=(BSPut[45,St]-2*BSPut[40,St])*100;
HedgeValue1=Shares*St;
BankDeposit1=BankDeposit0*Exp[r/365];
Worth1 =BankDeposit1+HedgeValue1+PortValue1;

OutputData = {{"40-Strike Put",BSPut[40,St]},{"45-Strike Put",BSPut[45,St]},{"Portfolio Value",PortValue1},{"Shares in hedge",Shares},{"Value of hedge",HedgeValue1},{"Bank Deposit/Loan",BankDeposit1},{"Net Position at t = 0",Worth1},{"1-day profit",Worth1-Worth0}};
Grid[OutputData,Alignment->{Left,{Right}},Spacings->{2,2},Frame->All,ItemStyle->{"Text",Bold}]

Compute Position At Time t = 1 if (Subscript[S, t+h]) = 40.50 :

St=40.50;delta=0;r=.08;sigma=.3;tau=90/365;
PortValue2=(BSPut[45,St]-2*BSPut[40,St])*100;
HedgeValue2=Shares*St;
BankDeposit2=BankDeposit0*Exp[r/365];
Worth2 =BankDeposit2+HedgeValue2+PortValue2;

OutputData = {{"40-Strike Put",BSPut[40,St]},{"45-Strike Put",BSPut[45,St]},{"Portfolio Value",PortValue2},{"Shares in hedge",Shares},{"Value of hedge",HedgeValue2},{"Bank Deposit/Loan",BankDeposit2},{"Net Position at t = 0",Worth2},{"1-day profit",Worth2-Worth0}};
Grid[OutputData,Alignment->{Left,{Right}},Spacings->{2,2},Frame->All,ItemStyle->{"Text",Bold}]

Find 1-day profit for a range of asset prices on day 1.

S=.;delta=0;r=.08;sigma=.3;tau=90/365;

PortValueFcn[S_]:=(BSPut[45,S]-2*BSPut[40,S])*100;
HedgeValueFcn[S_]:=Shares*S;
Profit[S_]:=Exp[r/365]*BankDeposit0+HedgeValueFcn[S]+PortValueFcn[S];

Plot[Profit[S],{S,20,80},AxesLabel->{"(Subscript[S, t+h])","Profit"},PlotStyle->{Joined,Blue},PlotLabel->"1-day portfolio profit for a range of values of (Subscript[S, t+h]) (macro view)"]

Plot[Profit[S],{S,35,45},AxesLabel->{"(Subscript[S, t+h])","Profit"},PlotStyle->{Joined,Blue},PlotLabel->"1-day portfolio profit for a range of values of (Subscript[S, t+h]) (micro view)"]

Plot[Profit[S],{S,38.5,41.5},AxesLabel->{"(Subscript[S, t+h])","Profit"},PlotStyle->{Joined,Blue},PlotLabel->"1-day portfolio profit for a range of values of (Subscript[S, t+h]) (super micro view)"]

Find Price Movement That Maximizes The 1-Day Profit

Maximize[{Profit[S],S≥0},S]

Find Price Movement That Maximizes The 1-Day Profit - Check

r=.08;sigma=.3;delta=0;
Delta=-11.674;
d1=.;
d2=.;

CNorm[d_]:=CDF[NormalDistribution[0,1],d];
d1[K_,S_,tau_]:=(Log[S/K]+(r-delta+sigma^2/2)*(tau))/(sigma*Sqrt[tau]);
Day1ProfitDerivative[S_]:=Delta-100*CNorm[-d1[45,S,90/365]]+200*CNorm[-d1[40,S,90/365]];

FullSimplify[Day1ProfitDerivative[S]]

Plot[Day1ProfitDerivative[S],{S,10,100},AxesLabel->{"(Subscript[S, t + 2])","dV/dS"},PlotLabel->"One Day Profit Derivative In Hedged Portfolio",PlotStyle->{Thick,Green}]
Plot[Day1ProfitDerivative[S],{S,35,45},AxesLabel->{"(Subscript[S, t + 2])","dV/dS"},PlotLabel->"One Day Profit Derivative In Hedged Portfolio",PlotStyle->{Thick,Blue}]

FindRoot[Day1ProfitDerivative[S],{S,40}]