(* 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[ 188134, 4492] NotebookOptionsPosition[ 183373, 4329] NotebookOutlinePosition[ 183839, 4349] CellTagsIndexPosition[ 183796, 4346] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["The T-date equilibrium in an incomplete market", "Title"], Cell[TextData[{ "Basak-Cuoco example\nSolved on ", StyleBox["a binomial tree", FontSlant->"Italic"], " " }], "Subtitle", CellChangeTimes->{{3.409667411875*^9, 3.409667422234375*^9}, { 3.4257836981875*^9, 3.4257837008125*^9}, {3.4293711125625*^9, 3.429371113203125*^9}, 3.43852487059375*^9}], Cell["\<\ For non binomial trees, another program should be used. Note: this code uses high-precision arithmetics. That is needed for the sole \ purpose of getting a reliable solution very close to the edges of the [0,1] \ domain of \[Omega]. \ \>", "Subsubtitle", CellChangeTimes->{{3.42562231596875*^9, 3.42562234309375*^9}, { 3.4257047233125*^9, 3.42570474359375*^9}, {3.42683011025*^9, 3.42683011025*^9}, 3.42898754559375*^9, {3.4292823157086897`*^9, 3.4292823163024397`*^9}, {3.543148935834223*^9, 3.5431490421734867`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Off", "[", RowBox[{"General", "::", "spell1"}], "]"}], ";", " ", RowBox[{"Off", "[", RowBox[{"General", "::", "spell"}], "]"}], ";"}], " "}]], "Input"], Cell[CellGroupData[{ Cell["Define state prices (one should not have to open this)", "Section", CellChangeTimes->{{3.425570503078125*^9, 3.425570506078125*^9}, { 3.425651401734375*^9, 3.425651408328125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[Phi]2", "[", RowBox[{"\[Tau]_", ",", " ", "c2_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"\[Rho]", "^", RowBox[{"(", RowBox[{"T", " ", "-", " ", "\[Tau]"}], ")"}]}], "*", RowBox[{"c2", "^", RowBox[{"(", RowBox[{"\[Gamma]2", " ", "-", " ", "1"}], ")"}]}]}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{"\[Tau]_", ",", " ", "c1_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"\[Rho]", "^", RowBox[{"(", RowBox[{"T", " ", "-", " ", "\[Tau]"}], ")"}]}], "*", RowBox[{"c1", "^", RowBox[{"(", RowBox[{"\[Gamma]1", " ", "-", " ", "1"}], ")"}]}]}]}], ";"}], " "}]}], "Input", CellChangeTimes->{{3.4250317398559093`*^9, 3.4250317413740606`*^9}, { 3.4250332916650743`*^9, 3.425033302836191*^9}, {3.4250334238912954`*^9, 3.4250334511820245`*^9}}], Cell[BoxData[ RowBox[{"t", " ", "=", " ", RowBox[{"T", " ", "-", " ", "\[Tau]"}]}]], "DisplayFormula", CellChangeTimes->{{3.425033358697777*^9, 3.425033373036211*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Define equilibrium problem: set up equation system at each node and define \ iterates\ \>", "Section", CellChangeTimes->{{3.425570525265625*^9, 3.42557053309375*^9}, { 3.42598360628125*^9, 3.4259836250625*^9}}], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"State", " ", "variable", " ", "\[Omega]"}], " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "i", "]"}], "]"}], ":", FractionBox["c1", RowBox[{"c1", "+", "c2"}]]}], "=", RowBox[{ FractionBox["c1", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", "-", "\[Tau]"}], ",", "j"}], "]"}]], "=", RowBox[{ RowBox[{ RowBox[{ "\[CapitalOmega]", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], " ", "\[DoubleLongLeftRightArrow]", " ", "c1"}], "=", RowBox[{ RowBox[{ RowBox[{ RowBox[{ RowBox[{ "\[CapitalOmega]", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", "-", "\[Tau]"}], ",", "j"}], "]"}]}], " ", "&"}], " ", "c2"}], "=", RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{ "\[CapitalOmega]", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}]}], ")"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", "-", "\[Tau]"}], ",", "j"}], "]"}]}]}]}]}]}]}], TraditionalForm]], "Text", CellChangeTimes->{{3.425650873703125*^9, 3.425650897359375*^9}}], Cell[CellGroupData[{ Cell["Equations at each node", "Subsection", CellChangeTimes->{{3.425650851671875*^9, 3.425650856*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Clear", "[", "unknowns", "]"}], ";", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]_", ",", "j_"}], "]"}], " ", ":=", " ", RowBox[{"{", RowBox[{ "c1u", ",", " ", "c2u", ",", " ", "c1d", ",", " ", "c2d", ",", "\[Theta]1", ",", "\[Theta]2"}], "}"}]}], ";"}], " ", RowBox[{"(*", RowBox[{ "make", " ", "sure", " ", "to", " ", "put", " ", "braces", " ", "even", " ", "if", " ", "there", " ", "is", " ", "only", " ", "one", " ", "unknown"}], "*)"}]}]], "Input", CellChangeTimes->{{3.425038851168969*^9, 3.4250388811259646`*^9}, { 3.425980549546875*^9, 3.425980565953125*^9}, {3.42682635075*^9, 3.426826360234375*^9}, {3.437401737038806*^9, 3.437401748929431*^9}, { 3.437401783882556*^9, 3.437401803632556*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"equations", "[", RowBox[{"\[Tau]_", ",", " ", "j_"}], "]"}], " ", ":=", " ", RowBox[{"{", RowBox[{"(*", RowBox[{ "Flow", " ", "budget", " ", "constraint", " ", "or", " ", "marketability", " ", "condition"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"c2u", " ", "+", " ", RowBox[{"F2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", "j", ",", "c1u", ",", "c2u"}], "]"}]}], " ", "==", "\[Theta]2"}], ",", RowBox[{"\[Theta]2", " ", "==", RowBox[{"c2d", " ", "+", " ", RowBox[{"F2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", RowBox[{"j", " ", "+", " ", "1"}], ",", "c1d", ",", "c2d"}], "]"}]}]}], ",", " ", "\[IndentingNewLine]", RowBox[{ RowBox[{"c1u", " ", "+", " ", RowBox[{"F1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", "j", ",", "c1u", ",", "c2u"}], "]"}]}], " ", "==", RowBox[{"\[Theta]1", "+", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", " ", "+", " ", "1"}], ",", " ", "j"}], "]"}]}]}], ",", RowBox[{ RowBox[{"\[Theta]1", "+", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", " ", "+", " ", "1"}], ",", " ", RowBox[{"j", "+", "1"}]}], "]"}]}], " ", "==", " ", RowBox[{"c1d", " ", "+", " ", RowBox[{"F1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", RowBox[{"j", " ", "+", " ", "1"}], ",", "c1d", ",", "c2d"}], "]"}]}]}], ",", " ", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Kernel", " ", "condition"}], "*)"}], "\[IndentingNewLine]", RowBox[{ FractionBox[ RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c1u"}], "]"}], " ", "+", " ", RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c1d"}], "]"}]}], RowBox[{"\[Phi]1", "[", RowBox[{"\[Tau]", ",", " ", "c1"}], "]"}]], " ", "==", " ", FractionBox[ RowBox[{ RowBox[{"\[Phi]2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c2u"}], "]"}], " ", "+", " ", RowBox[{"\[Phi]2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c2d"}], "]"}]}], RowBox[{"\[Phi]2", "[", RowBox[{"\[Tau]", ",", " ", "c2"}], "]"}]]}], ",", " ", "\n", " ", RowBox[{"(*", RowBox[{"Market", " ", "clearing"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Theta]1", "+", "\[Theta]2"}], "\[Equal]", "0"}]}], "}"}]}], ";"}], " "}]], "Input", CellChangeTimes->{{3.4250317901079335`*^9, 3.4250318046163845`*^9}, { 3.425032505114427*^9, 3.425032507708687*^9}, {3.425032589229838*^9, 3.4250326101339283`*^9}, {3.4250330555934696`*^9, 3.4250330973546453`*^9}, {3.425033188624771*^9, 3.4250332134602547`*^9}, { 3.425033332771185*^9, 3.4250333507029777`*^9}, {3.4250333951164184`*^9, 3.4250334004049473`*^9}, {3.4250334593178377`*^9, 3.4250335389508004`*^9}, 3.4250335855064554`*^9, {3.425033627594664*^9, 3.42503367145705*^9}, { 3.4250337060595093`*^9, 3.425033911803082*^9}, {3.425037741202984*^9, 3.425037742134077*^9}, {3.425252192025*^9, 3.425252216575*^9}, { 3.425252267733*^9, 3.425252342561*^9}, {3.425335852859375*^9, 3.425335853515625*^9}, {3.425570557140625*^9, 3.42557062346875*^9}, { 3.42563928071875*^9, 3.425639293953125*^9}, {3.425650709640625*^9, 3.42565072709375*^9}, {3.425650924625*^9, 3.42565093178125*^9}, { 3.4257043965625*^9, 3.425704441625*^9}, {3.42592210915625*^9, 3.42592213790625*^9}, {3.425922196234375*^9, 3.425922230359375*^9}, { 3.425983757703125*^9, 3.425983766671875*^9}, {3.426339454765625*^9, 3.4263394651875*^9}, {3.426830170328125*^9, 3.42683018975*^9}, { 3.426830306140625*^9, 3.4268303143125*^9}}], Cell["(1 - \[CapitalOmega][[i]]) \[Delta][T - \[Tau], j]", "Text"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"initials", "[", RowBox[{"\[Tau]_", ",", " ", "j_", ",", " ", "i_"}], "]"}], " ", ":=", " ", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "i", "]"}], "]"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", "+", "1"}], ",", " ", "j"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"(", RowBox[{"1", " ", "-", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "i", "]"}], "]"}]}], ")"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", "+", "1"}], ",", " ", "j"}], "]"}]}], ",", " ", "\n", " ", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "i", "]"}], "]"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", " ", "+", " ", "1"}], ",", " ", RowBox[{"j", "+", "1"}]}], "]"}]}], ",", " ", RowBox[{ RowBox[{"(", RowBox[{"1", " ", "-", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "i", "]"}], "]"}]}], ")"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", " ", "+", " ", "1"}], ",", " ", RowBox[{"j", "+", "1"}]}], "]"}]}], ",", "0", ",", "0"}], "}"}]}], ";"}], " "}]], "Input", CellChangeTimes->{{3.425038851168969*^9, 3.4250388811259646`*^9}, { 3.4250390104058914`*^9, 3.4250390263024807`*^9}, {3.42503907440029*^9, 3.425039164828332*^9}, {3.4250391960954585`*^9, 3.425039224451294*^9}, 3.4250442660354013`*^9, {3.4266694023125*^9, 3.426669407765625*^9}, { 3.426669652140625*^9, 3.4266696559375*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Relate equation system to endogenous state variable", "Subsection", CellChangeTimes->{{3.42557075246875*^9, 3.425570764453125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"dummy", "[", RowBox[{"\[Tau]_", ",", " ", "j_", ",", " ", "i_"}], "]"}], " ", ":=", " ", RowBox[{"{", RowBox[{ RowBox[{"c1", " ", "->", " ", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "i", "]"}], "]"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]}]}], ",", " ", RowBox[{"c2", " ", "->", " ", RowBox[{ RowBox[{"(", RowBox[{"1", " ", "-", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "i", "]"}], "]"}]}], ")"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]}]}]}], "}"}]}]], "Input", CellChangeTimes->{{3.4250446582036147`*^9, 3.4250447028110747`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Complete - market equations", "Subsection", CellChangeTimes->{{3.425570850625*^9, 3.4255708585*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"completeMarketEquations", "[", RowBox[{"\[Tau]_", ",", " ", "j_"}], "]"}], " ", ":=", " ", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c1u"}], "]"}], "/", RowBox[{"\[Phi]1", "[", RowBox[{"\[Tau]", ",", " ", "c1"}], "]"}]}], " ", "==", " ", "\n", " ", RowBox[{ RowBox[{"\[Phi]2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c2u"}], "]"}], "/", RowBox[{"\[Phi]2", "[", RowBox[{"\[Tau]", ",", " ", "c2"}], "]"}]}]}], ",", " ", RowBox[{ RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c1d"}], "]"}], "/", RowBox[{"\[Phi]1", "[", RowBox[{"\[Tau]", ",", " ", "c1"}], "]"}]}], " ", "==", " ", "\n", " ", RowBox[{ RowBox[{"\[Phi]2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c2d"}], "]"}], "/", RowBox[{"\[Phi]2", "[", RowBox[{"\[Tau]", ",", " ", "c2"}], "]"}]}]}], ",", " ", RowBox[{ RowBox[{"c1u", " ", "+", " ", "c2u"}], " ", "==", " ", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", " ", "+", " ", "1"}], ",", " ", "j"}], "]"}]}], ",", " ", "\n", " ", RowBox[{ RowBox[{"c1d", " ", "+", " ", "c2d"}], " ", "==", " ", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", " ", "+", " ", "1"}], ",", " ", RowBox[{"j", " ", "+", " ", "1"}]}], "]"}]}]}], "}"}]}], ";"}], " "}]], "Input", CellChangeTimes->{{3.4250317901079335`*^9, 3.4250318046163845`*^9}, { 3.425032505114427*^9, 3.425032507708687*^9}, {3.425032589229838*^9, 3.4250326101339283`*^9}, {3.4250330555934696`*^9, 3.4250330973546453`*^9}, {3.425033188624771*^9, 3.4250332134602547`*^9}, { 3.425033332771185*^9, 3.4250333507029777`*^9}, {3.4250333951164184`*^9, 3.4250334004049473`*^9}, {3.4250334593178377`*^9, 3.4250335389508004`*^9}, 3.4250335855064554`*^9, {3.425033627594664*^9, 3.42503367145705*^9}, { 3.4250337060595093`*^9, 3.425033911803082*^9}, {3.425034017127613*^9, 3.4250340174276433`*^9}, 3.4250340586697674`*^9, 3.4250341093788376`*^9, { 3.4250341421711164`*^9, 3.425034168145714*^9}, {3.425037727316595*^9, 3.425037733293193*^9}, {3.42506579073*^9, 3.4250658023120003`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Define the function to be iterated backward, choosing a undiscountation for \ it that will facilitate the interpolation : below, state \"undiscounted \ iterate\" in the undiscounted form \ \>", "Subsection", CellChangeTimes->{{3.42562460965625*^9, 3.425624629875*^9}, { 3.42562493875*^9, 3.425624941671875*^9}, {3.425639021125*^9, 3.42563907803125*^9}, {3.42563976096875*^9, 3.4256397621875*^9}, { 3.425651054984375*^9, 3.42565106709375*^9}, {3.425704124*^9, 3.425704133734375*^9}, {3.426836026375*^9, 3.42683603046875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"F1", "[", RowBox[{"0", ",", "j_", ",", "c1_", ",", "c2_"}], "]"}], ":=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"F1", "[", RowBox[{"\[Tau]_", ",", "j_", ",", "c1_", ",", "c2_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"F2T", "[", RowBox[{"[", RowBox[{"\[Tau]", ",", "j", ",", "1"}], "]"}], "]"}], "[", FractionBox["c1", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]], "]"}], "/;", RowBox[{"\[Tau]", ">", "0", RowBox[{"(*", RowBox[{ RowBox[{ "make", " ", "sure", " ", "to", " ", "include", " ", "a", " ", "number", " ", "in", " ", "the", " ", "third", " ", "dimension", " ", "of", " ", "\[Phi]2F2T"}], ",", " ", RowBox[{ "even", " ", "if", " ", "there", " ", "is", " ", "only", " ", "one", " ", "iterate"}]}], "*)"}]}]}]}]}], "Input", CellChangeTimes->{{3.42570381840625*^9, 3.425703954171875*^9}, { 3.425710587875*^9, 3.42571059259375*^9}, {3.425710685734375*^9, 3.425710689578125*^9}, {3.425980330578125*^9, 3.425980331515625*^9}, { 3.425980578125*^9, 3.425980647515625*^9}, {3.425983793484375*^9, 3.42598382575*^9}, {3.426825688109375*^9, 3.42682569759375*^9}, { 3.426825735171875*^9, 3.426825735796875*^9}, {3.426829711859375*^9, 3.426829724296875*^9}, 3.426829764703125*^9, {3.426830326296875*^9, 3.42683033678125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"F2", "[", RowBox[{"0", ",", "j_", ",", "c1_", ",", "c2_"}], "]"}], ":=", "0"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"F2", "[", RowBox[{"\[Tau]_", ",", "j_", ",", "c1_", ",", "c2_"}], "]"}], ":=", RowBox[{ RowBox[{ RowBox[{"F2T", "[", RowBox[{"[", RowBox[{"\[Tau]", ",", "j", ",", "2"}], "]"}], "]"}], "[", FractionBox["c1", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]], "]"}], "/;", RowBox[{"\[Tau]", ">", "0", RowBox[{"(*", RowBox[{ RowBox[{ "make", " ", "sure", " ", "to", " ", "include", " ", "a", " ", "number", " ", "in", " ", "the", " ", "third", " ", "dimension", " ", "of", " ", "\[Phi]2F2T"}], ",", " ", RowBox[{ "even", " ", "if", " ", "there", " ", "is", " ", "only", " ", "one", " ", "iterate"}]}], "*)"}]}]}]}]}], "Input", CellChangeTimes->{{3.42570381840625*^9, 3.425703954171875*^9}, { 3.425710587875*^9, 3.42571059259375*^9}, {3.425710685734375*^9, 3.425710689578125*^9}, {3.425980330578125*^9, 3.425980331515625*^9}, { 3.425980578125*^9, 3.425980647515625*^9}, {3.425983793484375*^9, 3.42598382575*^9}, {3.426825688109375*^9, 3.42682569759375*^9}, { 3.426825735171875*^9, 3.426825735796875*^9}, {3.426829711859375*^9, 3.426829724296875*^9}, 3.426829764703125*^9, {3.426830326296875*^9, 3.42683033678125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{ RowBox[{"UndiscountedIterate", "[", RowBox[{"\[Tau]_", ",", "j_", ",", "i_"}], "]"}], " ", ":=", " ", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "*", RowBox[{"(", RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c1u"}], "]"}], "*", RowBox[{"(", RowBox[{"c1u", "-", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", " ", "+", " ", "1"}], ",", " ", "j"}], "]"}], "+", RowBox[{"F1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", "j", ",", "c1u", ",", "c2u"}], "]"}]}], ")"}]}], ")"}]}], " ", "+", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "*", RowBox[{"(", RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c1d"}], "]"}], "*", RowBox[{"(", RowBox[{"c1d", "-", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]", " ", "+", " ", "1"}], ",", " ", RowBox[{"j", "+", "1"}]}], "]"}], "+", RowBox[{"F1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", RowBox[{"j", "+", "1"}], ",", "c1d", ",", "c2d"}], "]"}]}], ")"}]}], ")"}]}]}], ")"}], "/", RowBox[{"\[Phi]1", "[", RowBox[{"\[Tau]", ",", RowBox[{ RowBox[{"(", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "i", "]"}], "]"}], ")"}], RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]}]}], "]"}]}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "*", RowBox[{"(", RowBox[{ RowBox[{"\[Phi]2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c2u"}], "]"}], "*", RowBox[{"(", RowBox[{"c2u", "+", RowBox[{"F2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", "j", ",", "c1u", ",", "c2u"}], "]"}]}], ")"}]}], ")"}]}], " ", "+", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "*", RowBox[{"(", RowBox[{ RowBox[{"\[Phi]2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", "c2d"}], "]"}], "*", RowBox[{"(", RowBox[{"c2d", "+", RowBox[{"F2", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", RowBox[{"j", "+", "1"}], ",", "c1d", ",", "c2d"}], "]"}]}], ")"}]}], ")"}]}]}], ")"}], "/", RowBox[{"\[Phi]2", "[", RowBox[{"\[Tau]", ",", RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "i", "]"}], "]"}]}], ")"}], RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]}]}], "]"}]}]}], "}"}]}], " ", ";"}], RowBox[{"(*", RowBox[{ "make", " ", "sure", " ", "to", " ", "have", " ", "braces", " ", "even", " ", "if", " ", "there", " ", "is", " ", "only", " ", "one", " ", "iterate"}], "*)"}]}]], "Input", CellChangeTimes->{{3.42562469890625*^9, 3.425624714109375*^9}, { 3.42562474996875*^9, 3.425624752*^9}, {3.4256248374375*^9, 3.425624838453125*^9}, {3.42563934790625*^9, 3.425639349171875*^9}, { 3.4256395355*^9, 3.42563954353125*^9}, {3.42563962725*^9, 3.425639638953125*^9}, {3.425639691640625*^9, 3.425639741375*^9}, { 3.425639860171875*^9, 3.425639866140625*^9}, {3.425640712828125*^9, 3.425640723140625*^9}, {3.42565094340625*^9, 3.42565098221875*^9}, { 3.425651506796875*^9, 3.42565150996875*^9}, {3.425703996765625*^9, 3.425704060421875*^9}, 3.4257041471875*^9, {3.425978979734375*^9, 3.425979002078125*^9}, {3.425983661453125*^9, 3.42598366515625*^9}, { 3.4259838738125*^9, 3.42598389503125*^9}, {3.426825602546875*^9, 3.42682570190625*^9}, {3.4268257498125*^9, 3.4268257548125*^9}, { 3.42683037775*^9, 3.426830382671875*^9}, {3.426830468234375*^9, 3.426830479546875*^9}, 3.4268360838125*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Input values", "Section", CellChangeTimes->{{3.42167473009375*^9, 3.42167473071875*^9}, { 3.421742071640625*^9, 3.42174207215625*^9}}], Cell[CellGroupData[{ Cell["Number of dates and preference parameters", "Subsubsection"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"T", " ", "=", " ", "6"}], ";"}], " ", RowBox[{"(*", " ", RowBox[{"Note", ",", " ", RowBox[{ RowBox[{"first", " ", "date"}], " ", "=", " ", "0"}], ",", " ", RowBox[{ RowBox[{ "so", " ", "total", " ", "number", " ", "of", " ", "dates", " ", "is", " ", "T"}], " ", "+", " ", "1"}]}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Gamma]2", "=", RowBox[{"-", "5"}]}], ";"}], "\n", RowBox[{ RowBox[{"\[Gamma]1", ":=", RowBox[{"-", "1"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Rho]", "=", RowBox[{"1", "/", RowBox[{"(", RowBox[{"1", "+", RowBox[{"1", "/", "1000"}]}], ")"}]}]}], ";"}]}], "Input", CellChangeTimes->{{3.40939036465625*^9, 3.409390365171875*^9}, { 3.4099040875625*^9, 3.409904088015625*^9}, {3.42173482015625*^9, 3.421734828046875*^9}, {3.425037782860149*^9, 3.4250377850123644`*^9}, { 3.426825563953125*^9, 3.42682556446875*^9}, {3.426830567125*^9, 3.42683056759375*^9}, {3.4620812069817114`*^9, 3.462081208169135*^9}, { 3.4620816274236965`*^9, 3.4620816315638185`*^9}, {3.462100162957608*^9, 3.462100179704714*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Total number of nodes at every point in time", "Subsection", CellChangeTimes->{{3.42682610778125*^9, 3.426826119546875*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"TotK", "[", "t_", "]"}], ":=", RowBox[{"t", "+", "1"}]}], ";"}]], "Input", CellChangeTimes->{{3.426826123109375*^9, 3.426826144921875*^9}, { 3.426826186921875*^9, 3.4268261988125*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Number of points for the center part of the grid: ", "we use ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"2", "l"}], "+", "1"}], TraditionalForm]], "DisplayFormula"], " points" }], "Subsection", CellChangeTimes->{{3.425571382640625*^9, 3.425571417890625*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"l", " ", "=", " ", "50"}], ";"}], " "}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Precision goal for the endpoints", "Subsection", CellChangeTimes->{{3.42557111990625*^9, 3.42557112659375*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"EndPointsGoal", " ", "=", " ", RowBox[{"10", "^", RowBox[{"(", RowBox[{"-", "20"}], ")"}]}]}], ";"}], " "}]], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Precision goal and working precision for FindRoot employed at each point\ \>", "Subsection", CellChangeTimes->{{3.425571493421875*^9, 3.4255715103125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"PG", " ", "=", " ", "30"}], ";", " ", RowBox[{"WP", " ", "=", " ", "300"}], ";"}], " "}]], "Input", CellChangeTimes->{{3.4253151585821095`*^9, 3.4253151612021093`*^9}, { 3.425315459364109*^9, 3.425315464823109*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["The processes for output", "Subsection", CellChangeTimes->{3.42174240190625*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"\[Delta]0", ":=", " ", "100"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[Mu]\[Delta]", "=", RowBox[{"183", "/", "10000"}]}], ";", RowBox[{"\[Sigma]\[Delta]", "=", RowBox[{"357", "/", "10000"}]}], ";"}]}], "Input", CellChangeTimes->{{3.4096674719375*^9, 3.40966747503125*^9}, { 3.4217349369375*^9, 3.421734937296875*^9}, {3.421742384765625*^9, 3.42174238903125*^9}, {3.421742502515625*^9, 3.4217425031875*^9}}], Cell[CellGroupData[{ Cell["Generate the process (binomial) for exogenous output", "Subsubsection", CellChangeTimes->{{3.421674745859375*^9, 3.421674746328125*^9}, 3.421742419375*^9, {3.421742595984375*^9, 3.42174259621875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"u", " ", ":=", " ", RowBox[{ RowBox[{"Exp", "[", RowBox[{"\[Mu]\[Delta]", "-", FractionBox[ SuperscriptBox["\[Sigma]\[Delta]", "2"], "2"], "+", "\[Sigma]\[Delta]"}], "]"}], "-", "1"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"d", ":=", RowBox[{ RowBox[{"Exp", "[", RowBox[{"\[Mu]\[Delta]", "-", FractionBox[ SuperscriptBox["\[Sigma]\[Delta]", "2"], "2"], "-", "\[Sigma]\[Delta]"}], "]"}], "-", "1"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"\[Delta]", "[", RowBox[{"0", ",", "1"}], "]"}], " ", ":=", " ", "\[Delta]0"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"\[Delta]", "[", RowBox[{"t_", ",", " ", "j_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"t", "-", "1"}], ",", RowBox[{"Max", "[", RowBox[{ RowBox[{"j", "-", "1"}], ",", "1"}], "]"}]}], "]"}], " ", "*", RowBox[{"If", "[", " ", RowBox[{ RowBox[{"j", "\[Equal]", "1"}], ",", " ", RowBox[{"(", RowBox[{"1", " ", "+", " ", "u"}], ")"}], ",", " ", RowBox[{"(", RowBox[{"1", "+", "d"}], ")"}]}], "]"}]}]}], " ", ";"}]}], "Input", CellChangeTimes->{{3.4217425086875*^9, 3.421742510546875*^9}}] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Size up the problem and introduce exponential form (one should not have to \ open this)\ \>", "Section", CellChangeTimes->{{3.425964082109375*^9, 3.425964085875*^9}, { 3.42596415321875*^9, 3.425964153640625*^9}, {3.42596419465625*^9, 3.425964205484375*^9}, 3.426828878859375*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"NbUnknowns", "[", RowBox[{"\[Tau]_", ",", "j_"}], "]"}], ":=", RowBox[{"Length", "[", RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", "j"}], "]"}], "]"}]}], ";"}]], "Input", CellChangeTimes->{{3.426065656078125*^9, 3.426065680375*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"NbIterates", ":=", RowBox[{ RowBox[{"Length", "[", RowBox[{"UndiscountedIterate", "[", RowBox[{"1", ",", "1", ",", "2"}], "]"}], " ", "]"}], "/.", RowBox[{"Table", "[", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"1", ",", "1"}], "]"}], "\[Rule]", RowBox[{"initials", "[", RowBox[{"1", ",", " ", "1", ",", " ", "1"}], "]"}]}], " ", "]"}]}]}], ";"}]], "Input", CellChangeTimes->{{3.4257877723125*^9, 3.42578783478125*^9}, { 3.425979153421875*^9, 3.425979199078125*^9}, {3.425979250015625*^9, 3.4259792993125*^9}, {3.42597938946875*^9, 3.4259794780625*^9}, { 3.4260661175625*^9, 3.426066127296875*^9}, {3.426066176625*^9, 3.426066211421875*^9}, {3.42606625409375*^9, 3.42606626153125*^9}, { 3.426066309640625*^9, 3.42606637071875*^9}, {3.426066404*^9, 3.426066406421875*^9}, {3.426222946953125*^9, 3.4262229475*^9}, 3.426836086765625*^9}], Cell[CellGroupData[{ Cell["\<\ Turn to exponential form to guarantee positivity of the solution\ \>", "Subsection", CellChangeTimes->{{3.425570652*^9, 3.4255706665625*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Exponentiate", "[", RowBox[{"\[Tau]_", ",", "j_"}], "]"}], " ", ":=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], "[", RowBox[{"[", "ii", "]"}], "]"}], "\[Rule]", RowBox[{"Exp", "[", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], "[", RowBox[{"[", "ii", "]"}], "]"}], "]"}]}], ",", RowBox[{"{", RowBox[{"ii", ",", "1", ",", RowBox[{"NbUnknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}]}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.425118111017722*^9, 3.425118187855722*^9}, { 3.425964289265625*^9, 3.42596439546875*^9}, {3.426065743234375*^9, 3.426065755875*^9}, {3.42606651025*^9, 3.42606651834375*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Eequations", "[", RowBox[{"\[Tau]_", ",", " ", "j_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"equations", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", RowBox[{"Exponentiate", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}]}]}]], "Input", CellChangeTimes->{{3.425118210123722*^9, 3.425118268790722*^9}, 3.426065813609375*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"eUndiscountedIterate", "[", RowBox[{"\[Tau]_", ",", "j_", ",", "i_"}], "]"}], " ", ":=", RowBox[{ RowBox[{"UndiscountedIterate", "[", RowBox[{"\[Tau]", ",", "j", ",", "i"}], "]"}], "/.", " ", RowBox[{"Exponentiate", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}]}]}], ";"}]], "Input", CellChangeTimes->{{3.425624956859375*^9, 3.42562496825*^9}, { 3.4256393539375*^9, 3.42563935753125*^9}, {3.4256395545*^9, 3.425639572484375*^9}, {3.425704064359375*^9, 3.42570406478125*^9}, 3.42606581509375*^9, {3.42622295846875*^9, 3.426222964671875*^9}, { 3.426836088078125*^9, 3.4268360895625*^9}}] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Calculate function at time T - 1 (\[Tau] = 1), setting up \[Omega] - grid \ adaptively (one should not have to open this)\ \>", "Section", CellChangeTimes->{{3.425570892359375*^9, 3.4255709125625*^9}, { 3.42562112259375*^9, 3.425621140515625*^9}, {3.425621178015625*^9, 3.4256211788125*^9}, {3.425623241890625*^9, 3.425623284921875*^9}, { 3.425651418421875*^9, 3.42565141884375*^9}, {3.426142877671875*^9, 3.426142887359375*^9}, {3.426169402984375*^9, 3.4261694039375*^9}, { 3.4261694419375*^9, 3.4261694424375*^9}, {3.426169486296875*^9, 3.426169486546875*^9}, 3.4268288750625*^9}], Cell[CellGroupData[{ Cell[TextData[{ "Center grid: we use ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"2", "l"}], "+", "1"}], TraditionalForm]], "DisplayFormula"], " points" }], "Subsection", CellChangeTimes->{{3.425570971875*^9, 3.425570979875*^9}, { 3.42557134559375*^9, 3.4255713506875*^9}}], Cell["\<\ F2Undiscount will be a list of values of the Undiscounted function to be \ iterated backward at grid points. F2T will be a list of the same but \ interpolated.\ \>", "Text", CellChangeTimes->{{3.425638834671875*^9, 3.42563891171875*^9}, { 3.42683038684375*^9, 3.426830388015625*^9}, {3.426836092328125*^9, 3.426836094359375*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"F2T", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"F2Undiscount", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"Consumption", " ", "=", " ", RowBox[{"{", "}"}]}], ";"}], " "}]], "Input", CellChangeTimes->{{3.42503548674156*^9, 3.425035531424028*^9}, 3.425065899948*^9, {3.425248155861*^9, 3.425248168012*^9}, 3.425251623975*^9, {3.426830392359375*^9, 3.426830393921875*^9}, 3.426836096609375*^9}], Cell[BoxData[ RowBox[{ RowBox[{"\[Tau]", " ", "=", " ", "1"}], ";", RowBox[{"Clear", "[", "j", "]"}], ";"}]], "Input", CellChangeTimes->{{3.4250367708739605`*^9, 3.42503679267214*^9}, { 3.4250449200797997`*^9, 3.4250449226610575`*^9}, {3.42606517640625*^9, 3.426065221828125*^9}, {3.42606544071875*^9, 3.426065441546875*^9}, 3.42607134453125*^9, {3.426071391375*^9, 3.426071394859375*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"\[CapitalOmega]", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"i", " ", "-", " ", "1"}], ")"}], "/", RowBox[{"(", RowBox[{"2", "*", "l"}], ")"}]}], ",", " ", RowBox[{"{", RowBox[{"i", ",", " ", RowBox[{ RowBox[{"2", "*", "l"}], " ", "+", " ", "1"}]}], "}"}]}], "]"}]}], ";"}], " "}]], "Input", CellChangeTimes->{{3.4252238363928003`*^9, 3.4252238379769583`*^9}, { 3.4253078429031296`*^9, 3.4253078446823072`*^9}, {3.4253104953643494`*^9, 3.4253104969035034`*^9}, {3.425315916156454*^9, 3.4253159182146597`*^9}, { 3.4253162645342884`*^9, 3.425316266473482*^9}, 3.4255713681875*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"prec", " ", "=", " ", "WP"}], ";", " ", RowBox[{"locListAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"UndiscountListAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"PrevForecastLAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", "\n", " ", RowBox[{"PrevForecastRAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"accLAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"precLAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"accRAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"precRAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", "\n", " ", RowBox[{"n", " ", ":=", " ", RowBox[{"Length", "[", "\[CapitalOmega]", "]"}]}], ";", " ", RowBox[{"m", " ", ":=", " ", RowBox[{"Length", "[", "UndiscountList", "]"}]}], ";", " ", RowBox[{"ll", " ", ":=", " ", RowBox[{"Length", "[", "locList", "]"}]}], ";", " ", RowBox[{"j", " ", "=", " ", "1"}], ";", " ", "\n", RowBox[{"Do", "[", RowBox[{"(*", RowBox[{ RowBox[{ "Do", " ", "loop", " ", "over", " ", "all", " ", "the", " ", "nodes", " ", "j", " ", "of", " ", "time", " ", "T"}], " ", "-", " ", "1"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"locList", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"UndiscountList", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", "\n", " ", RowBox[{"(*", RowBox[{"Centerpoint", " ", "for", " ", "that", " ", "node"}], "*)"}], "\[IndentingNewLine]", " ", RowBox[{"lastSol", " ", "=", " ", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{ RowBox[{"equations", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", RowBox[{"dummy", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", RowBox[{"l", " ", "+", " ", "1"}]}], "]"}]}], ",", " ", "\n", " ", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], ",", " ", RowBox[{"initials", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", RowBox[{"l", " ", "+", " ", "1"}]}], "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"PrecisionGoal", " ", "->", " ", "PG"}], ",", " ", "\n", " ", RowBox[{"WorkingPrecision", " ", "->", " ", "prec"}], ",", RowBox[{"MaxIterations", "\[Rule]", "20000"}]}], "]"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"locList", ",", " ", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "lastSol"}]}], "]"}], ";", " ", "\n", " ", RowBox[{"AppendTo", "[", RowBox[{"UndiscountList", ",", " ", RowBox[{ RowBox[{"UndiscountedIterate", "[", RowBox[{"\[Tau]", ",", "j", ",", RowBox[{"l", "+", "1"}]}], "]"}], " ", "/.", " ", "lastSol"}]}], "]"}], ";", " ", RowBox[{"ii", " ", "=", " ", "1"}], ";", "\n", " ", RowBox[{"Do", "[", RowBox[{"(*", RowBox[{ "Do", " ", "loop", " ", "over", " ", "all", " ", "the", " ", "grid", " ", "points", " ", "ii", " ", "of", " ", "one", " ", "node"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"Prediction", ":", " ", RowBox[{ "Predict", " ", "solution", " ", "at", " ", "the", " ", "next", " ", "grid", " ", "point", " ", "to", " ", "the", " ", "right"}]}], ",", " ", RowBox[{ "to", " ", "serve", " ", "as", " ", "starting", " ", "solution", " ", "next", " ", "time", " ", "we", " ", "call", " ", RowBox[{"FindRoot", ":", " ", RowBox[{ "if", " ", "three", " ", "points", " ", "are", " ", "available"}]}]}], ",", " ", RowBox[{"use", " ", "an", " ", RowBox[{"extrapolation", ".", " ", "If"}], " ", "not"}], ",", " ", RowBox[{ "use", " ", "the", " ", "initial", " ", "values", " ", "provided", " ", "when", " ", "defining", " ", "the", " ", "equation", " ", "systsem"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"guess", " ", "=", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"ii", " ", "<", " ", "3"}], ",", " ", RowBox[{"initials", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", RowBox[{"l", " ", "+", " ", "1", " ", "+", " ", "ii"}]}], "]"}], ",", " ", "\n", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "ii", " ", "-", " ", "3"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"2", "*", "ii"}], " ", "-", " ", "4"}], ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "ii", " ", "-", " ", "2"}], "]"}], "]"}], ",", " ", "\n", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"2", "*", "ii"}], " ", "-", " ", "3"}], ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "ii", " ", "-", " ", "1"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"2", "*", "ii"}], " ", "-", " ", "2"}], ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "ii"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{ RowBox[{"2", "*", "ii"}], " ", "-", " ", "1"}], ",", "k"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "y"}], "]"}], " ", "/.", " ", "\n", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "1", " ", "+", " ", "ii"}], "]"}], "]"}]}], "}"}]}], ")"}], ",", " ", RowBox[{"{", RowBox[{"k", ",", RowBox[{"NbUnknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}]}], "}"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Correction", ":", " ", RowBox[{ "Calculate", " ", "the", " ", "next", " ", "point", " ", "to", " ", "the", " ", "right"}]}], "*)"}], "\n", " ", RowBox[{"lastSol", " ", "=", " ", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{ RowBox[{"equations", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", RowBox[{"dummy", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", RowBox[{"l", " ", "+", " ", "1", " ", "+", " ", "ii"}]}], "]"}]}], ",", " ", "\n", " ", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], ",", " ", "guess"}], "}"}], "]"}], ",", " ", RowBox[{"PrecisionGoal", " ", "->", " ", "PG"}], ",", " ", RowBox[{"WorkingPrecision", " ", "->", " ", "prec"}], ",", RowBox[{"MaxIterations", "\[Rule]", "20000"}]}], "]"}]}], ";", " ", RowBox[{"(*", RowBox[{"Record", " ", "the", " ", RowBox[{"result", ":", " ", RowBox[{ "locList", " ", "contains", " ", "the", " ", "results", " ", "for", " ", "equilibrium", " ", "consumptions", " ", "and", " ", "UndiscountList", " ", "contains", " ", "the", " ", "result", " ", "for", " ", "the", " ", "Undiscounted", " ", "function"}]}]}], "*)"}], "\[IndentingNewLine]", " ", RowBox[{"AppendTo", "[", RowBox[{"locList", ",", " ", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "lastSol"}]}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"UndiscountList", ",", " ", "\n", " ", RowBox[{ RowBox[{"UndiscountedIterate", "[", RowBox[{"\[Tau]", ",", "j", ",", RowBox[{"l", "+", "1", "+", "ii"}]}], "]"}], "/.", " ", "\n", " ", "lastSol"}]}], "]"}], ";", "\[IndentingNewLine]", " ", RowBox[{"(*", RowBox[{ RowBox[{"Prediction", ":", " ", RowBox[{ "predict", " ", "solution", " ", "at", " ", "the", " ", "next", " ", "grid", " ", "point", " ", "to", " ", "the", " ", "left"}]}], ",", " ", RowBox[{ "to", " ", "serve", " ", "as", " ", "starting", " ", "solution", " ", "next", " ", "time", " ", "we", " ", "call", " ", RowBox[{"FindRoot", ":", " ", RowBox[{ "if", " ", "three", " ", "points", " ", "are", " ", "available"}]}]}], ",", " ", RowBox[{"use", " ", "an", " ", RowBox[{"extrapolation", ".", " ", "If"}], " ", "not"}], ",", " ", RowBox[{ "use", " ", "the", " ", "initial", " ", "values", " ", "provided", " ", "when", " ", "defining", " ", "the", " ", "equation", " ", "systsem"}]}], "*)"}], " ", "\[IndentingNewLine]", RowBox[{"guess", " ", "=", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"ii", " ", "<", " ", "3"}], ",", " ", RowBox[{"initials", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", RowBox[{"l", " ", "+", " ", "1", " ", "-", " ", "ii"}]}], "]"}], ",", " ", "\n", RowBox[{"Table", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "2", " ", "-", " ", "ii"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"1", ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "3", " ", "-", " ", "ii"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", "\n", " ", RowBox[{"2", ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "4", " ", "-", " ", "ii"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"3", ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "5", " ", "-", " ", "ii"}], "]"}], "]"}], ",", " ", "\n", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"4", ",", "k"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"l", " ", "+", " ", "1", " ", "-", " ", "ii"}], "]"}], "]"}]}], "}"}]}], ")"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{"k", ",", RowBox[{"NbUnknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}]}], "}"}]}], "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Correction", ":", " ", RowBox[{ "Calculate", " ", "the", " ", "next", " ", "point", " ", "to", " ", "the", " ", "right"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{"lastSol", " ", "=", " ", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{ RowBox[{"equations", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "\n", " ", RowBox[{"dummy", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", RowBox[{"l", " ", "+", " ", "1", " ", "-", " ", "ii"}]}], "]"}]}], ",", " ", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], ",", " ", "guess"}], "}"}], "]"}], ",", " ", RowBox[{"PrecisionGoal", " ", "->", " ", "PG"}], ",", " ", "\n", " ", RowBox[{"WorkingPrecision", " ", "->", " ", "prec"}]}], "]"}]}], ";", " ", "\[IndentingNewLine]", " ", RowBox[{"(*", RowBox[{"Record", " ", "the", " ", "result"}], "*)"}], "\[IndentingNewLine]", RowBox[{"PrependTo", "[", RowBox[{"locList", ",", " ", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "lastSol"}]}], "]"}], ";", " ", RowBox[{"PrependTo", "[", RowBox[{"UndiscountList", ",", " ", RowBox[{ RowBox[{"UndiscountedIterate", "[", RowBox[{"\[Tau]", ",", "j", ",", RowBox[{"l", "+", "1", "-", "ii"}]}], "]"}], "/.", " ", "lastSol"}]}], "]"}], ";", "\[IndentingNewLine]", " ", RowBox[{"ii", " ", "=", " ", RowBox[{"ii", " ", "+", " ", "1"}]}], ";"}], " ", ",", " ", RowBox[{"{", RowBox[{"l", " ", "-", " ", "1"}], "}"}]}], "]"}], ";", " ", "\[IndentingNewLine]", " ", RowBox[{"(*", RowBox[{ "Record", " ", "all", " ", "the", " ", "gridpoint", " ", "values", " ", "of", " ", "the", " ", "Undiscounted", " ", "function", " ", "for", " ", "this", " ", "node"}], "*)"}], " ", "\n", RowBox[{"AppendTo", "[", RowBox[{"locListAll", ",", " ", "locList"}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"UndiscountListAll", ",", " ", "UndiscountList"}], "]"}], ";", " ", "\n", " ", RowBox[{"(*", RowBox[{ "Extrapolate", " ", "to", " ", "the", " ", "endpoints", " ", "to", " ", "keep", " ", "track", " ", "of", " ", "how", " ", "much", " ", "the", " ", "endpoint", " ", "changes", " ", "as", " ", "one", " ", "expands", " ", "the", " ", "grid"}], "*)"}], "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Right", " ", "endpoint"}], "*)"}], RowBox[{"PrevForecastR", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "4"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{ RowBox[{"m", " ", "-", " ", "3"}], ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "3"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{ RowBox[{"m", " ", "-", " ", "2"}], ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "2"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{ RowBox[{"m", " ", "-", " ", "1"}], ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "1"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"m", ",", "iterate"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "y"}], "]"}], " ", ")"}], "/.", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "n", "]"}], "]"}]}], "}"}]}], ",", RowBox[{"{", RowBox[{"iterate", ",", "1", ",", "NbIterates"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", " ", RowBox[{"(*", RowBox[{ "Record", " ", "the", " ", "resulting", " ", "forecast", " ", "into", " ", "a", " ", "list", " ", "called", " ", "\"\\""}], "*)"}], "\[IndentingNewLine]", " ", RowBox[{"AppendTo", "[", RowBox[{"PrevForecastRAll", ",", " ", "PrevForecastR"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Left", " ", "endpoint"}], "*)"}], RowBox[{"PrevForecastL", " ", "=", " ", "\n", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "2", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"1", ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "3", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"2", ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "4", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"3", ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "5", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"4", ",", "iterate"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "\n", " ", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], ")"}], ",", RowBox[{"{", RowBox[{"iterate", ",", "1", ",", "NbIterates"}], "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", " ", RowBox[{"(*", RowBox[{ "Record", " ", "the", " ", "resulting", " ", "forecast", " ", "into", " ", "a", " ", "list", " ", "called", " ", "\"\\""}], "*)"}], "\[IndentingNewLine]", RowBox[{"AppendTo", "[", RowBox[{"PrevForecastLAll", ",", " ", "PrevForecastL"}], "]"}], ";", "\n", RowBox[{"(*", RowBox[{ "Initiate", " ", "lists", " ", "that", " ", "will", " ", "be", " ", "used", " ", "in", " ", "the", " ", "next", " ", "subsection", " ", "to", " ", "keep", " ", "track", " ", "of", " ", "the", " ", "precision", " ", "of", " ", "the", " ", "endpoints"}], "*)"}], " ", "\[IndentingNewLine]", " ", RowBox[{"AppendTo", "[", RowBox[{"accLAll", ",", " ", "1"}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"precLAll", ",", " ", "1"}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"accRAll", ",", " ", "1"}], "]"}], ";", " ", "\n", " ", RowBox[{"AppendTo", "[", RowBox[{"precRAll", ",", " ", "1"}], "]"}], ";", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Go", " ", "to", " ", "the", " ", "next", " ", "node"}], "*)"}], "\[IndentingNewLine]", " ", RowBox[{"j", " ", "=", " ", RowBox[{"j", " ", "+", " ", "1"}]}]}], ",", RowBox[{"{", RowBox[{"TotK", "[", RowBox[{"T", "-", "\[Tau]"}], "]"}], "}"}]}], "]"}], ";", " ", RowBox[{"Clear", "[", "j", "]"}], ";"}], " ", ")"}], "//", "Timing"}]], "Input", CellChangeTimes->{{3.4250468954953213`*^9, 3.4250469115689287`*^9}, { 3.4250469493637075`*^9, 3.4250469507638474`*^9}, 3.425047011101881*^9, { 3.42504705079885*^9, 3.4250470775235224`*^9}, {3.425047113591129*^9, 3.4250471491106806`*^9}, {3.4250472341441827`*^9, 3.425047253297098*^9}, { 3.4250473176665344`*^9, 3.425047335115279*^9}, {3.425047889642726*^9, 3.425047953419103*^9}, 3.425048038976658*^9, {3.425048108408601*^9, 3.4250481086706266`*^9}, {3.425048261356894*^9, 3.4250482681765757`*^9}, { 3.4250483509248495`*^9, 3.4250483516199193`*^9}, 3.42504848134089*^9, { 3.425048672737028*^9, 3.425048706534407*^9}, {3.425048973416093*^9, 3.4250490693486853`*^9}, {3.425067139466*^9, 3.425067170759*^9}, { 3.425067553192*^9, 3.425067567734*^9}, {3.425071105803*^9, 3.425071106755*^9}, {3.425071172711*^9, 3.425071173783*^9}, { 3.4250713018*^9, 3.425071322942*^9}, {3.425071357109*^9, 3.425071358301*^9}, {3.425072003488*^9, 3.425072004264*^9}, { 3.425072561543*^9, 3.425072564678*^9}, {3.4250726316099997`*^9, 3.4250726323859997`*^9}, {3.425072680796*^9, 3.42507268171*^9}, { 3.425072918778*^9, 3.425072919881*^9}, {3.425072988542*^9, 3.4250729892539997`*^9}, {3.4250731454119997`*^9, 3.425073145901*^9}, { 3.425073275955*^9, 3.4250732980109997`*^9}, {3.4250739562279997`*^9, 3.425073958948*^9}, {3.425077005426*^9, 3.425077032639*^9}, { 3.425077207773*^9, 3.4250772265559998`*^9}, 3.4250775627869997`*^9, { 3.425077610024*^9, 3.425077616608*^9}, {3.425077733599*^9, 3.425077771361*^9}, {3.425077977448*^9, 3.425078006859*^9}, { 3.425078046006*^9, 3.425078055723*^9}, {3.4250781011359997`*^9, 3.425078180801*^9}, {3.425078257417*^9, 3.425078266119*^9}, { 3.425078300558*^9, 3.4250783018859997`*^9}, 3.425078410322*^9, 3.425078440604*^9, {3.425078474436*^9, 3.425078495023*^9}, { 3.425078596361*^9, 3.425078662493*^9}, {3.425079172837*^9, 3.425079173262*^9}, {3.4250793070369997`*^9, 3.425079307751*^9}, { 3.425079472395*^9, 3.425079566075*^9}, {3.425079603176*^9, 3.425079807533*^9}, {3.4250798411619997`*^9, 3.425080022132*^9}, { 3.425081572594*^9, 3.42508157304*^9}, {3.425081663076*^9, 3.4250817182390003`*^9}, {3.425116702019722*^9, 3.425116730297722*^9}, { 3.425116977321722*^9, 3.425116987842722*^9}, {3.425121183881722*^9, 3.425121186510722*^9}, {3.425122939513722*^9, 3.425122944833722*^9}, 3.425154152725*^9, {3.4251542226470003`*^9, 3.425154231047*^9}, { 3.425154359994*^9, 3.425154405115*^9}, {3.425154444663*^9, 3.425154524509*^9}, {3.425155060429*^9, 3.4251550984449997`*^9}, { 3.4252030977648525`*^9, 3.425203101070183*^9}, 3.425204094590525*^9, { 3.4252198675719576`*^9, 3.4252198719643965`*^9}, {3.425220413181513*^9, 3.4252204421304073`*^9}, {3.4252205015363474`*^9, 3.425220502399434*^9}, { 3.425220964386628*^9, 3.425220984266616*^9}, {3.4252210759217806`*^9, 3.425221076409829*^9}, {3.425221858164997*^9, 3.425221864903671*^9}, { 3.4252222951236887`*^9, 3.425222316928869*^9}, {3.425222616852858*^9, 3.425222625131686*^9}, 3.42522377198236*^9, 3.425223856510812*^9, { 3.4252239877559347`*^9, 3.4252239970158606`*^9}, {3.4252240295961185`*^9, 3.4252240298981485`*^9}, {3.425224154036561*^9, 3.425224221385295*^9}, { 3.4252242652016764`*^9, 3.4252242973758936`*^9}, {3.4252243473828936`*^9, 3.4252243763307886`*^9}, {3.4252244188170366`*^9, 3.4252246681059628`*^9}, {3.425224720315183*^9, 3.4252247565738087`*^9}, { 3.425225047155864*^9, 3.425225054238572*^9}, {3.425246936507*^9, 3.425246939274*^9}, {3.425256689317*^9, 3.4252566904849997`*^9}, { 3.425289281001031*^9, 3.4252892814990807`*^9}, {3.425289414992429*^9, 3.4252894790148306`*^9}, {3.425289677054632*^9, 3.4252897302999563`*^9}, { 3.425294546766555*^9, 3.425294580289907*^9}, {3.4252958705559206`*^9, 3.425295873415207*^9}, {3.425295959509815*^9, 3.4252959598448486`*^9}, 3.425296030422906*^9, 3.425297658165948*^9, {3.425314978396109*^9, 3.4253150174451094`*^9}, {3.425315468682109*^9, 3.4253154710511093`*^9}, { 3.425621393640625*^9, 3.425621425046875*^9}, {3.4256214889375*^9, 3.425621499359375*^9}, 3.425622391578125*^9, {3.425622446046875*^9, 3.4256225745*^9}, {3.42562265815625*^9, 3.42562268209375*^9}, { 3.42562274575*^9, 3.425622748046875*^9}, {3.42562278375*^9, 3.425622991359375*^9}, {3.425623558375*^9, 3.425623652046875*^9}, { 3.42562368565625*^9, 3.42562381665625*^9}, {3.425623907515625*^9, 3.425623946578125*^9}, 3.425624240609375*^9, {3.4256245353125*^9, 3.425624565078125*^9}, {3.4256247426875*^9, 3.425624778921875*^9}, { 3.425624871546875*^9, 3.425624905265625*^9}, {3.42563948128125*^9, 3.425639509765625*^9}, 3.425639815546875*^9, 3.425639846671875*^9, { 3.425651845734375*^9, 3.425651855953125*^9}, {3.42565525553125*^9, 3.425655258921875*^9}, {3.425704230171875*^9, 3.425704261328125*^9}, { 3.42570483803125*^9, 3.425704846921875*^9}, {3.425704914921875*^9, 3.425704951921875*^9}, {3.425705009625*^9, 3.425705070640625*^9}, { 3.425705158328125*^9, 3.425705168546875*^9}, {3.42570526596875*^9, 3.42570530025*^9}, {3.425705393125*^9, 3.425705435234375*^9}, { 3.425705705640625*^9, 3.425705731140625*^9}, {3.425705817140625*^9, 3.425705849203125*^9}, {3.425705979578125*^9, 3.425706034359375*^9}, { 3.4257061315*^9, 3.4257061318125*^9}, {3.425706167875*^9, 3.42570617015625*^9}, {3.425706207078125*^9, 3.425706273359375*^9}, { 3.425706390703125*^9, 3.425706391234375*^9}, 3.4257072061875*^9, 3.42570794428125*^9, {3.425708196765625*^9, 3.42570821953125*^9}, { 3.425708259609375*^9, 3.42570826253125*^9}, {3.4257083335625*^9, 3.425708380859375*^9}, {3.4257084531875*^9, 3.425708470515625*^9}, { 3.425708585171875*^9, 3.425708601859375*^9}, {3.42570871196875*^9, 3.42570874509375*^9}, {3.425785166609375*^9, 3.425785217078125*^9}, 3.425786858390625*^9, {3.425786889265625*^9, 3.42578690578125*^9}, { 3.42578741903125*^9, 3.425787446296875*^9}, {3.425787715984375*^9, 3.425787730875*^9}, {3.4257878658125*^9, 3.4257879379375*^9}, { 3.425788050546875*^9, 3.42578808628125*^9}, {3.42578817628125*^9, 3.425788218046875*^9}, {3.42578866790625*^9, 3.425788690125*^9}, { 3.4257887208125*^9, 3.425788731859375*^9}, {3.425788972703125*^9, 3.425789005125*^9}, {3.425789355734375*^9, 3.4257893655*^9}, { 3.425789508796875*^9, 3.4257895171875*^9}, {3.4257896863125*^9, 3.4257897078125*^9}, {3.42578975084375*^9, 3.4257897858125*^9}, { 3.425789862859375*^9, 3.425789875609375*^9}, {3.4257901748125*^9, 3.42579026684375*^9}, {3.425790314453125*^9, 3.425790354171875*^9}, { 3.42588409953125*^9, 3.42588411021875*^9}, {3.425884178921875*^9, 3.4258841995625*^9}, {3.425889026484375*^9, 3.4258890553125*^9}, { 3.425974314484375*^9, 3.425974317796875*^9}, {3.425974576140625*^9, 3.425974600359375*^9}, {3.425974741203125*^9, 3.4259747418125*^9}, { 3.4259748194375*^9, 3.42597484171875*^9}, {3.42597514415625*^9, 3.4259751686875*^9}, {3.4259752234375*^9, 3.42597522478125*^9}, { 3.425976894015625*^9, 3.425976900171875*^9}, {3.425976974703125*^9, 3.42597699284375*^9}, {3.425977042265625*^9, 3.4259770945*^9}, { 3.42597722728125*^9, 3.42597724940625*^9}, {3.42597728796875*^9, 3.4259772884375*^9}, {3.425977957296875*^9, 3.42597813259375*^9}, { 3.425979612265625*^9, 3.425979655625*^9}, {3.42597969975*^9, 3.42597970984375*^9}, {3.4260657684375*^9, 3.426065769625*^9}, { 3.4260665574375*^9, 3.426066563796875*^9}, {3.4260685694375*^9, 3.426068586421875*^9}, {3.42607143825*^9, 3.42607152734375*^9}, { 3.4260715586875*^9, 3.4260715605*^9}, {3.426071650046875*^9, 3.42607166696875*^9}, {3.426071731796875*^9, 3.426071768578125*^9}, { 3.426071802421875*^9, 3.4260718050625*^9}, 3.42607204715625*^9, { 3.426075330734375*^9, 3.426075363421875*^9}, {3.426077029703125*^9, 3.426077088578125*^9}, {3.426077351203125*^9, 3.4260773586875*^9}, { 3.426077393421875*^9, 3.426077435453125*^9}, {3.426077741796875*^9, 3.426077769234375*^9}, {3.426169515765625*^9, 3.426169516046875*^9}, { 3.426223056546875*^9, 3.426223073765625*^9}, {3.42622335746875*^9, 3.426223359953125*^9}, {3.42622341715625*^9, 3.42622341875*^9}, { 3.426246090484375*^9, 3.42624610503125*^9}, {3.4262461559375*^9, 3.426246178390625*^9}, 3.42624636915625*^9, {3.42683609775*^9, 3.4268361306875*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"20.141`", ",", "Null"}], "}"}]], "Output", CellChangeTimes->{3.462100236444907*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "For all nodes, expand ", Cell[BoxData[ FormBox["\[CapitalOmega]", TraditionalForm]]], " to the left until either the extrapolation precision at all nodes, or the \ extrapolation accuracy at all nodes becomes ", Cell[BoxData[ FormBox[ RowBox[{"\[LessSlantEqual]", "EndPointsGoal"}], TraditionalForm]]] }], "Subsection", CellChangeTimes->{{3.4252273768598113`*^9, 3.425227465044629*^9}, { 3.425307915760415*^9, 3.425307929301769*^9}, {3.425571604*^9, 3.425571628828125*^9}, 3.42562174290625*^9, {3.42562301978125*^9, 3.4256230235625*^9}}], Cell["\<\ As we get closer to the edges of the \[Omega] grid, we prefer to use the \ equation system in the exponential form, lest FindRoot attempt to compute \ with negative values of consumption*)\ \>", "Text", CellChangeTimes->{{3.425624368671875*^9, 3.42562442509375*^9}, { 3.42562446365625*^9, 3.42562448925*^9}, 3.42618678209375*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"While", "[", RowBox[{ RowBox[{ RowBox[{"Min", "[", RowBox[{ RowBox[{"Max", "[", "precLAll", "]"}], ",", " ", RowBox[{"Max", "[", "accLAll", "]"}]}], "]"}], " ", ">", " ", "EndPointsGoal"}], ",", " ", "\n", " ", RowBox[{ RowBox[{"precLAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"accLAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{ "Replace", " ", "the", " ", "first", " ", "point", " ", "in", " ", "the", " ", "\[Omega]"}], "-", RowBox[{ "list", " ", "with", " ", "one", " ", "that", " ", "is", " ", "closer", " ", "to", " ", "the", " ", "second", " ", "point"}]}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "1", "]"}], "]"}], " ", "=", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "*", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], ";", " ", RowBox[{"PrependTo", "[", RowBox[{"\[CapitalOmega]", ",", " ", "0"}], "]"}], ";", " ", RowBox[{"prec", " ", "=", " ", "1000"}], ";", " ", "\n", " ", RowBox[{"j", " ", "=", " ", "1"}], ";", " ", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"locList", " ", "=", " ", RowBox[{"locListAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", RowBox[{"UndiscountList", " ", "=", " ", RowBox[{"UndiscountListAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", "\n", " ", RowBox[{"PrevForecastL", " ", "=", " ", RowBox[{"PrevForecastLAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", "\n", " ", RowBox[{"guess", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "3", "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"1", ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "4", "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"2", ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "5", "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"3", ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "6", "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"4", ",", "k"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "y"}], "]"}], " ", "/.", " ", "\n", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "2", "]"}], "]"}]}], "}"}]}], ",", " ", RowBox[{"{", RowBox[{"k", ",", RowBox[{"NbUnknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}]}], "}"}]}], "]"}]}], ";", " ", RowBox[{"lastSol", " ", "=", " ", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{ RowBox[{"Eequations", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "\n", " ", RowBox[{"dummy", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", "2"}], "]"}]}], ",", " ", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], ",", " ", RowBox[{"Log", "[", "guess", "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"PrecisionGoal", " ", "->", " ", "PG"}], ",", " ", "\n", " ", RowBox[{"WorkingPrecision", " ", "->", " ", "prec"}], ",", " ", RowBox[{"MaxIterations", " ", "->", " ", "2000"}]}], "]"}]}], ";", " ", RowBox[{"PrependTo", "[", RowBox[{"locList", ",", " ", "\n", " ", RowBox[{"Exp", "[", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "lastSol"}], "]"}]}], "]"}], ";", " ", RowBox[{"PrependTo", "[", RowBox[{"UndiscountList", ",", " ", "\n", " ", RowBox[{ RowBox[{"eUndiscountedIterate", "[", RowBox[{"\[Tau]", ",", "j", ",", "2"}], "]"}], "/.", " ", "lastSol"}]}], "]"}], ";", RowBox[{"LastForecastL", " ", "=", " ", "\n", " ", RowBox[{"Table", "[", " ", RowBox[{ RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "2", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"1", ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "3", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"2", ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "4", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"3", ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "5", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"4", ",", "iterate"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "\n", " ", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], ",", RowBox[{"{", RowBox[{"iterate", ",", "1", ",", "NbIterates"}], "}"}]}], "]"}]}], ";", RowBox[{"precL", " ", "=", " ", RowBox[{"Abs", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", "LastForecastL", "]"}], "/", RowBox[{"Abs", "[", "PrevForecastL", "]"}]}], " ", "-", " ", "1"}], "]"}]}], ";", " ", "\n", " ", RowBox[{"accL", " ", "=", " ", RowBox[{"Abs", "[", RowBox[{ RowBox[{"Abs", "[", "LastForecastL", "]"}], " ", "-", " ", RowBox[{"Abs", "[", "PrevForecastL", "]"}]}], "]"}]}], ";", " ", RowBox[{"PrevForecastL", " ", "=", " ", "LastForecastL"}], ";", " ", "\n", " ", RowBox[{ RowBox[{"locListAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "locList"}], ";", " ", RowBox[{ RowBox[{"UndiscountListAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "UndiscountList"}], ";", " ", "\n", " ", RowBox[{ RowBox[{"PrevForecastLAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "PrevForecastL"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"precLAll", ",", " ", "precL"}], "]"}], ";", " ", "\n", " ", RowBox[{"AppendTo", "[", RowBox[{"accLAll", ",", " ", "accL"}], "]"}], ";", " ", RowBox[{"j", " ", "=", " ", RowBox[{"j", " ", "+", " ", "1"}]}], ";"}], " ", ",", RowBox[{"{", RowBox[{"TotK", "[", RowBox[{"T", "-", "\[Tau]"}], "]"}], "}"}]}], "]"}]}]}], "\[IndentingNewLine]", "]"}], ";", " ", RowBox[{"Clear", "[", "j", "]"}]}], ")"}], "//", "Timing"}]], "Input", CellChangeTimes->{{3.425121499257722*^9, 3.425121501955722*^9}, { 3.425121592616722*^9, 3.425121630851722*^9}, {3.4251220812007217`*^9, 3.425122088895722*^9}, {3.425124315515089*^9, 3.4251244333666544`*^9}, { 3.425125003847076*^9, 3.425125023975089*^9}, {3.425155357091*^9, 3.425155460316*^9}, {3.425155500307*^9, 3.425155501624*^9}, { 3.425155533005*^9, 3.425155601146*^9}, {3.4252038254606147`*^9, 3.4252038468647547`*^9}, {3.425204279681032*^9, 3.4252042935664206`*^9}, { 3.4252201399311905`*^9, 3.425220144942692*^9}, {3.4252201807252693`*^9, 3.425220192598457*^9}, {3.425221144955683*^9, 3.4252212229184785`*^9}, { 3.4252213005312395`*^9, 3.4252213180379896`*^9}, {3.4252213890800934`*^9, 3.425221392765462*^9}, 3.4252215221193953`*^9, {3.4252216430724897`*^9, 3.425221690894272*^9}, {3.4252217986430454`*^9, 3.4252218014643273`*^9}, { 3.425221844530634*^9, 3.4252218494861293`*^9}, {3.425221907121892*^9, 3.4252219251256924`*^9}, {3.4252219747416534`*^9, 3.4252220738345613`*^9}, {3.4252223332815037`*^9, 3.4252223544476204`*^9}, {3.4252223961757927`*^9, 3.425222408744049*^9}, { 3.4252225679549685`*^9, 3.4252225695311265`*^9}, {3.4252252037875257`*^9, 3.425225448533998*^9}, {3.4252254888510294`*^9, 3.425225505370681*^9}, { 3.425225587475891*^9, 3.4252256264367867`*^9}, {3.4252256861447563`*^9, 3.4252256971138535`*^9}, {3.4252260586049986`*^9, 3.425226183480485*^9}, { 3.425226221451282*^9, 3.4252262254576826`*^9}, {3.425226261745311*^9, 3.4252262724103775`*^9}, {3.425246944675*^9, 3.425246947092*^9}, { 3.4253079389397326`*^9, 3.4253079602408624`*^9}, {3.4253150425561094`*^9, 3.425315044263109*^9}, 3.42557110565625*^9, {3.425623365171875*^9, 3.425623377453125*^9}, {3.425624010015625*^9, 3.425624040421875*^9}, { 3.4256250083125*^9, 3.425625015953125*^9}, {3.42562509228125*^9, 3.425625095015625*^9}, 3.42563984971875*^9, {3.425651863140625*^9, 3.425651868*^9}, {3.425704235203125*^9, 3.4257042625*^9}, { 3.425712905296875*^9, 3.4257129055625*^9}, {3.4257129369375*^9, 3.425712937390625*^9}, {3.42578547709375*^9, 3.425785480421875*^9}, 3.42579041665625*^9, {3.42579045634375*^9, 3.42579048259375*^9}, 3.425790525984375*^9, {3.42579103271875*^9, 3.42579106134375*^9}, { 3.425791114375*^9, 3.425791115015625*^9}, {3.42579115653125*^9, 3.425791163640625*^9}, {3.4258885700625*^9, 3.425888570390625*^9}, { 3.42588861409375*^9, 3.425888617953125*^9}, {3.425889193359375*^9, 3.425889195734375*^9}, 3.42606577303125*^9, {3.42607209246875*^9, 3.426072093921875*^9}, 3.426075378734375*^9, {3.42616952859375*^9, 3.426169528828125*^9}, {3.4262231235625*^9, 3.426223124140625*^9}, { 3.42683613171875*^9, 3.426836138578125*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"40.282000000000004`", ",", "Null"}], "}"}]], "Output", CellChangeTimes->{3.462100276922289*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ "number", " ", "of", " ", "points", " ", "added", " ", "to", " ", "the", " ", "left"}], "*)"}], RowBox[{"n1", " ", "=", " ", RowBox[{"n", " ", "-", " ", RowBox[{"2", "*", "l"}], " ", "-", " ", "1"}]}]}]], "Input", CellChangeTimes->{{3.425247603763*^9, 3.425247630826*^9}, 3.4253105536841807`*^9, {3.4259797776875*^9, 3.4259797884375*^9}}], Cell[BoxData["16"], "Output", CellChangeTimes->{3.4621002770004005`*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "For all nodes, expand ", Cell[BoxData[ FormBox["\[CapitalOmega]", TraditionalForm]]], " to the right until either the extrapolation precision at all nodes, or the \ extrapolation accuracy at all nodes becomes ", Cell[BoxData[ FormBox[ RowBox[{"\[LessSlantEqual]", "EndPointsGoal"}], TraditionalForm]]] }], "Subsection", CellChangeTimes->{{3.4252273768598113`*^9, 3.425227465044629*^9}, { 3.4252276091870413`*^9, 3.4252276119703197`*^9}, {3.425308008448683*^9, 3.4253080119580336`*^9}, {3.425571611546875*^9, 3.4255716226875*^9}, 3.425621750765625*^9, {3.42562303453125*^9, 3.425623039875*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"While", "[", RowBox[{ RowBox[{ RowBox[{"Min", "[", RowBox[{ RowBox[{"Max", "[", "precRAll", "]"}], ",", " ", RowBox[{"Max", "[", "accRAll", "]"}]}], "]"}], " ", ">", " ", "EndPointsGoal"}], ",", " ", RowBox[{ RowBox[{"precRAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"accRAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", "\n", " ", RowBox[{"(*", RowBox[{ RowBox[{ "Replace", " ", "the", " ", "last", " ", "point", " ", "in", " ", "the", " ", "\[Omega]"}], "-", RowBox[{ "list", " ", "with", " ", "one", " ", "that", " ", "is", " ", "closer", " ", "to", " ", "the", " ", "last"}], "-", "but", "-", RowBox[{"one", " ", "point"}]}], "*)"}], "\[IndentingNewLine]", " ", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "n", "]"}], "]"}], " ", "=", " ", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "*", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "1"}], "]"}], "]"}]}], " ", "+", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "*", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "n", "]"}], "]"}]}]}]}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"\[CapitalOmega]", ",", " ", "1"}], "]"}], ";", " ", RowBox[{"prec", " ", "=", " ", "1000"}], ";", " ", RowBox[{"j", " ", "=", " ", "1"}], ";", " ", "\n", " ", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"locList", " ", "=", " ", RowBox[{"locListAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", RowBox[{"UndiscountList", " ", "=", " ", RowBox[{"UndiscountListAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", "\n", " ", RowBox[{"PrevForecastR", " ", "=", " ", RowBox[{"PrevForecastRAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", "\n", " ", RowBox[{"guess", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "5"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{"ll", " ", "-", " ", "3"}], ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "4"}], "]"}], "]"}], ",", " ", "\n", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{"ll", " ", "-", " ", "2"}], ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "3"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{"ll", " ", "-", " ", "1"}], ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "2"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"ll", ",", "k"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "1"}], "]"}], "]"}]}], "}"}]}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{"k", ",", RowBox[{"NbUnknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}]}], "}"}]}], "]"}]}], ";", " ", RowBox[{"lastSol", " ", "=", " ", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{ RowBox[{"Eequations", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", RowBox[{"dummy", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", RowBox[{"n", " ", "-", " ", "1"}]}], "]"}]}], ",", " ", "\n", " ", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], ",", " ", RowBox[{"Log", "[", "guess", "]"}]}], "}"}], "]"}], ",", " ", RowBox[{"PrecisionGoal", " ", "->", " ", "PG"}], ",", " ", RowBox[{"WorkingPrecision", " ", "->", " ", "prec"}], ",", " ", "\n", " ", RowBox[{"MaxIterations", " ", "->", " ", "2000"}]}], "]"}]}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"locList", ",", " ", RowBox[{"Exp", "[", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "lastSol"}], "]"}]}], "]"}], ";", " ", "\n", " ", RowBox[{"AppendTo", "[", RowBox[{"UndiscountList", ",", " ", RowBox[{ RowBox[{"eUndiscountedIterate", "[", RowBox[{"\[Tau]", ",", "j", ",", RowBox[{"n", "-", "1"}]}], "]"}], " ", "/.", " ", "lastSol"}]}], "]"}], ";", " ", "\n", " ", RowBox[{"LastForecastR", " ", "=", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "4"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{ RowBox[{"ll", " ", "-", " ", "3"}], ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "3"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{ RowBox[{"ll", " ", "-", " ", "2"}], ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "2"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{ RowBox[{"ll", " ", "-", " ", "1"}], ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "1"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"ll", ",", "iterate"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "n", "]"}], "]"}]}], "}"}]}], ",", RowBox[{"{", RowBox[{"iterate", ",", "1", ",", "NbIterates"}], "}"}]}], "]"}]}], ";", " ", "\n", " ", RowBox[{"precR", " ", "=", " ", RowBox[{"Abs", "[", RowBox[{ RowBox[{ RowBox[{"Abs", "[", "LastForecastR", "]"}], "/", RowBox[{"Abs", "[", "PrevForecastR", "]"}]}], " ", "-", " ", "1"}], "]"}]}], ";", " ", "\n", " ", RowBox[{"accR", " ", "=", " ", RowBox[{"Abs", "[", RowBox[{ RowBox[{"Abs", "[", "LastForecastR", "]"}], " ", "-", " ", RowBox[{"Abs", "[", "PrevForecastR", "]"}]}], "]"}]}], ";", " ", RowBox[{"PrevForecastR", " ", "=", " ", "LastForecastR"}], ";", " ", "\n", " ", RowBox[{ RowBox[{"locListAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "locList"}], ";", " ", RowBox[{ RowBox[{"UndiscountListAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "UndiscountList"}], ";", " ", "\n", " ", RowBox[{ RowBox[{"PrevForecastRAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "PrevForecastR"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"precRAll", ",", " ", "precR"}], "]"}], ";", " ", "\n", " ", RowBox[{"AppendTo", "[", RowBox[{"accRAll", ",", " ", "accR"}], "]"}], ";", " ", RowBox[{"j", " ", "=", " ", RowBox[{"j", " ", "+", " ", "1"}]}], ";"}], " ", ",", " ", RowBox[{"{", RowBox[{"TotK", "[", RowBox[{"T", "-", "\[Tau]"}], "]"}], "}"}]}], "]"}]}]}], "]"}], ";", " ", RowBox[{"Clear", "[", "j", "]"}]}], ")"}], "//", "Timing"}]], "Input", CellChangeTimes->{{3.425121499257722*^9, 3.425121501955722*^9}, { 3.425121592616722*^9, 3.425121630851722*^9}, {3.4251220812007217`*^9, 3.425122088895722*^9}, {3.425124315515089*^9, 3.4251244333666544`*^9}, { 3.425125003847076*^9, 3.425125023975089*^9}, {3.425155357091*^9, 3.425155460316*^9}, {3.425155500307*^9, 3.425155501624*^9}, { 3.425155533005*^9, 3.425155601146*^9}, {3.4252038254606147`*^9, 3.4252038468647547`*^9}, {3.425204279681032*^9, 3.4252042935664206`*^9}, { 3.4252201399311905`*^9, 3.425220144942692*^9}, {3.4252201807252693`*^9, 3.425220192598457*^9}, {3.425221144955683*^9, 3.4252212229184785`*^9}, { 3.4252213005312395`*^9, 3.4252213180379896`*^9}, {3.4252213890800934`*^9, 3.425221392765462*^9}, 3.4252215221193953`*^9, {3.4252216430724897`*^9, 3.425221690894272*^9}, {3.4252217986430454`*^9, 3.4252218014643273`*^9}, { 3.425221844530634*^9, 3.4252218494861293`*^9}, {3.425221907121892*^9, 3.4252219251256924`*^9}, {3.4252219747416534`*^9, 3.4252220738345613`*^9}, {3.4252223332815037`*^9, 3.4252223544476204`*^9}, {3.4252223961757927`*^9, 3.425222408744049*^9}, { 3.4252225679549685`*^9, 3.4252225695311265`*^9}, {3.4252252037875257`*^9, 3.425225448533998*^9}, {3.4252254888510294`*^9, 3.425225505370681*^9}, { 3.425225587475891*^9, 3.4252256264367867`*^9}, {3.4252256861447563`*^9, 3.4252256971138535`*^9}, {3.4252260586049986`*^9, 3.425226183480485*^9}, { 3.425226221451282*^9, 3.4252262254576826`*^9}, {3.425226261745311*^9, 3.4252262724103775`*^9}, {3.4252265493410673`*^9, 3.4252265543945727`*^9}, {3.425226616561789*^9, 3.425226762066338*^9}, { 3.425226803202451*^9, 3.425226821645295*^9}, {3.4252272481109376`*^9, 3.425227249344061*^9}, {3.425246952244*^9, 3.425246954475*^9}, { 3.425308018437681*^9, 3.425308020939932*^9}, {3.4253150616701093`*^9, 3.425315063500109*^9}, 3.42562513015625*^9, {3.42562517528125*^9, 3.42562519509375*^9}, 3.425639851734375*^9, {3.425651875296875*^9, 3.425651879953125*^9}, {3.425704236078125*^9, 3.42570426328125*^9}, { 3.425712980375*^9, 3.425712983953125*^9}, {3.425785913984375*^9, 3.425785917109375*^9}, {3.425791199609375*^9, 3.425791263546875*^9}, { 3.425889266484375*^9, 3.425889268375*^9}, 3.4260657739375*^9, { 3.426072130921875*^9, 3.42607213278125*^9}, 3.4260753855*^9, { 3.42616953484375*^9, 3.426169535109375*^9}, {3.426223153796875*^9, 3.426223154046875*^9}, {3.426223511015625*^9, 3.42622351146875*^9}, { 3.42683613928125*^9, 3.42683614584375*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"25.672`", ",", "Null"}], "}"}]], "Output", CellChangeTimes->{3.462100302683626*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Dimensions", "[", " ", "UndiscountListAll", "]"}]], "Input", CellChangeTimes->{{3.425793161015625*^9, 3.4257931953125*^9}, { 3.4257932781875*^9, 3.42579327890625*^9}, 3.42683614709375*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{"6", ",", "127", ",", "2"}], "}"}]], "Output", CellChangeTimes->{3.4621003027148714`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ "number", " ", "of", " ", "points", " ", "added", " ", "to", " ", "the", " ", "right"}], "*)"}], RowBox[{"n2", " ", "=", " ", RowBox[{"n", " ", "-", " ", "n1", " ", "-", " ", RowBox[{"2", "*", "l"}], " ", "-", " ", "1"}]}]}]], "Input", CellChangeTimes->{{3.425247680645*^9, 3.425247709526*^9}, 3.4253106069665084`*^9, 3.42557164484375*^9, {3.425979842359375*^9, 3.425979866875*^9}}], Cell[BoxData["12"], "Output", CellChangeTimes->{3.4621003027304935`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"N", "[", RowBox[{"{", RowBox[{ RowBox[{"Max", "[", "precRAll", "]"}], ",", " ", RowBox[{"Max", "[", "accRAll", "]"}]}], "}"}], "]"}]], "Input", CellChangeTimes->{{3.42522657816695*^9, 3.425226583628496*^9}, { 3.4252269596440935`*^9, 3.4252269651036396`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"0.937496745452898`", ",", "6.173902570247838`*^-21"}], "}"}]], "Output", CellChangeTimes->{3.4621003027461157`*^9}] }, Open ]], Cell["\<\ The next piece of code does the following: 1) Checks if the final forecast for the value of F2T at omega=0 for node j is \ negative but can be treated as 0 within the precision specified by the \ variable EndPointsGoal;if this is the case then it sets the forecast to 0 \ \[Dash] this ensures that the list of values that will be interpolated later \ will not contain 0; 2) does the same with regard to the forecast for of F2T at omega=1; 3) appends to the list \[OpenCurlyDoubleQuote]Consumption\ \[CloseCurlyDoubleQuote] the consumption levels calculated (for the present \ value of tau) at all nodes j (which are stored in the list \ \[OpenCurlyDoubleQuote]locListAll\[CloseCurlyDoubleQuote]);thus \ \[OpenCurlyDoubleQuote]Consumption[[tau]]\[CloseCurlyDoubleQuote] contains \ the consumption levels at all nodes at time \ tau,\[OpenCurlyDoubleQuote]Consumption[[tau,j]]\[CloseCurlyDoubleQuote] \ contains the consumption levels at time tau for node j,and so on.4) creates \ (for the current tau) the lists tmpList and tmpF2T so that tmpList[[j]] \ contains all the values that will be interpolated at node j (including the \ predicted and possibly corrected values at the left and the right endpoint) \ and tmpF2T[[j]] contains the actual interpolating function on the entire \ interval; 5) appends the lists tmpList and tmpF2T (which are local to period tau) to \ the global lists F2Undiscount and F2T;this has the effect that the \ Undiscounted function associated with period tau and node j is simply \ F2T[[tau,j]][omega] (tau and j are indices and only omega is an \ argument),while the values from which this function is constructed are stored \ in F2Undiscount[[tau,j]],which is itself a list.\ \>", "Text", CellChangeTimes->{{3.4256231325*^9, 3.425623176015625*^9}, { 3.425785746078125*^9, 3.425785803234375*^9}, 3.426074548609375*^9, { 3.42683039759375*^9, 3.4268304073125*^9}, {3.42683614865625*^9, 3.42683615128125*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"0", " ", ">", " ", RowBox[{"PrevForecastRAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", ">", " ", "EndPointsGoal"}], ",", " ", RowBox[{ RowBox[{"PrevForecastRAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "0"}]}], "]"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{"j", ",", " ", RowBox[{"TotK", "[", RowBox[{"T", "-", "\[Tau]"}], "]"}]}], "}"}]}], "]"}], ";", " ", RowBox[{"Do", "[", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"0", " ", ">", " ", RowBox[{"PrevForecastLAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", ">", " ", "EndPointsGoal"}], ",", " ", "\n", " ", RowBox[{ RowBox[{"PrevForecastLAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "0"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"j", ",", RowBox[{"TotK", "[", RowBox[{"T", "-", "\[Tau]"}], "]"}]}], "}"}]}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"Consumption", ",", " ", "locListAll"}], "]"}], ";", " ", "\n", " ", RowBox[{"tmpList", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"tmpF2T", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"loc", " ", "=", " ", RowBox[{"UndiscountListAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", "\n", " ", RowBox[{"PrependTo", "[", RowBox[{"loc", ",", " ", RowBox[{"PrevForecastLAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"loc", ",", " ", RowBox[{"PrevForecastRAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ";", " ", "\n", " ", RowBox[{"AppendTo", "[", RowBox[{"tmpList", ",", " ", "loc"}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"tmpF2T", ",", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Interpolation", "[", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"\[CapitalOmega]", ",", " ", RowBox[{"loc", "[", RowBox[{"[", RowBox[{"All", ",", "iterate"}], "]"}], "]"}]}], "}"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"iterate", ",", "1", ",", "NbIterates"}], "}"}]}], "]"}]}], "]"}]}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{"j", ",", RowBox[{"TotK", "[", RowBox[{"T", "-", "\[Tau]"}], "]"}]}], "}"}]}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"F2T", ",", " ", "tmpF2T"}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"F2Undiscount", ",", " ", "tmpList"}], "]"}], ";"}], " ", ")"}], "//", "Timing"}]], "Input", CellChangeTimes->CompressedData[" 1:eJxTTMoPSmViYGCQA2IQ/avu2wuF1peOcbsOvgTRIuuepyoB6ds/1YpANJN2 egWIvlqxsAZE75BL7QTRzy4c6gLR6oZn3oDoNTLv3kPUG38B0fVZP/6C6AjL DGZlIC0QUcgBolcck+YF0QlPZwgpg9VflgTRe0oWy4Doi0rBdipAmiXMykEF rH5xG4jum27UAaKbDxT1q4Dd+XsCiBZq7vivCnbvJiY1IL3IdR07iF4g5c0H ot8EnhEG0as+akmA6G2fG/VAdK09q5Ea2N16Fmpg96nagOgIbcXNjkD6yQOX LSBa4+jTSc5Auvww83QQzcBwZOpLEN0QMQ1MM6S90G0D0XavwHSDqKQemH4s A6YZ5ihBaC8ViDi/BoRu0oTQ+4wh9EcIzVCRuANMy6dC6MnTnoHpBRC64fsS CD97KYQ24dTsAInvgNIc17VBNIM6mAYAAGjWnw== "]], Cell[BoxData[ RowBox[{"{", RowBox[{"0.014999999999997557`", ",", "Null"}], "}"}]], "Output", CellChangeTimes->{3.462100302777361*^9}] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Do all remaining time iterations on the same grid (one should not have to \ open this)\ \>", "Section", CellChangeTimes->{{3.4252463642939997`*^9, 3.4252463763929996`*^9}, { 3.42562111334375*^9, 3.42562111396875*^9}, {3.425623293078125*^9, 3.425623296015625*^9}, {3.42564937525*^9, 3.425649377015625*^9}, { 3.425651421703125*^9, 3.42565142215625*^9}, 3.42614289484375*^9, { 3.4261694078125*^9, 3.426169408796875*^9}, {3.426169445828125*^9, 3.426169446984375*^9}, {3.42616955915625*^9, 3.4261695595*^9}, 3.42682936775*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"\[Tau]", "=", "1"}], ";", RowBox[{ RowBox[{"(", RowBox[{"Do", "[", RowBox[{"(*", RowBox[{ "backward", " ", "over", " ", "the", " ", "time", " ", "periods"}], "*)"}], RowBox[{ RowBox[{ RowBox[{"\[Tau]", " ", "=", " ", RowBox[{"\[Tau]", " ", "+", " ", "1"}]}], ";", " ", RowBox[{"prec", " ", "=", " ", "WP"}], ";", " ", RowBox[{"locListAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"UndiscountListAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"PrevForecastLAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", "\n", " ", RowBox[{"PrevForecastRAll", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"n", " ", ":=", " ", RowBox[{"Length", "[", "\[CapitalOmega]", "]"}]}], ";", " ", RowBox[{"m", " ", ":=", " ", RowBox[{"Length", "[", "UndiscountList", "]"}]}], ";", " ", "\n", " ", RowBox[{"ll", " ", ":=", " ", RowBox[{"Length", "[", "locList", "]"}]}], ";", " ", RowBox[{"j", " ", "=", " ", "1"}], ";", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Do", "[", RowBox[{"(*", RowBox[{"for", " ", "each", " ", "node"}], "*)"}], RowBox[{ RowBox[{ RowBox[{"locList", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"UndiscountList", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", "\[IndentingNewLine]", "\n", " ", RowBox[{"Do", "[", RowBox[{"(*", RowBox[{ "for", " ", "each", " ", "point", " ", "to", " ", "the", " ", "right", " ", "of", " ", "the", " ", "center"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"guess", " ", "=", " ", RowBox[{"If", "[", RowBox[{ RowBox[{"ii", " ", "<", " ", RowBox[{"n1", " ", "+", " ", "l", " ", "+", " ", "3"}]}], ",", " ", RowBox[{"initials", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", "ii"}], "]"}], ",", " ", "\n", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"ii", " ", "-", " ", "4"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{"ll", " ", "-", " ", "3"}], ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"ii", " ", "-", " ", "3"}], "]"}], "]"}], ",", " ", "\n", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{"ll", " ", "-", " ", "2"}], ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"ii", " ", "-", " ", "2"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{ RowBox[{"ll", " ", "-", " ", "1"}], ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", "\n", " ", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"ii", " ", "-", " ", "1"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"ll", ",", "k"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "y"}], "]"}], " ", "/.", " ", "\n", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "ii", "]"}], "]"}]}], "}"}]}], ",", " ", RowBox[{"{", RowBox[{"k", ",", " ", RowBox[{"NbUnknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}]}], "}"}]}], "]"}]}], "]"}]}], ";", " ", "\n", " ", RowBox[{"lastSol", " ", "=", " ", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{ RowBox[{"equations", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", RowBox[{"dummy", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", "ii"}], "]"}]}], ",", " ", "\n", " ", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], ",", " ", "guess"}], "}"}], "]"}], ",", " ", RowBox[{"PrecisionGoal", " ", "->", " ", "PG"}], ",", " ", RowBox[{"WorkingPrecision", " ", "->", " ", "prec"}]}], "]"}]}], ";", " ", "\n", " ", RowBox[{"AppendTo", "[", RowBox[{"locList", ",", " ", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "lastSol"}]}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"UndiscountList", ",", " ", "\n", " ", RowBox[{ RowBox[{"UndiscountedIterate", "[", RowBox[{"\[Tau]", ",", "j", ",", "ii"}], "]"}], "/.", " ", "lastSol"}]}], "]"}], ";"}], " ", ",", " ", "\n", " ", RowBox[{"{", RowBox[{"ii", ",", " ", RowBox[{"n1", " ", "+", " ", "l", " ", "-", " ", "1"}], ",", " ", RowBox[{"n", " ", "-", " ", "1"}]}], "}"}]}], "\[IndentingNewLine]", "]"}], ";", "\n", " ", RowBox[{"Do", "[", RowBox[{"(*", RowBox[{ "for", " ", "each", " ", "point", " ", "to", " ", "the", " ", "left", " ", "of", " ", "the", " ", "center"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"guess", " ", "=", " ", RowBox[{"(", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"ii", " ", "+", " ", "1"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"1", ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"ii", " ", "+", " ", "2"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", "\n", " ", RowBox[{"2", ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"ii", " ", "+", " ", "3"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"3", ",", "k"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"ii", " ", "+", " ", "4"}], "]"}], "]"}], ",", " ", RowBox[{"locList", "[", RowBox[{"[", RowBox[{"4", ",", "\n", " ", "k"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "ii", "]"}], "]"}]}], "}"}]}], ",", " ", RowBox[{"{", RowBox[{"k", ",", " ", RowBox[{"NbUnknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}]}], "}"}]}], "]"}], ")"}]}], ";", " ", RowBox[{"lastSol", " ", "=", " ", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{ RowBox[{"equations", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", RowBox[{"dummy", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", "ii"}], "]"}]}], ",", " ", "\n", " ", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], ",", " ", "guess"}], "}"}], "]"}], ",", " ", RowBox[{"PrecisionGoal", " ", "->", " ", "PG"}], ",", " ", RowBox[{"WorkingPrecision", " ", "->", " ", "prec"}], ",", " ", "\n", " ", RowBox[{"MaxIterations", " ", "->", " ", "1000"}]}], "]"}]}], ";", " ", RowBox[{"PrependTo", "[", RowBox[{"locList", ",", " ", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "lastSol"}]}], "]"}], ";", " ", "\n", " ", RowBox[{"PrependTo", "[", RowBox[{"UndiscountList", ",", RowBox[{ RowBox[{"UndiscountedIterate", "[", RowBox[{"\[Tau]", ",", "j", ",", "ii"}], "]"}], "/.", " ", "lastSol"}]}], "]"}], ";"}], " ", ",", " ", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"ii", ",", " ", RowBox[{"n1", " ", "+", " ", "l", " ", "-", " ", "2"}], ",", " ", "2", ",", " ", RowBox[{"-", "1"}]}], "}"}]}], "\[IndentingNewLine]", "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"locListAll", ",", " ", "locList"}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"UndiscountListAll", ",", " ", "UndiscountList"}], "]"}], ";", " ", "\n", " ", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Add", " ", "the", " ", "righmost", " ", "point"}], "*)"}], "\[IndentingNewLine]", RowBox[{"PrevForecastR", " ", "=", " ", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "4"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{ RowBox[{"m", " ", "-", " ", "3"}], ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "3"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{ RowBox[{"m", " ", "-", " ", "2"}], ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "2"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{ RowBox[{"m", " ", "-", " ", "1"}], ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"n", " ", "-", " ", "1"}], "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"m", ",", "iterate"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "n", "]"}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"iterate", ",", "1", ",", "NbIterates"}], "}"}]}], "\[IndentingNewLine]", "]"}]}], ";", RowBox[{"AppendTo", "[", RowBox[{"PrevForecastRAll", ",", " ", "PrevForecastR"}], "]"}], ";", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Add", " ", "the", " ", "leftmost", " ", "point"}], "*)"}], "\[IndentingNewLine]", RowBox[{"PrevForecastL", " ", "=", " ", "\n", " ", RowBox[{"Table", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Fit", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "2", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"1", ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "3", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"2", ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "4", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"3", ",", "iterate"}], "]"}], "]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "5", "]"}], "]"}], ",", " ", RowBox[{"UndiscountList", "[", RowBox[{"[", RowBox[{"4", ",", "iterate"}], "]"}], "]"}]}], "}"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "y", ",", " ", RowBox[{"y", "^", "2"}], ",", " ", RowBox[{"y", "^", "3"}]}], "}"}], ",", " ", "\n", " ", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{"y", " ", "->", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"iterate", ",", "1", ",", "NbIterates"}], "}"}]}], "\[IndentingNewLine]", "]"}]}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"PrevForecastLAll", ",", " ", "PrevForecastL"}], "]"}], ";", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"j", " ", "=", " ", RowBox[{"j", " ", "+", " ", "1"}]}], ";"}], " ", ",", " ", "\n", " ", RowBox[{"{", RowBox[{"TotK", "[", " ", RowBox[{"T", "-", "\[Tau]"}], "]"}], "}"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"For", " ", "each", " ", "node"}], ",", " ", RowBox[{ "replace", " ", "extremeties", " ", "with", " ", "negative", " ", "values"}]}], "*)"}], "\[IndentingNewLine]", " ", RowBox[{"Clear", "[", "j", "]"}], ";", " ", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"0", " ", ">", " ", RowBox[{"PrevForecastRAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", ">", " ", "EndPointsGoal"}], ",", " ", "\n", " ", RowBox[{ RowBox[{"PrevForecastRAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "0"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"j", ",", " ", RowBox[{"TotK", "[", " ", RowBox[{"T", "-", "\[Tau]"}], "]"}]}], "}"}]}], "]"}], ";", " ", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"If", "[", RowBox[{ RowBox[{"0", " ", ">", " ", RowBox[{"PrevForecastLAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", ">", " ", "EndPointsGoal"}], ",", " ", RowBox[{ RowBox[{"PrevForecastLAll", "[", RowBox[{"[", "j", "]"}], "]"}], " ", "=", " ", "0"}]}], "]"}], ",", " ", "\n", " ", RowBox[{"{", RowBox[{"j", ",", " ", RowBox[{"TotK", "[", " ", RowBox[{"T", "-", "\[Tau]"}], "]"}]}], "}"}]}], "\[IndentingNewLine]", "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"Consumption", ",", " ", "locListAll"}], "]"}], ";", " ", "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{ RowBox[{"For", " ", "each", " ", "node"}], ",", " ", "interpolate"}], "*)"}], "\[IndentingNewLine]", RowBox[{"tmpList", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", RowBox[{"tmpF2T", " ", "=", " ", RowBox[{"{", "}"}]}], ";", " ", "\n", " ", RowBox[{"Do", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"loc", " ", "=", " ", RowBox[{"UndiscountListAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], ";", " ", RowBox[{"PrependTo", "[", RowBox[{"loc", ",", " ", RowBox[{"PrevForecastLAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ";", " ", "\n", " ", RowBox[{"AppendTo", "[", RowBox[{"loc", ",", " ", RowBox[{"PrevForecastRAll", "[", RowBox[{"[", "j", "]"}], "]"}]}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"tmpList", ",", " ", "loc"}], "]"}], ";", " ", "\n", " ", RowBox[{"AppendTo", "[", RowBox[{"tmpF2T", ",", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"Interpolation", "[", RowBox[{"Transpose", "[", RowBox[{"{", RowBox[{"\[CapitalOmega]", ",", " ", RowBox[{"loc", "[", RowBox[{"[", RowBox[{"All", ",", "iterate"}], "]"}], "]"}]}], "}"}], "]"}], "]"}], ",", RowBox[{"{", RowBox[{"iterate", ",", "1", ",", "NbIterates"}], "}"}]}], "]"}]}], "]"}]}], ",", " ", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"j", ",", " ", RowBox[{"TotK", "[", " ", RowBox[{"T", "-", "\[Tau]"}], "]"}]}], "}"}]}], "\[IndentingNewLine]", "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"F2T", ",", " ", "tmpF2T"}], "]"}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"F2Undiscount", ",", " ", "tmpList"}], "]"}], ";"}], " ", "\[IndentingNewLine]", "\[IndentingNewLine]", ",", " ", "\[IndentingNewLine]", RowBox[{"{", RowBox[{"T", "-", "1"}], "}"}]}], "\[IndentingNewLine]", "]"}], ")"}], "//", "Timing"}]}]], "Input", CellChangeTimes->{{3.425256040295*^9, 3.4252560601289997`*^9}, { 3.425256214512*^9, 3.425256214936*^9}, {3.425256289551*^9, 3.4252563277530003`*^9}, 3.425297852433316*^9, {3.4252978907748103`*^9, 3.425297908001641*^9}, {3.42529821552492*^9, 3.4252982209043818`*^9}, { 3.4252982703864336`*^9, 3.425298282433196*^9}, 3.4252988339091964`*^9, { 3.425299808944814*^9, 3.4252998342723465`*^9}, 3.4253002827961946`*^9, { 3.425303770784959*^9, 3.4253037731041903`*^9}, {3.4253038115870385`*^9, 3.4253038317670565`*^9}, {3.4253040051333914`*^9, 3.425304009233801*^9}, { 3.425304275021377*^9, 3.4253043797568493`*^9}, {3.4253044227451477`*^9, 3.425304435826456*^9}, 3.4253108738801975`*^9, {3.425311207622568*^9, 3.4253112204798536`*^9}, {3.4253112785736623`*^9, 3.425311295062311*^9}, { 3.4253113310879135`*^9, 3.4253113545232563`*^9}, {3.4253114053473387`*^9, 3.4253114194867525`*^9}, {3.4253116830721083`*^9, 3.425311702566057*^9}, 3.425311742984099*^9, {3.42531228234803*^9, 3.425312300560851*^9}, { 3.4253124019589896`*^9, 3.425312416232417*^9}, {3.4253138575094914`*^9, 3.425313858092025*^9}, {3.4253150822781096`*^9, 3.4253150970231094`*^9}, { 3.425315236758109*^9, 3.4253152370381093`*^9}, {3.425315588920734*^9, 3.4253155916080027`*^9}, 3.4253176824190626`*^9, 3.4253177126070814`*^9, { 3.42563997615625*^9, 3.425639977734375*^9}, 3.42564009540625*^9, { 3.425640161078125*^9, 3.425640175625*^9}, {3.425640762921875*^9, 3.425640765421875*^9}, {3.42565191703125*^9, 3.4256519260625*^9}, { 3.4258233420040073`*^9, 3.4258235099883823`*^9}, 3.4258235672227573`*^9, { 3.4258240493477573`*^9, 3.4258240526602573`*^9}, 3.4258243788633823`*^9, 3.4258244160040073`*^9, {3.425831350390625*^9, 3.425831405140625*^9}, { 3.4258314481875*^9, 3.425831451546875*^9}, {3.425889368640625*^9, 3.4258894395625*^9}, {3.425889494984375*^9, 3.425889495265625*^9}, { 3.426057756296875*^9, 3.4260577571875*^9}, {3.4260657750625*^9, 3.42606577621875*^9}, {3.426072134546875*^9, 3.426072138875*^9}, { 3.426075561984375*^9, 3.42607556521875*^9}, {3.426078382140625*^9, 3.426078393703125*^9}, {3.4260791438125*^9, 3.4260791583125*^9}, { 3.426079694421875*^9, 3.426079698421875*^9}, {3.4260799530625*^9, 3.426079956359375*^9}, {3.426080222140625*^9, 3.42608022521875*^9}, { 3.42608045209375*^9, 3.426080458578125*^9}, {3.426080707078125*^9, 3.42608073946875*^9}, {3.42614989953125*^9, 3.4261498998125*^9}, { 3.426152616515625*^9, 3.426152736078125*^9}, 3.42615279109375*^9, { 3.426152897734375*^9, 3.426152925265625*^9}, {3.4261529705*^9, 3.42615298959375*^9}, {3.4261530206875*^9, 3.42615312475*^9}, { 3.426153460078125*^9, 3.42615353315625*^9}, {3.426153604546875*^9, 3.42615366171875*^9}, {3.42615371428125*^9, 3.426153771375*^9}, { 3.426153810109375*^9, 3.42615387765625*^9}, {3.42615407796875*^9, 3.426154120375*^9}, {3.426154169515625*^9, 3.426154190328125*^9}, { 3.426154274890625*^9, 3.4261542920625*^9}, {3.42615432475*^9, 3.426154329*^9}, {3.426154374171875*^9, 3.42615441246875*^9}, { 3.426154509359375*^9, 3.426154509796875*^9}, 3.426154543578125*^9, { 3.4262231684375*^9, 3.42622317434375*^9}, {3.4268304148125*^9, 3.426830418125*^9}, {3.426836154046875*^9, 3.426836174640625*^9}, { 3.437395652741931*^9, 3.437395654523181*^9}, 3.448878588578125*^9, { 3.5430454973929396`*^9, 3.5430455049819393`*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{"76.21900000000001`", ",", "Null"}], "}"}]], "Output", CellChangeTimes->{3.462100379217764*^9}] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Generate output at time 0", "Section", CellChangeTimes->{{3.42557125409375*^9, 3.425571259578125*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"\[Tau]", " ", "=", " ", "T"}], ";"}]], "Input", CellChangeTimes->{{3.425251842178*^9, 3.4252518934709997`*^9}, { 3.425251942597*^9, 3.425251960659*^9}, {3.425251997449*^9, 3.425252105763*^9}, {3.4253126410188932`*^9, 3.425312693120103*^9}, { 3.425313013335121*^9, 3.4253130133461227`*^9}, {3.425313499392722*^9, 3.4253134998827715`*^9}, {3.425834275375*^9, 3.425834275890625*^9}, { 3.42667597646875*^9, 3.42667597715625*^9}, 3.426830424546875*^9, { 3.4341817223125*^9, 3.43418172315625*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"j", "=", "1"}], ";", RowBox[{"SecondPlot", "=", RowBox[{"Plot", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"F2T", "[", RowBox[{"[", RowBox[{"\[Tau]", ",", "j", ",", "2"}], "]"}], "]"}], "[", RowBox[{"1", "-", "\[Omega]"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"j", ",", " ", RowBox[{"T", " ", "-", " ", "\[Tau]", " ", "+", " ", "1"}]}], "}"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{"\[Omega]", ",", " ", "0", ",", " ", "1"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"FrameTicks", "\[Rule]", "Automatic"}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Style", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{"{", "\"\\"", "}"}], "]"}], ",", RowBox[{"FontSize", "\[Rule]", "15"}]}], "]"}]}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", RowBox[{"FontSize", "\[Rule]", "15"}]}], "]"}], ","}], "}"}]}], ",", RowBox[{"RotateLabel", "\[Rule]", "False"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{"AbsoluteThickness", "[", "3", "]"}], "}"}]}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.4341817614375*^9, 3.434181761921875*^9}, { 3.434181805328125*^9, 3.434181868546875*^9}, {3.434182455515625*^9, 3.434182456703125*^9}, 3.43418985084375*^9, 3.434190285203125*^9, 3.4341905736875*^9, 3.434190609859375*^9, {3.434191617453125*^9, 3.434191629890625*^9}, {3.434191831859375*^9, 3.434191856*^9}, { 3.43419383584375*^9, 3.434193836890625*^9}, {3.4344684106875*^9, 3.434468419515625*^9}, {3.437395303757556*^9, 3.437395321445056*^9}, { 3.437397264304431*^9, 3.437397264788806*^9}, {3.437930531265625*^9, 3.437930531921875*^9}, {3.43808464425*^9, 3.438084660890625*^9}}], Cell[BoxData[ GraphicsBox[{{}, {}, {Hue[0.67, 0.6, 0.6], AbsoluteThickness[3], LineBox[CompressedData[" 1:eJwVzmk0lAsYwHHrRY596Y5S2W4qxclSUj1PkUQRskSWLGE0hYQJmXcOUtkq pytbobS4GlnLfkWJbI1ChKYh67zIEhW3++F/fl//Kh7nbbwF+Pj4HH/3v+be o511Y3b75QrUx3LNvu4XMlYKGKToAXdqTOCxcyPo3k3NKKaYQCp9J8fL+T1Y tHYXZVJOgMoEPUTVeRgcvBarb1K8oFBeM7zOaR4+aV8xTqAEQ0l1ermEkzDe U7CKvUaJBiXN8U8sRwUkRIs3X6WkQEZEi+WcnQY6nsxmTc/ch5nxR6I0fQMU XyVOHd7AguqwrotrwhE1rHmjL6+XQKm5zcOI6kMY2mYIqXMv4ABDWqTunAWu LZEZ4Oevha6arTdaXI5jGcf4bfveeqhEJwUwssV6aua6k5MN8PPU8ovLYvY4 /9c+qQLaa1g2aKxte+CIAkv50us0mkHqiWF5XpgzGqy6l9k+fQuehTELxRRX fBut1/ZqazuQ66VSJuzccWPyxNJjXgdQ9/MeC1acxonFwYH3Ou/AvHmfm4ew J94fr2yWTGTDTVladaq/F0oqPyS53C5wstf3NWn2xni/0jP31D+AUICtKk3a Bxcwn+sb1Q32fWazRoG+GLyzoUTxZQ9c8EpWzX/hh4NPG653qnwESzkZ39z1 /viD2pW+5VIfbHe8ddsk7CxuOyCycqayH26yZ7R7Kml4OEfF59naAYjXaf78 jXIeQ5XdVD+fGoScTOOyTToBqDVpJ959bAhsR039+toDUE5qWrRheQj8Xn63 /x4RiEK16Sy1jM9gIH5tJnBDEPrrVfaKWXDgmAb/SmRrEOYf8bhXs8CBlPYr slfoF3B+Qkl65PYXGHrUZ2WlFIyltocFU0y4UFMYvmT4JhijzGLuloxwYdrD YcNB2kVU+WTekxszDCalm6SFpEJwz67oFMrOEdjI+2NhtjYET21oX+JnjwD9 lWpU5ZlQnG9O4AQQX6Fv0/7+EeUwTBVyDbZRHwVqYLNpZUsYyg2U5gg0jIKW iOJHPzodhSOJE4aBY8AqKhKz33MJ+R67sjiy41D60CnuybdLGJTGSpCtHwdx 6iK7+GU4Vm+LE5U5NwHKpXJZ6nciUMY8SIspOQl6r7+9qKNGYv/2Dja9ahLk 21qpIi6XsTAL1LmuUxBLy2tdsY5CF5aBjPLKFIj9/EdtVouBjJhsov8JD+4W Nc0fb2OgRKiI+ekCHiTa6h7q7WBgmi9NdoTFA8a8joonm4HFFoa5ZAkPEpZX 48J7GDgi09kgUMuDZBmbzVUcBlpk8YluYfMgcnG09uoiAxXL3RIv/uCB4o6B WEKVwNxHjfbLv3jQaLw754AGgTpp2zZG8ZFwo2WyRVCTwCORi6w4YRJW/kxx TtxOYIRxUme6FAlK2paaFbsJ5LTXyNerkbCnk3cr1IrAglHldMmjJMz9sSzR dJnAuMwY9wFLEvRXuf47mAR62UxpPLUm4fhltUOpMQSur6oqPOZAQo3m+PWQ eAKvJTm/ivcgoSnVvds6jUBfgzsza+gkFFspmNaVEagaLW8mkkfCWMHqCDlL 4MruCInuRyQ04E/f3gUCe6e+vMvLJ2HzsFHs62UCkx2KXUyfkWDbE1PBEmDi 6labCzFVv39UK5qeyzKxvzMpS5BNgktDdkGZLhOfxy56st+T8O9wj+TkLiam GLltye0hwccrrUNjLxMtHuwoOThAQv30s5SHJkysCGt9Q4yREO+m9oRrx8Tb 2/WTrCdJYMxRgsCJiYGcjBMqJAm3OBP5Wa5M1Dx6drBujoS4JUVHqg8Thfi7 7icvknBVOzvpgz8Th0qNqO7LJNBuuA+bBjCxipqrrfOLBI2P3oaVwUz8e6P4 /OoqCaxyMz9dOhP/A5Kutow= "]]}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->True, AxesOrigin->{0, 0}, Frame->True, FrameLabel->{ FormBox[ StyleBox[ "\"Non Stockholders' Share of Aggregate Consumption at time 0\"", FontSize -> 15, StripOnInput -> False], TraditionalForm], ""}, PlotLabel->FormBox[ StyleBox[ TagBox[ GridBox[{{"\"Non Stockholders' Wealth at time 0\""}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], FontSize -> 15, StripOnInput -> False], TraditionalForm], PlotRange->{All, All}, PlotRangeClipping->True, PlotRangePadding->{Automatic, Automatic}, RotateLabel->False]], "Output", CellChangeTimes->{3.4621003792646313`*^9}] }, Open ]], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"\[Tau]", " ", "=", " ", "T"}], ";", " ", RowBox[{"j", " ", "=", " ", "1"}], ";", " ", RowBox[{"ConsumptionCM", " ", "=", " ", RowBox[{"{", "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"guess", " ", "=", RowBox[{"Drop", "[", " ", RowBox[{ RowBox[{"initials", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", "ii"}], "]"}], ",", RowBox[{"-", "2"}]}], "]"}]}], ";", " ", RowBox[{"lastSol", " ", "=", " ", RowBox[{"FindRoot", "[", RowBox[{ RowBox[{ RowBox[{"completeMarketEquations", "[", RowBox[{"\[Tau]", ",", " ", "j"}], "]"}], " ", "/.", " ", "\n", " ", RowBox[{"dummy", "[", RowBox[{"\[Tau]", ",", " ", "j", ",", " ", "ii"}], "]"}]}], ",", " ", RowBox[{"Transpose", "[", RowBox[{"{", " ", RowBox[{ RowBox[{"{", RowBox[{ "c1u", ",", " ", "c2u", ",", " ", "c1d", ",", " ", "c2d"}], "}"}], ",", " ", "guess"}], "}"}], "]"}], ",", " ", RowBox[{"PrecisionGoal", " ", "->", " ", "PG"}], ",", " ", "\n", " ", RowBox[{"WorkingPrecision", " ", "->", " ", "WP"}]}], "]"}]}], ";", " ", RowBox[{"AppendTo", "[", RowBox[{"ConsumptionCM", ",", " ", RowBox[{ RowBox[{"unknowns", "[", RowBox[{"\[Tau]", ",", "j"}], "]"}], " ", "/.", " ", "lastSol"}]}], "]"}], ";"}], " ", ",", " ", "\n", " ", RowBox[{"{", RowBox[{"ii", ",", " ", "2", ",", " ", RowBox[{"n", " ", "-", " ", "1"}]}], "}"}]}], "]"}], ";"}], " "}]}], "Input", CellChangeTimes->{{3.425318262856101*^9, 3.425318323937208*^9}, { 3.425318374330247*^9, 3.425318394853299*^9}, 3.425318440338847*^9, { 3.4253202283166275`*^9, 3.425320231151911*^9}, {3.426675986953125*^9, 3.42667598740625*^9}, {3.42682986809375*^9, 3.426829884296875*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"\[Tau]", " ", "=", " ", "T"}], ";", " ", RowBox[{"j", " ", "=", " ", "1"}], ";", RowBox[{"FirstPlot", "=", " ", RowBox[{"ListPlot", "[", "\n", " ", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"1", " ", "-", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"i", " ", "+", " ", "1"}], "]"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "*", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", RowBox[{"ConsumptionCM", "[", RowBox[{"[", RowBox[{"i", ",", "3"}], "]"}], "]"}]}], "]"}], "/", "\n", " ", RowBox[{"\[Phi]1", "[", RowBox[{"\[Tau]", ",", " ", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"i", " ", "+", " ", "1"}], "]"}], "]"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]}]}], "]"}]}], " ", "-", " ", RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", RowBox[{"ConsumptionCM", "[", RowBox[{"[", RowBox[{"i", ",", "1"}], "]"}], "]"}]}], "]"}], "/", "\n", " ", RowBox[{"\[Phi]1", "[", RowBox[{"\[Tau]", ",", " ", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"i", " ", "+", " ", "1"}], "]"}], "]"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]}]}], "]"}]}]}], ")"}]}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"i", ",", " ", "m"}], "}"}]}], "]"}], ",", " ", "\n", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"1", " ", "-", " ", RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"i", " ", "+", " ", "1"}], "]"}], "]"}]}], ",", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], "*", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", RowBox[{"Consumption", "[", RowBox[{"[", RowBox[{"\[Tau]", ",", "j", ",", "i", ",", "3"}], "]"}], "]"}]}], "]"}], "/", "\n", " ", RowBox[{"\[Phi]1", "[", RowBox[{"\[Tau]", ",", " ", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"i", " ", "+", " ", "1"}], "]"}], "]"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]}]}], "]"}]}], " ", "-", " ", RowBox[{ RowBox[{"\[Phi]1", "[", RowBox[{ RowBox[{"\[Tau]", " ", "-", " ", "1"}], ",", " ", RowBox[{"Consumption", "[", RowBox[{"[", RowBox[{"\[Tau]", ",", "j", ",", "i", ",", "1"}], "]"}], "]"}]}], "]"}], "/", "\n", " ", RowBox[{"\[Phi]1", "[", RowBox[{"\[Tau]", ",", " ", RowBox[{ RowBox[{"\[CapitalOmega]", "[", RowBox[{"[", RowBox[{"i", " ", "+", " ", "1"}], "]"}], "]"}], "*", RowBox[{"\[Delta]", "[", RowBox[{ RowBox[{"T", " ", "-", " ", "\[Tau]"}], ",", " ", "j"}], "]"}]}]}], "]"}]}]}], ")"}]}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"i", ",", " ", "m"}], "}"}]}], "]"}]}], "}"}], ",", " ", RowBox[{"PlotRange", "\[Rule]", "All"}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"FrameTicks", "\[Rule]", "Automatic"}], ",", RowBox[{"FrameTicksStyle", "\[Rule]", RowBox[{"Directive", "[", RowBox[{"Black", ",", "10"}], "]"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Style", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{"{", "\"\\"", "}"}], "]"}], ",", RowBox[{"FontSize", "\[Rule]", "15"}]}], "]"}]}], ",", RowBox[{"Frame", "\[Rule]", "True"}], ",", RowBox[{"FrameTicks", "\[Rule]", "Automatic"}], ",", RowBox[{"FrameTicksStyle", "\[Rule]", RowBox[{"Directive", "[", RowBox[{"Black", ",", "20"}], "]"}]}], ",", RowBox[{"FrameLabel", "\[Rule]", RowBox[{"{", RowBox[{"Style", "[", RowBox[{ "\"\\"", ",", RowBox[{"FontSize", "\[Rule]", "15"}]}], "]"}], "}"}]}], ",", RowBox[{"RotateLabel", "\[Rule]", "False"}], ",", RowBox[{"PlotMarkers", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\<\[FilledSquare]\>\"", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"\"\<\[FilledDownTriangle]\>\"", ",", "8"}], "}"}]}], "}"}]}], ",", RowBox[{"Epilog", "\[Rule]", RowBox[{"Inset", "[", RowBox[{ RowBox[{"Style", "[", RowBox[{ RowBox[{"Column", "[", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\""}], "}"}], "]"}], ",", "15"}], "]"}], ",", RowBox[{"{", RowBox[{"0.2", ",", "0.8"}], "}"}], ",", "Automatic", ",", RowBox[{"{", RowBox[{"0.4", ",", "0.3"}], "}"}]}], "]"}]}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.425318922854094*^9, 3.4253189318189907`*^9}, { 3.4253190817459817`*^9, 3.425319127448551*^9}, {3.4253191586846743`*^9, 3.4253192014999557`*^9}, {3.425319264088214*^9, 3.42531928435324*^9}, { 3.4253193194337482`*^9, 3.4253194281076145`*^9}, {3.425319459360739*^9, 3.4253195136841707`*^9}, {3.425319585900392*^9, 3.425319585909393*^9}, { 3.42531962859066*^9, 3.4253196293317347`*^9}, {3.42531978850165*^9, 3.4253198870935082`*^9}, {3.425320045574355*^9, 3.425320081008898*^9}, { 3.425320361318926*^9, 3.425320366320426*^9}, {3.4253204375645494`*^9, 3.42532043826462*^9}, {3.425320583318124*^9, 3.4253206014259343`*^9}, { 3.4253360109375*^9, 3.42533601890625*^9}, 3.426624601375*^9, { 3.4266759926875*^9, 3.42667599375*^9}, {3.43418188125*^9, 3.434181883296875*^9}, 3.43418206428125*^9, 3.434189829265625*^9, { 3.434190074640625*^9, 3.434190174359375*^9}, {3.434190206296875*^9, 3.434190231703125*^9}, {3.43419033065625*^9, 3.434190342296875*^9}, { 3.4341903848125*^9, 3.43419039746875*^9}, {3.43419044159375*^9, 3.434190514953125*^9}, {3.43419170846875*^9, 3.43419170896875*^9}, { 3.434191825578125*^9, 3.434191825734375*^9}, 3.43446781775*^9, { 3.434468433171875*^9, 3.4344684459375*^9}, 3.434468519234375*^9, { 3.437395392023181*^9, 3.437395392538806*^9}, {3.437397106023181*^9, 3.437397121476306*^9}, {3.437397540679431*^9, 3.437397541882556*^9}, { 3.437397690288806*^9, 3.437397734757556*^9}, {3.4379302474375*^9, 3.437930248921875*^9}, {3.437930604203125*^9, 3.437930784265625*^9}, { 3.437931407171875*^9, 3.437931409171875*^9}, {3.437931455796875*^9, 3.437931515109375*^9}, {3.43793164328125*^9, 3.437931646015625*^9}, { 3.437931753546875*^9, 3.437931775265625*^9}, {3.437932029546875*^9, 3.437932046015625*^9}, {3.437932098*^9, 3.437932105296875*^9}, 3.43793244971875*^9, {3.43793281684375*^9, 3.4379328186875*^9}, { 3.437932929953125*^9, 3.437933228015625*^9}, {3.437933268078125*^9, 3.437933283109375*^9}, {3.437976434640625*^9, 3.437976436453125*^9}, { 3.43797646884375*^9, 3.437976480234375*^9}, {3.43797651421875*^9, 3.4379765453125*^9}, {3.43802568653125*^9, 3.43802571746875*^9}, { 3.438025752265625*^9, 3.438025775390625*^9}, {3.43802581346875*^9, 3.43802584396875*^9}, {3.438026095984375*^9, 3.438026166*^9}, { 3.438026270546875*^9, 3.438026330609375*^9}, {3.438084606890625*^9, 3.4380846274375*^9}}], Cell[BoxData[ GraphicsBox[GraphicsComplexBox[CompressedData[" 1:eJzt1/s71GkfB/Ch7BOxHXbUYpdRTiHrlJXFZzsrW4vaTit6elJsksryRK1V 2aSD6PRIkpAc1mmOhsGMYUYkIufTOOU0psNmS9R+jXtu/oXnuub7S9e7mpn7 /ry/1/W6ProHjrl5KZJIpAkFEmnqT1EwOevTJwmEOaxPNqwTQulbI/eprJxq vnIqhw+7sj4S2TBCGQyIrNKY5D9J5PtnCw7oEZmctUk0TuTzuynpFCKvcI/i vSXyggixrQaR3Vja4cNE1h+7uVOFyMn+DiqNRK5Q04kZeSYEJ+kBJNBnsFgl l8jEp4kDSKC7M2RyNZF1pAeQANPb/bVzrRAcpAeQwK/0zWT/p0IIkR5AApFb b9jmVwphzGjqABJIcO8h/cgXwojr1AGI39fd+nsEXQjEp4mvkADLicO2/J8Q iE8TB5BApl/jqv0eQnCXHkACk3a1dgqjAul9HVQkkDO+9EFFmACmvs2VNQom YXvVz2gI4JD0GYVzNymDPbRy6TyCyaNgdCbx4ePt5dJ5RvHEEP/XqySFsTI4 Lr2AGPYlBT5yjyubvp+2GC7/IorLW1cGT6qmnhHw0HVybB/lT98veAQWLNYe YN3lT8/XaATWpSi76m3lo/sMg5cT051E4kv7Io4IcUeGR76hl4KV9BkGP745 67ZvKUzddpNoCLJab+lpG5ROzztqCGop8wwyRLzp+ToMAel1tY5RAg/NbxDW 8EeFoR48uBM79QxC1kbFL+7p8Kb72zQI23bu+cK/m4vmPwDL9TVHex5yp/tO GoBlrualA77c6ffBdQDmfWq562fNBZL0GYB1F3M8D02WoD5ewFX1NwVcQQnq 4wXQLqhTTl4vQX28AP/e7ZlH95egPvqhzXODYYpZCeqjH9rNHvRrTRSjPvph X5VI2S6+GPXRB1WVntSo74tRH31Qbfioc15/EeqjDzYHOZ2JuVKE+uiFoohT HprfFqE+eqHjXrVJVDcH9dELDaH1u7qiOKiPHkiKv/zFR0cO6qMH9p7KW9cs KUR99ICfakHgfx4Uoj66ITQ0tPXqzkLURzdEVYbbblMtRH10QxO5tedGaQHq QwTaDwIKdp4uQH2IIMBZTTvCpgD1IYKftQJ7v37NRn10gVKq689q2WzURxeE 7LF0+OEoG/XRBckx5D9rTNmojy4wX2RmES3OR/PvhDMPVbPOZ+ejeXcAOfvj vx+cyEfz7YDXdiVdIpt8NM92UPrWe8F3Eyw0vzZgboymPOSx0Lza4DdX9jWt SBaaTyvoLGlddsONhebRAjHuK9rnfcVC92+B3ffnf3ayn4nu2wzNTja6VblM dL8meF/wckTtNya6TxPYVYR6Wjoz0fvUCPUa1GQrDSZ6fxrh2unrWqoDDPS+ NIDxfPMdDCYDvR/PQbglQm1lBAO9D8/hQGS01ZE9DNR/Peh3/dR+xISB+q4D 93UmzsYf6ajfOjDcq9CXWEtHfT6DgHS+bXUKHfVXC+I3z9+lB9NRX7Ww7MqN cSsXOuqnBmxyx629DOiojxpYydlSbDdJQ/OvhjW+VU9z6mlo3k9g0CKWXZpJ Q/OtAt+OwJfHwmlono9hWFA8metBQ/OrgOVFuy7+YUtD8xKCv+af24cW09B8 BODmVLaqRUxF8ygDb9MdlO0VVHR/Ptg3t2u6pVDRfUuBqdy9tj6Miu7HhYWi hZUNHlR0nxJICooY32lPRecvAlKppqmbJhWdtxCW+MU9KXuXh86XD1fsV3lm N+ah8xA9x5afUGXmod+nwcT4+oyWW3no93Ihq8CgcGlQHvr+LGAY13lzd8m+ Lw2Kfv3y/HNb2eeT4cA3qRJXTdn/vwcTxtfjrCdy0b/fABO/5vCQDlk+D0Ef hvL1uLIcAA9Wl92Kz5Plg7DGO/HDgQxZ3gGPm30HBKmyvB4aOIri8RRZtoYd nVUxZJz1wED3ml9isiyTYa5WWsdhnOeC4PC6pc44/+XoqkCj2uPc61hu/DZs Fc71jmljSwctcOY7eg2lfWVOZJn3+5v2rigkvcTeL/5yqcJUlnnfzruQU0Bk mfe3yzcvmMoy7x9FulTlE1nmfbS+z3omkWXeG6YJTPOILPOe/GFNRyqRZd77 bPPlxxBZ5j1ny52EQ0SWeX+PuSvxMyLLvJ88ezjRhfh7mfeNShMnR95LsPfm RyY2UMUS7L2mHifcuEKCvV/rsKxTvFeCvXf75JxSbzSKvd8Ra9wUf3wYe/+1 /lsLs7EB7P2Pfy6Y29fUj723nBSrm6r2Ye93cpxHWn7vwd7/oXjHJN64G3tf vYFhd4wkwt7/bNgrWDzWib1XNL9SeNOoA3v/7KN3yPKrbdh7a+qhu6Ddir1f bfmwVelZM/b+QpvLkjdJTdh75S77juSoRuz9/SMZY3eiG7D398LumSqmPsfe bxt3zY58Uo+9Hzp9UGXznHrsvbU3PT5hYx32/r7iCTezW8+w95Ra04zyl7XY ++7UhCcHfqrF3g9OuMRql9Zg77U2xlhYrq7B3ic4mRu2Hn2KvY82+vulT1A1 9v5+5HjhhytPsPd16WkGsTlV2Hvh5yH2Bzsqsfcn4lMX3VxSib23fWU2Erj7 MfZ+fuDnHK+kCuz93Us81aoxIfZeKTPEXddNiL0/rjIcMUATYO8vnGaFZWkL sPeX0y45KkeVY++9R3zKbymVY+9Lf3D3nAgrw94nKPU09s0pw97bZPMG5l7i Y+/TK0LTFy7lY+9HT7dqlaWWYu/bNXMY3fal2Hun4+qLzBp42HvWoMLFYyd5 2Pvuz4ffnSDzsPdxVpSAf+Vzsfc+154qf9rPxd5ztDqvmKlysfeMx4JDR9kl 2PtW5SbPm0dKsPc81QuhZ3VKsPeGdX9w9TOLsffvM8MoW7WLsfdt20gNjjeL sPenMpsVeQuLsPdfZRiM3b/Gwd6/sD/39yMyB3sfKLytkX63EHufEeCiFkQ4 IvPe0jJjrJdZgL1fedlyU+WWAuz9BmOPO3NEbOx9vH/adZ9gNvbex8mwuGUJ G3v/y3ffBtgw8rH3XTYr2Pt252PvEwbTzawmWdj7IIsO8Z1kFvY+sXs8JHgb C3uvGbI/hzXOxN77HPqY6JDGxN4bbv5w4/UeJva+Jix8kKvKxN4Hb2XNv81l YO+v+p076PFfBvbei3TOWcmCgb33edH1/tQwHXt/XJ1+JiOVjr2vD3DJuuhF x94fLt+nq6RPx95Hp0ZRFvTTsPdz+G8SYh/RsPcuNa3Wt31p2Pvzam5qHyxo 2PvlLgsHWO9mvA/78pVqWQkVe2/R8mwDOZKKvbfT7G+M20HF3mde8jzjSqFi 78eEFzxNxDPe27OWLaIUzHgfqL7iokHkjPdPm6q/ttk74/2vITWhG03ysPds +hzGj5Mz3ivbr9XYUjPj/XDWoK8Oe8b7bHYuWyd7xnu9tQ6OKWkz3n/fl/LT 4MMZ7xdujmFcmuX9KT+XibZZ3hsU/p4cPsv7sxri93tmef/Y7Z3e+lneUy2u 262e5X3WK68yq1neV6bUqFjM8l6+38v3e/l+L9/v5fu9fL+X7/fy/V6+38v3 e/l+L9/v5fu9fL+X7/f/v/v9P/8j77g= "], { {Hue[0.67, 0.6, 0.6], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 255], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 256], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 257], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 258], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 259], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 260], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 261], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 262], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 263], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 264], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 265], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 266], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 267], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 268], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 269], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 270], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 271], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 272], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 273], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 274], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 275], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 276], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 277], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 278], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 279], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 280], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 281], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 282], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 283], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 284], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 285], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 286], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 287], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 288], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 289], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 290], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 291], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 292], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 293], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 294], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 295], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 296], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 297], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 298], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 299], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 300], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 301], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 302], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 303], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 304], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 305], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 306], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 307], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 308], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 309], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 310], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 311], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 312], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 313], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 314], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 315], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 316], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 317], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 318], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 319], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 320], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 321], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 322], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 323], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 324], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 325], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 326], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 327], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 328], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 329], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 330], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 331], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 332], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 333], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 334], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 335], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 336], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 337], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 338], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 339], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 340], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 341], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 342], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 343], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 344], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 345], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 346], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 347], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 348], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 349], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 350], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 351], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 352], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 353], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 354], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 355], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 356], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 357], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 358], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 359], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 360], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 361], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 362], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 363], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 364], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 365], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 366], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 367], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 368], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 369], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 370], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 371], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 372], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 373], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 374], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 375], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 376], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 377], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 378], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 379], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 380], InsetBox[ StyleBox["\<\"\[FilledSquare]\"\>", StripOnInput->False, FontSize->3], 381]}, {Hue[0.9060679774997897, 0.6, 0.6], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 382], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 383], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 384], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 385], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 386], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 387], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 388], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 389], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 390], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 391], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 392], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 393], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 394], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 395], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 396], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 397], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 398], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 399], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 400], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 401], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 402], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 403], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 404], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 405], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 406], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 407], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 408], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 409], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 410], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 411], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 412], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 413], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 414], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 415], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 416], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 417], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 418], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 419], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 420], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 421], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 422], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 423], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 424], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 425], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 426], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 427], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 428], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 429], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 430], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 431], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 432], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 433], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 434], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 435], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 436], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 437], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 438], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 439], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 440], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 441], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 442], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 443], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 444], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 445], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 446], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 447], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 448], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 449], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 450], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 451], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 452], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 453], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 454], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 455], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 456], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 457], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 458], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 459], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 460], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 461], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 462], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 463], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 464], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 465], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 466], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 467], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 468], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 469], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 470], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 471], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 472], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 473], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 474], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 475], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 476], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 477], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 478], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 479], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 480], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 481], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 482], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 483], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 484], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 485], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 486], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 487], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 488], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 489], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 490], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 491], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 492], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 493], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 494], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 495], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 496], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 497], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 498], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 499], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 500], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 501], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 502], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 503], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 504], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 505], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 506], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 507], InsetBox[ StyleBox["\<\"\[FilledDownTriangle]\"\>", StripOnInput->False, FontSize->8], 508]}, {}}], AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->True, AxesOrigin->{0, 0.2}, Epilog->InsetBox[ BoxData[ FormBox[ StyleBox[ TagBox[ GridBox[{{ "\"Incomplete \[FilledDownTriangle] \[FilledDownTriangle] \ \[FilledDownTriangle] \[FilledDownTriangle] \[FilledDownTriangle]\""}, { "\"Complete \[FilledSmallSquare] \[FilledSmallSquare] \ \[FilledSmallSquare] \[FilledSmallSquare] \[FilledSmallSquare]\""}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], 15, StripOnInput -> False], TraditionalForm]], {0.2, 0.8}, Automatic, { 0.4, 0.3}], Frame->True, FrameLabel->{ FormBox[ StyleBox[ "\"Non Stockholders' Share of Aggregate Consumption at time 0\"", FontSize -> 15, StripOnInput -> False], TraditionalForm]}, FrameTicksStyle->Directive[ GrayLevel[0], 10], PlotLabel->FormBox[ StyleBox[ TagBox[ GridBox[{{"\"Market Price of Risk\""}}, GridBoxAlignment -> {"Columns" -> {{Left}}}, GridBoxItemSize -> { "Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}], "Column"], FontSize -> 15, StripOnInput -> False], TraditionalForm], PlotRange->{All, All}, PlotRangeClipping->True, PlotRangePadding->{Automatic, Automatic}, RotateLabel->False]], "Output", CellChangeTimes->{3.462100381607991*^9, 3.4621005321142406`*^9}] }, Open ]] }, Open ]] }, CellGrouping->Manual, WindowSize->{1146, 658}, WindowMargins->{{11, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, ShowSelection->True, Magnification->1, FrontEndVersion->"8.0 for Microsoft Windows (32-bit) (October 6, 2011)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[545, 20, 63, 0, 83, "Title"], Cell[611, 22, 303, 8, 78, "Subtitle"], Cell[917, 32, 540, 9, 66, "Subsubtitle"], Cell[1460, 43, 212, 6, 31, "Input"], Cell[CellGroupData[{ Cell[1697, 53, 188, 2, 71, "Section"], Cell[1888, 57, 962, 29, 52, "Input"], Cell[2853, 88, 172, 3, 23, "DisplayFormula"] }, Closed]], Cell[CellGroupData[{ Cell[3062, 96, 223, 5, 41, "Section"], Cell[3288, 103, 1394, 42, 50, "Text"], Cell[CellGroupData[{ Cell[4707, 149, 104, 1, 36, "Subsection"], Cell[4814, 152, 819, 19, 52, "Input"], Cell[5636, 173, 4283, 96, 183, "Input"], Cell[9922, 271, 66, 0, 29, "Text"], Cell[9991, 273, 1824, 46, 52, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[11852, 324, 138, 1, 36, "Subsection"], Cell[11993, 327, 850, 24, 31, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[12880, 356, 107, 1, 36, "Subsection"], Cell[12990, 359, 2665, 63, 92, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[15692, 427, 545, 9, 53, "Subsection"], Cell[16240, 438, 1495, 36, 89, "Input"], Cell[17738, 476, 1495, 36, 89, "Input"], Cell[19236, 514, 4972, 124, 112, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[24257, 644, 143, 2, 71, "Section"], Cell[CellGroupData[{ Cell[24425, 650, 66, 0, 27, "Subsubsection"], Cell[24494, 652, 1202, 31, 92, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[25733, 688, 131, 1, 36, "Subsection"], Cell[25867, 691, 238, 6, 31, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[26142, 702, 289, 9, 36, "Subsection"], Cell[26434, 713, 97, 3, 31, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[26568, 721, 118, 1, 36, "Subsection"], Cell[26689, 724, 183, 6, 31, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[26909, 735, 166, 3, 36, "Subsection"], Cell[27078, 740, 269, 6, 31, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[27384, 751, 87, 1, 36, "Subsection"], Cell[27474, 754, 475, 10, 52, "Input"], Cell[CellGroupData[{ Cell[27974, 768, 211, 2, 27, "Subsubsection"], Cell[28188, 772, 1335, 40, 130, "Input"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[29584, 819, 297, 6, 41, "Section"], Cell[29884, 827, 303, 8, 31, "Input"], Cell[30190, 837, 959, 21, 31, "Input"], Cell[CellGroupData[{ Cell[31174, 862, 152, 3, 36, "Subsection"], Cell[31329, 867, 868, 22, 31, "Input"], Cell[32200, 891, 406, 10, 31, "Input"], Cell[32609, 903, 677, 14, 31, "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[33335, 923, 614, 10, 41, "Section"], Cell[CellGroupData[{ Cell[33974, 937, 287, 9, 36, "Subsection"], Cell[34264, 948, 346, 7, 29, "Text"], Cell[34613, 957, 500, 12, 31, "Input"], Cell[35116, 971, 407, 7, 31, "Input"], Cell[35526, 980, 757, 19, 31, "Input"], Cell[CellGroupData[{ Cell[36308, 1003, 33535, 671, 1232, "Input"], Cell[69846, 1676, 124, 3, 30, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[70019, 1685, 576, 13, 52, "Subsection"], Cell[70598, 1700, 343, 6, 29, "Text"], Cell[CellGroupData[{ Cell[70966, 1710, 12757, 264, 452, "Input"], Cell[83726, 1976, 136, 3, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[83899, 1984, 416, 10, 31, "Input"], Cell[84318, 1996, 73, 1, 30, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[84440, 2003, 633, 13, 52, "Subsection"], Cell[CellGroupData[{ Cell[85098, 2020, 13724, 288, 412, "Input"], Cell[98825, 2310, 124, 3, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[98986, 2318, 216, 3, 31, "Input"], Cell[99205, 2323, 129, 3, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[99371, 2331, 464, 11, 31, "Input"], Cell[99838, 2344, 73, 1, 30, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[99948, 2350, 301, 7, 31, "Input"], Cell[100252, 2359, 159, 4, 33, "Output"] }, Open ]], Cell[100426, 2366, 1956, 31, 173, "Text"], Cell[CellGroupData[{ Cell[102407, 2401, 3623, 92, 152, "Input"], Cell[106033, 2495, 138, 3, 30, "Output"] }, Open ]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[106232, 2505, 553, 10, 41, "Section"], Cell[CellGroupData[{ Cell[106810, 2519, 26054, 548, 1412, "Input"], Cell[132867, 3069, 135, 3, 30, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[133051, 3078, 109, 1, 41, "Section"], Cell[133163, 3081, 547, 9, 31, "Input"], Cell[CellGroupData[{ Cell[133735, 3094, 2182, 50, 92, "Input"], Cell[135920, 3146, 2838, 57, 262, "Output"] }, Open ]], Cell[138773, 3206, 2079, 52, 112, "Input"], Cell[CellGroupData[{ Cell[140877, 3262, 9250, 196, 252, "Input"], Cell[150130, 3460, 33215, 865, 274, "Output"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)