(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 14913, 492] NotebookOptionsPosition[ 14356, 469] NotebookOutlinePosition[ 14699, 484] CellTagsIndexPosition[ 14656, 481] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{ RowBox[{"V", "=", RowBox[{ RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], RowBox[{"H", "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}]}], ";"}]], "Input", CellChangeTimes->{{3.5015223162844534`*^9, 3.5015223597535677`*^9}, { 3.5015224398011475`*^9, 3.501522440582407*^9}}], Cell[BoxData[ RowBox[{"(*", " ", RowBox[{ "construct", " ", "the", " ", "convertable", " ", "bond", " ", "pricing", " ", "equation"}], " ", "*)"}]], "Input", CellChangeTimes->{{3.5015223841444407`*^9, 3.501522396644537*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"CBPE", "=", RowBox[{ RowBox[{ RowBox[{"D", "[", RowBox[{"V", ",", RowBox[{"{", RowBox[{"t", ",", "1"}], "}"}]}], "]"}], "+", RowBox[{ FractionBox["1", "2"], SuperscriptBox["\[Sigma]", "2"], SuperscriptBox["S", "2"], RowBox[{"D", "[", RowBox[{"V", ",", RowBox[{"{", RowBox[{"S", ",", "2"}], "}"}]}], "]"}]}], "+", RowBox[{"\[Rho]", " ", "\[Sigma]", " ", "S", " ", "w", " ", RowBox[{"D", "[", RowBox[{"V", ",", RowBox[{"{", "S", "}"}], ",", RowBox[{"{", "r", "}"}]}], "]"}]}], "+", RowBox[{ FractionBox["1", "2"], SuperscriptBox["w", "2"], RowBox[{"D", "[", RowBox[{"V", ",", RowBox[{"{", RowBox[{"r", ",", "2"}], "}"}]}], "]"}]}], "+", RowBox[{"r", " ", "S", " ", RowBox[{"D", "[", RowBox[{"V", ",", "S"}], "]"}]}], "+", " ", RowBox[{ RowBox[{"(", RowBox[{"u", " ", "-", " ", RowBox[{"\[Lambda]", " ", "w"}]}], ")"}], " ", RowBox[{"D", "[", RowBox[{"V", ",", "r"}], "]"}]}], "-", RowBox[{"r", " ", "V"}]}], "//", "Simplify"}]}]], "Input", CellChangeTimes->{{3.5015223750661993`*^9, 3.501522432519804*^9}, { 3.5015224790202074`*^9, 3.50152249944228*^9}, {3.5015225389582186`*^9, 3.501522575552309*^9}, {3.5019325866969395`*^9, 3.5019325883063354`*^9}}], Cell[BoxData[ RowBox[{ FractionBox["1", RowBox[{"2", " ", SuperscriptBox[ RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], "3"]}]], RowBox[{"(", RowBox[{ RowBox[{ SuperscriptBox[ RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], "4"], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", "r", " ", RowBox[{"H", "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}], "+", RowBox[{"2", " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}]}], ")"}]}], "+", RowBox[{ SuperscriptBox[ RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], "3"], " ", RowBox[{"(", RowBox[{ RowBox[{"2", " ", "r", " ", "S", " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}], "+", RowBox[{ RowBox[{"H", "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}], " ", RowBox[{"(", RowBox[{ RowBox[{"2", " ", RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}]}], "+", RowBox[{"2", " ", RowBox[{"(", RowBox[{"u", "-", RowBox[{"w", " ", "\[Lambda]"}]}], ")"}], " ", RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}]}], "+", RowBox[{ SuperscriptBox["w", "2"], " ", RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}]}]}], ")"}]}]}], ")"}]}], "-", RowBox[{"2", " ", SuperscriptBox["S", "2"], " ", "w", " ", "\[Rho]", " ", "\[Sigma]", " ", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], " ", RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}], "+", RowBox[{ SuperscriptBox["S", "2"], " ", SuperscriptBox["w", "2"], " ", SuperscriptBox[ RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}], "2"], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}], "+", RowBox[{"S", " ", SuperscriptBox[ RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], "2"], " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", "2"}], " ", RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}], "-", RowBox[{"2", " ", RowBox[{"(", RowBox[{"u", "-", RowBox[{"w", " ", "\[Lambda]"}]}], ")"}], " ", RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}], "-", RowBox[{ SuperscriptBox["w", "2"], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}], " ", RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}]}], "+", RowBox[{"S", " ", SuperscriptBox["\[Sigma]", "2"], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}]}], ")"}]}]}], ")"}]}]], "Output", CellChangeTimes->{ 3.501522380035013*^9, {3.5015224252697754`*^9, 3.5015224330510607`*^9}, 3.5015224998172846`*^9, 3.501522543286399*^9, 3.5015225764116945`*^9, { 3.5019326016814423`*^9, 3.5019326048221073`*^9}, 3.5019331118420467`*^9}] }, Open ]], Cell[BoxData[ RowBox[{"(*", " ", RowBox[{ "lets", " ", "put", " ", "in", " ", "the", " ", "fact", " ", "that", " ", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], " ", "satisfied", " ", "the", " ", "bond", " ", "pricing", " ", "equation", " ", "by", " ", "replacing", " ", "the", " ", "time", " ", "derivative", " ", "of", " ", "g"}], " ", "*)"}]], "Input", CellChangeTimes->{{3.5019325337902684`*^9, 3.501932579306284*^9}, { 3.501932734932572*^9, 3.501932745073327*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"t1", "=", RowBox[{ RowBox[{"CBPE", "/.", RowBox[{"{", RowBox[{ RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}], "\[Rule]", RowBox[{ RowBox[{ FractionBox[ RowBox[{"-", "1"}], "2"], SuperscriptBox["w", "2"], RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}]}], "-", RowBox[{ RowBox[{"(", RowBox[{"u", "-", RowBox[{"\[Lambda]", " ", "w"}]}], ")"}], RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}]}], "+", RowBox[{"r", " ", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]}]}]}], "}"}]}], "//", "Simplify"}]}]], "Input", CellChangeTimes->{{3.501932607369015*^9, 3.5019326263691416`*^9}, { 3.5019326617288303`*^9, 3.501932724010621*^9}, {3.50193307215423*^9, 3.5019330727479877`*^9}, {3.501933652737291*^9, 3.501933653299798*^9}}], Cell[BoxData[ RowBox[{ FractionBox["1", RowBox[{"2", " ", SuperscriptBox[ RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], "3"]}]], RowBox[{"(", RowBox[{ RowBox[{"2", " ", SuperscriptBox[ RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], "4"], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"0", ",", "1"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}], "+", RowBox[{ SuperscriptBox["S", "2"], " ", SuperscriptBox["\[Sigma]", "2"], " ", SuperscriptBox[ RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], "2"], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}], "-", RowBox[{"2", " ", SuperscriptBox["S", "2"], " ", "w", " ", "\[Rho]", " ", "\[Sigma]", " ", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}], " ", RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}], "+", RowBox[{ SuperscriptBox["S", "2"], " ", SuperscriptBox["w", "2"], " ", SuperscriptBox[ RowBox[{ SuperscriptBox["g", TagBox[ RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{"r", ",", "t"}], "]"}], "2"], " ", RowBox[{ SuperscriptBox["H", TagBox[ RowBox[{"(", RowBox[{"2", ",", "0"}], ")"}], Derivative], MultilineFunction->None], "[", RowBox[{ FractionBox["S", RowBox[{"g", "[", RowBox[{"r", ",", "t"}], "]"}]], ",", "t"}], "]"}]}]}], ")"}]}]], "Output", CellChangeTimes->{ 3.5019326205878706`*^9, {3.5019327198386927`*^9, 3.5019327248075066`*^9}, 3.5019330731229925`*^9, 3.5019331153577166`*^9, 3.501933654081058*^9}] }, Open ]] }, WindowSize->{868, 727}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (February 18, 2009)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[545, 20, 409, 13, 49, "Input"], Cell[957, 35, 235, 5, 31, "Input"], Cell[CellGroupData[{ Cell[1217, 44, 1404, 40, 68, "Input"], Cell[2624, 86, 7045, 226, 202, "Output"] }, Open ]], Cell[9684, 315, 503, 10, 52, "Input"], Cell[CellGroupData[{ Cell[10212, 329, 1440, 45, 47, "Input"], Cell[11655, 376, 2685, 90, 88, "Output"] }, Open ]] } ] *) (* End of internal cache information *)