From 7889960e0eadbf5b6cd1785db9451de241aa8eff Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 4 Mar 2024 13:16:40 -0700 Subject: [PATCH 01/13] save state --- src/LogNormal/README.md | 2 +- src/LogNormal/log_normal.nb | 645 +++++++++++++++--------------------- 2 files changed, 262 insertions(+), 385 deletions(-) diff --git a/src/LogNormal/README.md b/src/LogNormal/README.md index e7ec0cca..6ecfadc6 100644 --- a/src/LogNormal/README.md +++ b/src/LogNormal/README.md @@ -146,7 +146,7 @@ $$ $$ Then it must be that $$ -\Delta_Y = y\frac{\Delta_X}{x} # +\Delta_Y = y\frac{\Delta_X}{x} $$ **Input $\Delta_Y$:** To allocate a specific amount of $\Delta_Y$, then it must be that: diff --git a/src/LogNormal/log_normal.nb b/src/LogNormal/log_normal.nb index 3ce64e8d..1a251fce 100644 --- a/src/LogNormal/log_normal.nb +++ b/src/LogNormal/log_normal.nb @@ -3,10 +3,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 0, 0] -NotebookDataLength[ 81895, 2317] -NotebookOptionsPosition[ 73068, 2142] -NotebookOutlinePosition[ 73624, 2161] -CellTagsIndexPosition[ 73581, 2158] +NotebookDataLength[ 77989, 2194] +NotebookOptionsPosition[ 69461, 2022] +NotebookOutlinePosition[ 70018, 2041] +CellTagsIndexPosition[ 69975, 2038] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -50,7 +50,7 @@ Cell[BoxData[ CellChangeTimes->{{3.91138727840687*^9, 3.911387281430051*^9}, { 3.911387543969853*^9, 3.911387555514419*^9}}, CellLabel-> - "In[897]:=",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] + "In[786]:=",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] }, Open ]], Cell[CellGroupData[{ @@ -79,7 +79,7 @@ Cell[BoxData[{ 3.917383102823773*^9}, {3.9173831552741337`*^9, 3.917383158507695*^9}, 3.917383532443891*^9}, CellLabel-> - "In[898]:=",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] + "In[787]:=",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] }, Open ]], Cell[CellGroupData[{ @@ -97,36 +97,30 @@ Cell[BoxData[{ RowBox[{ RowBox[{ SubscriptBox["d", "1"], "[", - RowBox[{"S_", ",", "K_", ",", "\[Sigma]_", ",", "\[Tau]_"}], "]"}], " ", ":=", - " ", + RowBox[{"S_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], " ", ":=", " ", FractionBox[ RowBox[{ RowBox[{"Log", "[", - FractionBox["S", "K"], "]"}], " ", "+", " ", + FractionBox["S", "\[Mu]"], "]"}], " ", "+", " ", RowBox[{ FractionBox["1", "2"], - SuperscriptBox["\[Sigma]", "2"], "\[Tau]"}]}], - RowBox[{"\[Sigma]", - RowBox[{"\[Sqrt]", "\[Tau]"}]}]]}], "\n", + SuperscriptBox["\[Sigma]", "2"]}]}], "\[Sigma]"]}], "\n", RowBox[{ RowBox[{ SubscriptBox["d", "2"], "[", - RowBox[{"S_", ",", "K_", ",", "\[Sigma]_", ",", "\[Tau]_"}], "]"}], " ", ":=", - " ", + RowBox[{"S_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], " ", ":=", " ", FractionBox[ RowBox[{ RowBox[{"Log", "[", - FractionBox["S", "K"], "]"}], " ", "-", " ", + FractionBox["S", "\[Mu]"], "]"}], " ", "-", " ", RowBox[{ FractionBox["1", "2"], - SuperscriptBox["\[Sigma]", "2"], "\[Tau]"}]}], - RowBox[{"\[Sigma]", - RowBox[{"\[Sqrt]", "\[Tau]"}]}]]}]}], "Code", + SuperscriptBox["\[Sigma]", "2"]}]}], "\[Sigma]"]}]}], "Code", CellChangeTimes->{{3.911383086202894*^9, 3.911383096527341*^9}, { - 3.911383144055451*^9, 3.911383310823001*^9}, {3.9113851030677443`*^9, - 3.91138511600043*^9}}, + 3.911383144055451*^9, 3.911383310823001*^9}, {3.9113851030677443`*^9, + 3.91138511600043*^9}, 3.9185709112502613`*^9}, CellLabel-> - "In[900]:=",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] + "In[789]:=",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] }, Open ]], Cell[CellGroupData[{ @@ -154,66 +148,62 @@ Cell[BoxData[{ RowBox[{ RowBox[{ SubscriptBox["L", "X"], "[", - RowBox[{"x_", ",", "S_", ",", "K_", ",", "\[Sigma]_", ",", "\[Tau]_"}], - "]"}], " ", ":=", " ", + RowBox[{"x_", ",", "S_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], " ", ":=", + " ", FractionBox["x", RowBox[{"1", " ", "-", " ", RowBox[{"\[CapitalPhi]", "[", RowBox[{ SubscriptBox["d", "1"], "[", - RowBox[{"S", ",", "K", ",", "\[Sigma]", ",", "\[Tau]"}], "]"}], - "]"}]}]]}], "\n", + RowBox[{"S", ",", "\[Mu]", ",", "\[Sigma]"}], "]"}], "]"}]}]]}], "\n", RowBox[{ RowBox[{ SubscriptBox["L", "Y"], "[", - RowBox[{"y_", ",", "S_", ",", "K_", ",", "\[Sigma]_", ",", "\[Tau]_"}], - "]"}], " ", ":=", " ", + RowBox[{"y_", ",", "S_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], " ", ":=", + " ", FractionBox["y", - RowBox[{"K", " ", + RowBox[{"\[Mu]", " ", RowBox[{"\[CapitalPhi]", "[", RowBox[{ SubscriptBox["d", "2"], "[", - RowBox[{"S", ",", "K", ",", "\[Sigma]", ",", "\[Tau]"}], "]"}], - "]"}]}]]}], "\n", + RowBox[{"S", ",", "\[Mu]", ",", "\[Sigma]"}], "]"}], "]"}]}]]}], "\n", RowBox[{ RowBox[{"X", "[", - RowBox[{"y_", ",", "S_", ",", "K_", ",", "\[Sigma]_", ",", "\[Tau]_"}], - "]"}], " ", ":=", " ", + RowBox[{"y_", ",", "S_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], " ", ":=", + " ", RowBox[{ RowBox[{ SubscriptBox["L", "Y"], "[", - RowBox[{"y", ",", "S", ",", "K", ",", "\[Sigma]", ",", "\[Tau]"}], "]"}], - " ", + RowBox[{"y", ",", "S", ",", "\[Mu]", ",", "\[Sigma]"}], "]"}], " ", RowBox[{"(", RowBox[{"1", " ", "-", " ", RowBox[{"\[CapitalPhi]", "[", RowBox[{ SubscriptBox["d", "1"], "[", - RowBox[{"S", ",", "K", ",", "\[Sigma]", ",", "\[Tau]"}], "]"}], - "]"}]}], ")"}]}]}], "\n", + RowBox[{"S", ",", "\[Mu]", ",", "\[Sigma]"}], "]"}], "]"}]}], + ")"}]}]}], "\n", RowBox[{ RowBox[{"Y", "[", - RowBox[{"x_", ",", "S_", ",", "K_", ",", "\[Sigma]_", ",", "\[Tau]_"}], - "]"}], " ", ":=", " ", - RowBox[{"K", " ", + RowBox[{"x_", ",", "S_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], " ", ":=", + " ", + RowBox[{"\[Mu]", " ", RowBox[{ SubscriptBox["L", "X"], "[", - RowBox[{"x", ",", "S", ",", "K", ",", "\[Sigma]", ",", "\[Tau]"}], "]"}], - " ", + RowBox[{"x", ",", "S", ",", "\[Mu]", ",", "\[Sigma]"}], "]"}], " ", RowBox[{"\[CapitalPhi]", "[", RowBox[{ SubscriptBox["d", "2"], "[", - RowBox[{"S", ",", "K", ",", "\[Sigma]", ",", "\[Tau]"}], "]"}], - "]"}]}]}]}], "Code", + RowBox[{"S", ",", "\[Mu]", ",", "\[Sigma]"}], "]"}], "]"}]}]}]}], "Code",\ + CellChangeTimes->{{3.911383688783895*^9, 3.911383741794456*^9}, { - 3.911383797950727*^9, 3.911383809912835*^9}, {3.9113838491740713`*^9, - 3.911383864952888*^9}, {3.9113841779644413`*^9, 3.911384322151863*^9}, { - 3.911384433609087*^9, 3.911384448745434*^9}, {3.9113850554248533`*^9, - 3.911385099649076*^9}, {3.91138525707533*^9, 3.911385263363533*^9}, { - 3.911385324670476*^9, 3.911385325035862*^9}, {3.911409187909778*^9, - 3.9114091880800257`*^9}}, + 3.911383797950727*^9, 3.911383809912835*^9}, {3.9113838491740713`*^9, + 3.911383864952888*^9}, {3.9113841779644413`*^9, 3.911384322151863*^9}, { + 3.911384433609087*^9, 3.911384448745434*^9}, {3.9113850554248533`*^9, + 3.911385099649076*^9}, {3.91138525707533*^9, 3.911385263363533*^9}, { + 3.911385324670476*^9, 3.911385325035862*^9}, {3.911409187909778*^9, + 3.9114091880800257`*^9}, 3.9185709187863417`*^9}, CellLabel-> - "In[902]:=",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] + "In[791]:=",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] }, Open ]], Cell[CellGroupData[{ @@ -230,9 +220,9 @@ Cell[BoxData[{ RowBox[{ RowBox[{ SubscriptBox["P", "X"], "[", - RowBox[{"x_", ",", "L_", ",", "K_", ",", "\[Sigma]_", ",", "\[Tau]_"}], - "]"}], " ", ":=", " ", - RowBox[{"K", " ", + RowBox[{"x_", ",", "L_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], " ", ":=", + " ", + RowBox[{"\[Mu]", " ", RowBox[{"Exp", "[", RowBox[{ RowBox[{ @@ -246,23 +236,23 @@ Cell[BoxData[{ RowBox[{ RowBox[{ SubscriptBox["P", "Y"], "[", - RowBox[{"y_", ",", "L_", ",", "K_", ",", "\[Sigma]_", ",", "\[Tau]_"}], - "]"}], " ", ":=", " ", - RowBox[{"K", " ", + RowBox[{"y_", ",", "L_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], " ", ":=", + " ", + RowBox[{"\[Mu]", " ", RowBox[{"Exp", "[", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[CapitalPhi]", "inv"], "[", FractionBox["y", - RowBox[{"K", " ", "L"}]], "]"}], "\[Sigma]"}], " ", "+", " ", + RowBox[{"\[Mu]", " ", "L"}]], "]"}], "\[Sigma]"}], " ", "+", " ", RowBox[{ FractionBox["1", "2"], SuperscriptBox["\[Sigma]", "2"]}]}], "]"}]}]}]}], "Code", CellChangeTimes->{{3.9113839769604807`*^9, 3.911384029460125*^9}, { - 3.911385062781126*^9, 3.911385091502931*^9}}, + 3.911385062781126*^9, 3.911385091502931*^9}, 3.91857093005863*^9}, CellLabel-> - "In[906]:=",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] + "In[795]:=",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] }, Open ]], Cell[CellGroupData[{ @@ -275,8 +265,7 @@ a417d745ef90"], Cell[BoxData[ RowBox[{ RowBox[{"\[CurlyPhi]", "[", - RowBox[{ - "x_", ",", "y_", ",", "L_", ",", "K_", ",", "\[Sigma]_", ",", "\[Tau]_"}], + RowBox[{"x_", ",", "y_", ",", "L_", ",", "\[Mu]_", ",", "\[Sigma]_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{ @@ -285,13 +274,11 @@ Cell[BoxData[ RowBox[{ SubscriptBox["\[CapitalPhi]", "inv"], "[", FractionBox["y", - RowBox[{"K", " ", "L"}]], "]"}], "+", - RowBox[{"\[Sigma]", - RowBox[{"\[Sqrt]", "\[Tau]"}]}]}]}]], "Code", + RowBox[{"\[Mu]", " ", "L"}]], "]"}], "+", "\[Sigma]"}]}]], "Code", CellChangeTimes->{{3.911410806554799*^9, 3.911410882453505*^9}, { - 3.9114109468550673`*^9, 3.9114109866059113`*^9}}, + 3.9114109468550673`*^9, 3.9114109866059113`*^9}, 3.9185709352254477`*^9}, CellLabel-> - "In[908]:=",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] + "In[797]:=",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] }, Open ]] }, Open ]] }, Open ]], @@ -320,53 +307,32 @@ fee parameter \[Gamma]\ Cell[CellGroupData[{ -Cell[BoxData[ +Cell[BoxData[{ RowBox[{ - RowBox[{"(*", - RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{ - SubscriptBox["K", "0"], ",", " ", - SubscriptBox["\[Sigma]", "0"], ",", " ", - SubscriptBox["\[Tau]", "0"], ",", " ", - SubscriptBox["\[Gamma]", "0"]}], "}"}], " ", "=", " ", - RowBox[{"{", - RowBox[{"3", ",", " ", - FractionBox["1", "4"], ",", " ", "1", ",", " ", "0.997"}], "}"}]}], - ";"}], " ", "*)"}], "\n", RowBox[{ RowBox[{ - RowBox[{ - RowBox[{"{", - RowBox[{ - SubscriptBox["K", "0"], ",", " ", - SubscriptBox["\[Sigma]", "0"], ",", " ", - SubscriptBox["\[Tau]", "0"], ",", " ", - SubscriptBox["\[Gamma]", "0"]}], "}"}], " ", "=", " ", - RowBox[{"{", - RowBox[{"1", ",", " ", - FractionBox["1", "8"], ",", " ", "1", ",", " ", "0.997"}], "}"}]}], - ";"}], " ", "\n", - RowBox[{ - RowBox[{"Echo", "[", - RowBox[{ - SubscriptBox["K", "0"], ",", " ", - "\"\<\!\(\*SubscriptBox[\(K\), \(0\)]\) = \>\""}], "]"}], ";", " ", - RowBox[{"Echo", "[", + RowBox[{"{", RowBox[{ + SubscriptBox["\[Mu]", "0"], ",", " ", SubscriptBox["\[Sigma]", "0"], ",", " ", - "\"\<\!\(\*SubscriptBox[\(\[Sigma]\), \(0\)]\) = \>\""}], "]"}], ";", - " ", - RowBox[{"Echo", "[", - RowBox[{ - SubscriptBox["\[Tau]", "0"], ",", " ", - "\"\<\!\(\*SubscriptBox[\(\[Tau]\), \(0\)]\) = \>\""}], "]"}], ";", " ", - RowBox[{"Echo", "[", - RowBox[{ - SubscriptBox["\[Gamma]", "0"], ",", " ", - "\"\<\!\(\*SubscriptBox[\(\[Gamma]\), \(0\)]\) = \>\""}], "]"}], - ";"}]}]}]], "Code", + SubscriptBox["\[Gamma]", "0"]}], "}"}], " ", "=", " ", + RowBox[{"{", + RowBox[{"1.8", ",", " ", + FractionBox["1", "8"], ",", " ", "0.997"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{ + RowBox[{"Echo", "[", + RowBox[{ + SubscriptBox["K", "0"], ",", " ", + "\"\<\!\(\*SubscriptBox[\(K\), \(0\)]\) = \>\""}], "]"}], ";", " ", + RowBox[{"Echo", "[", + RowBox[{ + SubscriptBox["\[Sigma]", "0"], ",", " ", + "\"\<\!\(\*SubscriptBox[\(\[Sigma]\), \(0\)]\) = \>\""}], "]"}], ";", " ", + RowBox[{"Echo", "[", + RowBox[{ + SubscriptBox["\[Gamma]", "0"], ",", " ", + "\"\<\!\(\*SubscriptBox[\(\[Gamma]\), \(0\)]\) = \>\""}], "]"}], + ";"}]}], "Code", CellChangeTimes->{ 3.91138448247676*^9, {3.9113845136096563`*^9, 3.911384540517331*^9}, { 3.911384579083336*^9, 3.911384646274679*^9}, {3.911384706054633*^9, @@ -378,44 +344,38 @@ Cell[BoxData[ 3.916935393268579*^9}, {3.916935561687649*^9, 3.916935563633135*^9}, { 3.91738367920582*^9, 3.917383680576692*^9}, {3.917384081819539*^9, 3.917384085426984*^9}, {3.9173856229323063`*^9, 3.917385639341588*^9}, { - 3.91751517656183*^9, - 3.917515189435231*^9}},ExpressionUUID->"8d262a91-37a1-41fb-b1b3-\ -ae8191b1ccda"], + 3.91751517656183*^9, 3.917515189435231*^9}, {3.918570943201333*^9, + 3.918570984185614*^9}, {3.918571110139764*^9, 3.9185711113502274`*^9}, { + 3.9185720081337433`*^9, 3.918572008408592*^9}}, + CellLabel-> + "In[899]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(K\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "3"}]], "Echo", + "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.917385639673291*^9},ExpressionUUID->"af988e57-d45b-493e-8c77-\ -aeb0d6754a04"], + 3.918572009101523*^9},ExpressionUUID->"a4499489-9b81-4960-a2a1-\ +b4c77a3544a6"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Sigma]\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", - FractionBox["1", "4"]}]], "Echo", + FractionBox["1", "8"]}]], "Echo", CellChangeTimes->{ - 3.917385639702611*^9},ExpressionUUID->"7cbb943d-e136-42be-b7bf-\ -17128b81f7f7"], - -Cell[BoxData[ - RowBox[{ - TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Tau]\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1"}]], "Echo", - CellChangeTimes->{ - 3.917385639712528*^9},ExpressionUUID->"35bc58ee-e40e-4bf3-9e9f-\ -061ba0d278fb"], + 3.9185720091361227`*^9},ExpressionUUID->"6750b1fb-4db5-4f05-bad3-\ +ef1c14e2fc31"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Gamma]\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "0.997`"}]], "Echo", CellChangeTimes->{ - 3.917385639734725*^9},ExpressionUUID->"e144304b-6b21-4799-ac3b-\ -3fa33013028a"] + 3.918572009144829*^9},ExpressionUUID->"fa591330-eb02-4b9b-8018-\ +23c322d34814"] }, Open ]] }, Open ]] }, Open ]], @@ -460,9 +420,9 @@ Cell[BoxData[{ 3.917383705323718*^9}, {3.917383899939695*^9, 3.9173839018597183`*^9}, { 3.917383976339484*^9, 3.917383976688408*^9}, 3.917384041262576*^9, { 3.9173840921075373`*^9, 3.9173840922911777`*^9}, 3.917384525229738*^9, { - 3.917515198755231*^9, - 3.917515199530878*^9}},ExpressionUUID->"085ca656-cc94-43cf-a8c6-\ -c116e23e4910"], + 3.917515198755231*^9, 3.917515199530878*^9}}, + CellLabel-> + "In[901]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ @@ -470,18 +430,18 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial X-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(x\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1000"}]], "Echo", + "EchoLabel"], " ", "1000000"}]], "Echo", CellChangeTimes->{ - 3.9173856411472588`*^9},ExpressionUUID->"b0609413-5fee-4b86-aed9-\ -380cc72ca5ad"], + 3.918572010578458*^9},ExpressionUUID->"4d9e194b-7ad9-4cc9-bcd2-\ +d436ba44db13"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(S\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "2"}]], "Echo", CellChangeTimes->{ - 3.917385641179336*^9},ExpressionUUID->"0d8deb13-fecc-40d5-b792-\ -e5be624a621e"] + 3.918572010617074*^9},ExpressionUUID->"36aba80c-b092-4f6c-97f2-\ +6c31a3372355"] }, Open ]] }, Open ]], @@ -512,16 +472,14 @@ Cell[BoxData[{ RowBox[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"], ",", - SubscriptBox["K", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}], ",", " ", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"]}], "]"}], ",", " ", RowBox[{"Y", "[", RowBox[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"], ",", - SubscriptBox["K", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}]}], "}"}]}], ";"}], " "}], "\n", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"]}], "]"}]}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -541,9 +499,11 @@ Cell[BoxData[{ 3.911384992602735*^9, 3.9113850128379593`*^9}, {3.911385047347066*^9, 3.9113850518014383`*^9}, {3.9113851385254107`*^9, 3.9113851753238697`*^9}, { 3.91138696634296*^9, 3.911386992951726*^9}, {3.911387349621842*^9, - 3.911387398394403*^9}, {3.911912845565853*^9, 3.9119128460491123`*^9}}, + 3.911387398394403*^9}, {3.911912845565853*^9, 3.9119128460491123`*^9}, { + 3.918570990618823*^9, 3.918570994101475*^9}, {3.9185711059481163`*^9, + 3.9185711082874823`*^9}}, CellLabel-> - "In[811]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], + "In[903]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ @@ -551,20 +511,19 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial liquidity is: \\!\\(\\*SubscriptBox[\\(L\\), \ \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", - "1072.05816303780375296378681139341832357048`18."}]], "Echo", + "EchoLabel"], " ", "5.475522837620823`*^6"}]], "Echo", CellChangeTimes->{ - 3.91738564223216*^9},ExpressionUUID->"4fd65137-02a9-41b3-ba18-0ebf41cc4e36"], + 3.9185720116787777`*^9},ExpressionUUID->"4790e4b4-41be-4f5e-8bff-\ +f272d933e968"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial Y-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(y\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", - "129.71081089049378429032401949955047960211`18."}]], "Echo", + "EchoLabel"], " ", "7.711461742635077`*^6"}]], "Echo", CellChangeTimes->{ - 3.917385642263144*^9},ExpressionUUID->"21eb62ab-27a6-41dd-a389-\ -5142ff75a033"] + 3.918572011720044*^9},ExpressionUUID->"c8c41200-1626-44b7-a7a2-\ +1fe2c6608cc7"] }, Open ]] }, Open ]] }, Open ]], @@ -587,17 +546,15 @@ Cell[BoxData[{ RowBox[{ SubscriptBox["x", "0"], ",", SubscriptBox["L", "0"], ",", - SubscriptBox["K", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}], " ", "==", " ", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"]}], "]"}], " ", "==", " ", RowBox[{ SubscriptBox["P", "Y"], "[", RowBox[{ SubscriptBox["y", "0"], ",", SubscriptBox["L", "0"], ",", - SubscriptBox["K", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}]}], "]"}], "\n", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"]}], "]"}]}], "]"}], "\n", RowBox[{ RowBox[{ RowBox[{"Echo", "[", @@ -607,24 +564,24 @@ Cell[BoxData[{ RowBox[{ SubscriptBox["x", "0"], ",", SubscriptBox["L", "0"], ",", - SubscriptBox["K", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}], ",", " ", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"]}], "]"}], ",", " ", "\"\\""}], "]"}], ";"}], " "}]}], "Code", CellChangeTimes->{{3.9113853639105387`*^9, 3.9113854185634947`*^9}, { 3.9113869483534203`*^9, 3.911386962492029*^9}, {3.911386994813387*^9, 3.911387177122032*^9}, {3.911387291516371*^9, 3.911387309281919*^9}, - 3.911912928324705*^9}, + 3.911912928324705*^9, {3.9185711812613907`*^9, 3.918571185390046*^9}, { + 3.91857169317227*^9, 3.918571699558569*^9}}, CellLabel-> - "In[356]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], + "In[905]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial price is: P = \"\>", - "EchoLabel"], " ", "2"}]], "Echo", + "EchoLabel"], " ", "2.`"}]], "Echo", CellChangeTimes->{ - 3.917384531034382*^9},ExpressionUUID->"15c46bab-62f8-4c23-be66-\ -af5cfc278ceb"] + 3.9185720149225597`*^9},ExpressionUUID->"5984be7f-2a65-461d-907d-\ +9fc0751b8263"] }, Open ]] }, Open ]], @@ -654,16 +611,14 @@ Cell[BoxData[{ RowBox[{ SubscriptBox["y", "0"], ",", SubscriptBox["S", "0"], ",", - SubscriptBox["K", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}], ",", " ", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"]}], "]"}], ",", " ", RowBox[{"X", "[", RowBox[{ SubscriptBox["y", "0"], ",", SubscriptBox["S", "0"], ",", - SubscriptBox["K", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}]}], "}"}]}], ";"}], "\n", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"]}], "]"}]}], "}"}]}], ";"}], "\n", RowBox[{ RowBox[{"Assert", "[", RowBox[{ @@ -679,9 +634,10 @@ Cell[BoxData[{ SubscriptBox["x", "0"]}], "}"}]}], "]"}], ";"}]}], "Code", CellChangeTimes->{{3.911387447754344*^9, 3.911387533259612*^9}, { 3.911409113951961*^9, 3.911409136342054*^9}, {3.911409206127439*^9, - 3.911409206365666*^9}}, + 3.911409206365666*^9}, {3.918571188362344*^9, 3.918571190424653*^9}, { + 3.9185717026957493`*^9, 3.918571706012089*^9}}, CellLabel-> - "In[358]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] + "In[907]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], @@ -707,52 +663,38 @@ reserve.\ Cell[BoxData[{ RowBox[{ RowBox[{ - RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", - RowBox[{ - RowBox[{"(", - RowBox[{"1", "-", "\[Gamma]"}], ")"}], "\[CapitalDelta]"}]}], "\n", - RowBox[{"(*", - RowBox[{ - RowBox[{ - SubscriptBox["\[Delta]", "Liq"], "[", - RowBox[{"\[CapitalDelta]_", ",", "R_", ",", "L_", ",", "\[Gamma]_"}], - "]"}], " ", ":=", " ", - RowBox[{ - RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], - FractionBox["L", "R"]}]}], "*)"}]}], "\n", + SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"\[CapitalDelta]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", + RowBox[{ + RowBox[{"(", + RowBox[{"1", "-", "\[Gamma]"}], ")"}], "\[CapitalDelta]"}]}], "\n", RowBox[{ RowBox[{ SubscriptBox["\[CapitalDelta]", "X"], "[", RowBox[{ - "\[CapitalDelta]_", ",", "x_", ",", "y_", ",", "L_", ",", "K_", ",", + "\[CapitalDelta]_", ",", "x_", ",", "y_", ",", "L_", ",", "\[Mu]_", ",", "\[Sigma]_", ",", "\[Tau]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox["1", "K"], + FractionBox["1", "\[Mu]"], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], ")"}], RowBox[{"\[CapitalPhi]", "[", RowBox[{ - RowBox[{ - RowBox[{"-", "\[Sigma]"}], - RowBox[{"\[Sqrt]", "\[Tau]"}]}], " ", "-", " ", + RowBox[{"-", "\[Sigma]"}], " ", "-", " ", RowBox[{ SubscriptBox["\[CapitalPhi]", "inv"], "[", FractionBox[ RowBox[{"y", "+", "\[CapitalDelta]"}], - RowBox[{"K", + RowBox[{"\[Mu]", RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox["1", "K"], + FractionBox["1", "\[Mu]"], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], @@ -761,10 +703,10 @@ Cell[BoxData[{ RowBox[{ SubscriptBox["\[CapitalDelta]", "Y"], "[", RowBox[{ - "\[CapitalDelta]_", ",", "x_", ",", "y_", ",", "L_", ",", "K_", ",", + "\[CapitalDelta]_", ",", "x_", ",", "y_", ",", "L_", ",", "\[Mu]_", ",", "\[Sigma]_", ",", "\[Tau]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", RowBox[{ - RowBox[{"K", + RowBox[{"\[Mu]", RowBox[{"(", RowBox[{"L", "+", RowBox[{ @@ -772,9 +714,7 @@ Cell[BoxData[{ RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}], ")"}], RowBox[{"\[CapitalPhi]", "[", RowBox[{ - RowBox[{ - RowBox[{"-", "\[Sigma]"}], - RowBox[{"\[Sqrt]", "\[Tau]"}]}], " ", "-", " ", + RowBox[{"-", "\[Sigma]"}], " ", "-", " ", RowBox[{ SubscriptBox["\[CapitalPhi]", "inv"], "[", FractionBox[ @@ -795,15 +735,18 @@ Cell[BoxData[{ 3.91738450986141*^9}, {3.917384708602298*^9, 3.917384711107472*^9}, { 3.917384741504918*^9, 3.917384745117815*^9}, {3.917384781098084*^9, 3.917384801570612*^9}, {3.917384922013281*^9, 3.917384925581356*^9}, { - 3.9173850860945387`*^9, 3.917385090363779*^9}, - 3.917385467785697*^9},ExpressionUUID->"0716117c-5381-46be-8b57-\ -f2cefa727879"], + 3.9173850860945387`*^9, 3.917385090363779*^9}, 3.917385467785697*^9, { + 3.91857109514256*^9, 3.9185711020502167`*^9}, {3.91857136201642*^9, + 3.918571379355769*^9}, {3.9185719508515673`*^9, 3.9185719564304523`*^9}, { + 3.918572032513034*^9, 3.9185720372819643`*^9}}, + CellLabel-> + "In[922]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ - RowBox[{"YIn", " ", "=", " ", "10"}], ";"}], "\n", + RowBox[{"YIn", " ", "=", " ", "1"}], ";"}], "\n", RowBox[{ RowBox[{"XOut", " ", "=", " ", RowBox[{ @@ -812,23 +755,13 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["y", "0"], ",", SubscriptBox["L", "0"], ",", - SubscriptBox["K", "0"], ",", + SubscriptBox["\[Mu]", "0"], ",", SubscriptBox["\[Sigma]", "0"], ",", SubscriptBox["\[Tau]", "0"], ",", SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", RowBox[{ - RowBox[{ - RowBox[{"Echo", "[", - RowBox[{"XOut", ",", " ", "\"\\""}], "]"}], ";"}], "\n", - RowBox[{"(*", - RowBox[{ - RowBox[{"DeltaL", " ", "=", " ", - RowBox[{ - SubscriptBox["\[Delta]", "Liq"], "[", - RowBox[{"YIn", ",", - SubscriptBox["y", "0"], ",", - SubscriptBox["L", "0"], ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "*)"}]}], "\n", + RowBox[{"Echo", "[", + RowBox[{"XOut", ",", " ", "\"\\""}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ @@ -849,13 +782,13 @@ Cell[BoxData[{ SubscriptBox["L", "0"], "+", RowBox[{ FractionBox["1", - SubscriptBox["K", "0"]], "DeltaL"}]}], ",", - SubscriptBox["K", "0"], ",", + SubscriptBox["\[Mu]", "0"]], "DeltaL"}]}], ",", + SubscriptBox["\[Mu]", "0"], ",", SubscriptBox["\[Sigma]", "0"], ",", SubscriptBox["\[Tau]", "0"]}], "]"}], ",", " ", "\"\\""}], "]"}], ";"}], "\n"}], "\n", RowBox[{ - RowBox[{"XIn", " ", "=", " ", "10"}], ";"}], "\n", + RowBox[{"XIn", " ", "=", " ", "1"}], ";"}], "\n", RowBox[{ RowBox[{"YOut", " ", "=", " ", RowBox[{ @@ -864,74 +797,44 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["y", "0"], ",", SubscriptBox["L", "0"], ",", - SubscriptBox["K", "0"], ",", + SubscriptBox["\[Mu]", "0"], ",", SubscriptBox["\[Sigma]", "0"], ",", SubscriptBox["\[Tau]", "0"], ",", SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", RowBox[{ - RowBox[{ - RowBox[{"Echo", "[", - RowBox[{"YOut", ",", " ", "\"\\""}], "]"}], ";"}], "\n", - RowBox[{"(*", - RowBox[{ - RowBox[{"DeltaL", " ", "=", " ", - RowBox[{ - SubscriptBox["\[Delta]", "Liq"], "[", - RowBox[{"XIn", ",", - SubscriptBox["x", "0"], ",", - SubscriptBox["L", "0"], ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "*)"}]}], "\n", + RowBox[{"Echo", "[", + RowBox[{"YOut", ",", " ", "\"\\""}], "]"}], ";"}], "\n", RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ SubscriptBox["\[Delta]", "in"], "[", RowBox[{"XIn", ",", SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", - RowBox[{ - RowBox[{ - RowBox[{"Echo", "[", - RowBox[{ - RowBox[{"\[CurlyPhi]", "[", - RowBox[{ - RowBox[{ - SubscriptBox["x", "0"], "+", "XIn"}], ",", - RowBox[{ - SubscriptBox["y", "0"], "+", "YOut"}], ",", - RowBox[{ - SubscriptBox["L", "0"], "+", "DeltaL"}], ",", - SubscriptBox["K", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}], ",", " ", - "\"\\""}], "]"}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ - RowBox[{"2", "/", - RowBox[{"(", - RowBox[{"YOut", "/", "XIn"}], ")"}]}], ",", " ", - "\"\<2/\!\(\*FractionBox[SubscriptBox[\(Y\), \(out\)], \ -SubscriptBox[\(X\), \(in\)]]\) = \>\""}], "]"}], ";"}], "\n", - RowBox[{ - RowBox[{"Echo", "[", - RowBox[{ - RowBox[{ - RowBox[{"(", - RowBox[{"YIn", "/", "XOut"}], ")"}], "/", "2"}], ",", " ", - "\"\<\!\(\*FractionBox[SubscriptBox[\(Y\), \(in\)], SubscriptBox[\(X\), \ -\(out\)]]\)/2 = \>\""}], "]"}], ";"}]}], "Code", - CellChangeTimes->{{3.9173824881246443`*^9, 3.917382640107789*^9}, { - 3.917382703512905*^9, 3.917382797160448*^9}, {3.917382957143201*^9, - 3.9173829787289667`*^9}, {3.917383009866159*^9, 3.91738301413713*^9}, { - 3.9173830595966473`*^9, 3.9173830608297663`*^9}, {3.917383133177814*^9, - 3.917383139655548*^9}, {3.91738319090906*^9, 3.9173832152140627`*^9}, { - 3.917383329695533*^9, 3.9173833441047373`*^9}, {3.917383592136142*^9, - 3.917383601902347*^9}, {3.917383788771337*^9, 3.9173838368765507`*^9}, { - 3.917383998912529*^9, 3.917384002782464*^9}, {3.917384361112628*^9, - 3.917384432792912*^9}, {3.917384584058999*^9, 3.917384619281192*^9}, { - 3.9173846522116756`*^9, 3.9173846873539762`*^9}, {3.9173849883607492`*^9, - 3.917384990884163*^9}, {3.917385341574011*^9, 3.917385423584772*^9}}, + RowBox[{"\[CurlyPhi]", "[", + RowBox[{ + RowBox[{ + SubscriptBox["x", "0"], "+", "XIn"}], ",", + RowBox[{ + SubscriptBox["y", "0"], "+", "YOut"}], ",", + RowBox[{ + SubscriptBox["L", "0"], "+", "DeltaL"}], ",", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"], ",", + SubscriptBox["\[Tau]", "0"]}], "]"}], ",", " ", + "\"\\""}], "]"}], ";"}]}], "Code", + CellChangeTimes->CompressedData[" +1:eJxTTMoPSmViYGAQBmIQLfaXOfuC/ltHpmLmOhC9I/NDK4hOUVo6EURLTV2y +FERvCg5fAaInb7deA6Ljko+A6T3ixZtAdFHvLDC9fMPS3SDa4VfJHhDNKn73 +EIiedfPZURB9ztHsCti+KOZrINotmuUriGZ/YPMNRJ9eN4P3IpDewjNHGEQX +GN9VB9GfOCM1QPSyWcqhILozXjIORAc9ZiwE0W3/M0pBNM+xtkoQfSz4dS2I +duruXgyiBbzvgGmfuE3nQXTJtk83QbTKtsvvRIzeOmZ+aPsEouPSdkuIAulv +M++C6VfNXy3AfHtXSxANANaRnXs= + "], CellLabel-> - "In[789]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], + "In[925]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ @@ -939,55 +842,35 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"XOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "4.981498792389971`"}]}]], "Echo", + RowBox[{"-", "0.49852197780273855`"}]}]], "Echo", CellChangeTimes->{ - 3.91738542395758*^9},ExpressionUUID->"1aea5154-7487-4053-9b87-eaebfcd6471a"], + 3.918572039366729*^9},ExpressionUUID->"e778761a-c888-41eb-bb8e-\ +ba6277cfb258"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", "0.`"}]], "Echo", + "EchoLabel"], " ", "1.1102230246251565`*^-16"}]], "Echo", CellChangeTimes->{ - 3.917385423988958*^9},ExpressionUUID->"a705af7b-dd8d-4843-9013-\ -b64731e90a11"], + 3.918572039398485*^9},ExpressionUUID->"2ca752e4-9f24-4123-be27-\ +8e1c30f03b71"], Cell[BoxData[ RowBox[{ TagBox["\<\"YOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "19.900212359436182`"}]}]], "Echo", + RowBox[{"-", "1.9946790738031268`"}]}]], "Echo", CellChangeTimes->{ - 3.917385423997478*^9},ExpressionUUID->"d4db3b60-bed3-4a41-b647-\ -914ae220d498"], + 3.9185720394081783`*^9},ExpressionUUID->"a0a4a8d1-3cf9-494d-8a06-\ +67cd9959971d"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", - RowBox[{"-", "1.1102230246251565`*^-16"}]}]], "Echo", - CellChangeTimes->{ - 3.917385424017386*^9},ExpressionUUID->"66263894-11e5-431a-bd4e-\ -56e199c15a5b"], - -Cell[BoxData[ - RowBox[{ - TagBox["\<\"2/\\!\\(\\*FractionBox[SubscriptBox[\\(Y\\), \\(out\\)], \ -SubscriptBox[\\(X\\), \\(in\\)]]\\) = \"\>", - "EchoLabel"], " ", - RowBox[{"-", "1.0050144007893715`"}]}]], "Echo", - CellChangeTimes->{ - 3.9173854240261383`*^9},ExpressionUUID->"77e6086f-c8ed-4881-ac7b-\ -1121513e1951"], - -Cell[BoxData[ - RowBox[{ - TagBox["\<\"\\!\\(\\*FractionBox[SubscriptBox[\\(Y\\), \\(in\\)], \ -SubscriptBox[\\(X\\), \\(out\\)]]\\)/2 = \"\>", - "EchoLabel"], " ", - RowBox[{"-", "1.0037139841604084`"}]}]], "Echo", + "EchoLabel"], " ", "2.220446049250313`*^-16"}]], "Echo", CellChangeTimes->{ - 3.9173854240418663`*^9},ExpressionUUID->"35ae76a0-b666-481e-9dfe-\ -b6888da9c15f"] + 3.9185720394322042`*^9},ExpressionUUID->"177255d5-b31d-40b8-b5b5-\ +614559615749"] }, Open ]] }, Open ]] }, Open ]] @@ -1022,14 +905,12 @@ Cell[TextData[{ "We will need the marginal price ", Cell[BoxData[ FormBox[ - SubscriptBox["P", "M"], TraditionalForm]], - FormatType->TraditionalForm,ExpressionUUID-> + SubscriptBox["P", "M"], TraditionalForm]],ExpressionUUID-> "17089434-c32f-45ea-a26f-0d3ed9139695"], " of a swap to compute optimal arbitrages and a profit calculation ", Cell[BoxData[ FormBox[ - SubscriptBox["V", "A"], TraditionalForm]], - FormatType->TraditionalForm,ExpressionUUID-> + SubscriptBox["V", "A"], TraditionalForm]],ExpressionUUID-> "72aada08-6991-4530-9774-3dd0a302c916"] }], "Subsubsection", CellChangeTimes->{{3.9113884927083406`*^9, 3.911388517540121*^9}, { @@ -1611,8 +1492,7 @@ Cell[TextData[{ "Let ", Cell[BoxData[ FormBox[ - SubscriptBox["O", "Y"], TraditionalForm]], - FormatType->TraditionalForm,ExpressionUUID-> + SubscriptBox["O", "Y"], TraditionalForm]],ExpressionUUID-> "daf8aba3-0522-4fdc-b0f6-095c37f44dc7"], " be the optimal amount of Y token to tender to get max arbitrage profit." }], "Subsubsection", @@ -2140,8 +2020,8 @@ f3028622cb8d"] }, Open ]] }, Open ]] }, -WindowSize->{823, 1233}, -WindowMargins->{{Automatic, 12}, {-819, Automatic}}, +WindowSize->{2993, 2083}, +WindowMargins->{{Automatic, 12}, {Automatic, -819}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, FrontEndVersion->"13.2 for Mac OS X ARM (64-bit) (January 31, 2023)", @@ -2161,11 +2041,11 @@ CellTagsIndex->{} (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ -Cell[422, 15, 185, 3, 238, "Title",ExpressionUUID->"2003d08a-fff7-4f74-8623-7a0823c9cafa"], +Cell[422, 15, 185, 3, 146, "Title",ExpressionUUID->"2003d08a-fff7-4f74-8623-7a0823c9cafa"], Cell[CellGroupData[{ -Cell[632, 22, 221, 5, 158, "Section",ExpressionUUID->"514be430-48c5-4dc6-92af-6b1c3a5b8586"], +Cell[632, 22, 221, 5, 101, "Section",ExpressionUUID->"514be430-48c5-4dc6-92af-6b1c3a5b8586"], Cell[CellGroupData[{ -Cell[878, 31, 222, 5, 122, "Subsection",ExpressionUUID->"f16f1652-ed41-4414-8c9b-6b6d5d8061ac"], +Cell[878, 31, 222, 5, 81, "Subsection",ExpressionUUID->"f16f1652-ed41-4414-8c9b-6b6d5d8061ac"], Cell[1103, 38, 578, 14, 54, "Code",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] }, Open ]], Cell[CellGroupData[{ @@ -2173,140 +2053,137 @@ Cell[1718, 57, 202, 3, 81, "Subsection",ExpressionUUID->"b3dd161e-0b53-4183-b30c Cell[1923, 62, 808, 19, 86, "Code",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] }, Open ]], Cell[CellGroupData[{ -Cell[2768, 86, 307, 7, 122, "Subsection",ExpressionUUID->"f601d02f-f91e-4780-a166-a78097a54f48"], -Cell[3078, 95, 1093, 33, 161, "Code",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] +Cell[2768, 86, 307, 7, 81, "Subsection",ExpressionUUID->"f601d02f-f91e-4780-a166-a78097a54f48"], +Cell[3078, 95, 977, 27, 165, "Code",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] }, Open ]], Cell[CellGroupData[{ -Cell[4208, 133, 296, 7, 122, "Subsection",ExpressionUUID->"009a24ad-ebe5-4d73-bdda-a7839592332a"], +Cell[4092, 127, 296, 7, 81, "Subsection",ExpressionUUID->"009a24ad-ebe5-4d73-bdda-a7839592332a"], Cell[CellGroupData[{ -Cell[4529, 144, 244, 6, 106, "Subsubsection",ExpressionUUID->"3b15f5e3-f420-4095-899a-506c7286cc40"], -Cell[4776, 152, 2312, 63, 192, "Code",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] +Cell[4413, 138, 244, 6, 67, "Subsubsection",ExpressionUUID->"3b15f5e3-f420-4095-899a-506c7286cc40"], +Cell[4660, 146, 2207, 59, 192, "Code",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] }, Open ]], Cell[CellGroupData[{ -Cell[7125, 220, 253, 6, 106, "Subsubsection",ExpressionUUID->"6228385e-cfd2-4bd0-97f4-58c98a5a994e"], -Cell[7381, 228, 1219, 36, 123, "Code",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] +Cell[6904, 210, 253, 6, 67, "Subsubsection",ExpressionUUID->"6228385e-cfd2-4bd0-97f4-58c98a5a994e"], +Cell[7160, 218, 1227, 36, 127, "Code",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] }, Open ]], Cell[CellGroupData[{ -Cell[8637, 269, 186, 3, 67, "Subsubsection",ExpressionUUID->"18015876-38da-4fa9-82b7-a417d745ef90"], -Cell[8826, 274, 685, 19, 68, "Code",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] +Cell[8424, 259, 186, 3, 67, "Subsubsection",ExpressionUUID->"18015876-38da-4fa9-82b7-a417d745ef90"], +Cell[8613, 264, 648, 16, 72, "Code",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[9572, 300, 285, 7, 158, "Section",ExpressionUUID->"da815218-0c74-4720-a5c9-76f45781c5e2"], +Cell[9322, 287, 285, 7, 101, "Section",ExpressionUUID->"da815218-0c74-4720-a5c9-76f45781c5e2"], Cell[CellGroupData[{ -Cell[9882, 311, 305, 7, 122, "Subsection",ExpressionUUID->"d461a415-44ca-4804-8248-6137a0f9449f"], +Cell[9632, 298, 305, 7, 81, "Subsection",ExpressionUUID->"d461a415-44ca-4804-8248-6137a0f9449f"], Cell[CellGroupData[{ -Cell[10212, 322, 2432, 60, 146, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], +Cell[9962, 309, 1890, 41, 106, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ -Cell[12669, 386, 230, 6, 38, "Echo",ExpressionUUID->"af988e57-d45b-493e-8c77-aeb0d6754a04"], -Cell[12902, 394, 258, 7, 53, "Echo",ExpressionUUID->"7cbb943d-e136-42be-b7bf-17128b81f7f7"], -Cell[13163, 403, 235, 6, 38, "Echo",ExpressionUUID->"35bc58ee-e40e-4bf3-9e9f-061ba0d278fb"], -Cell[13401, 411, 242, 6, 38, "Echo",ExpressionUUID->"e144304b-6b21-4799-ac3b-3fa33013028a"] +Cell[11877, 354, 230, 6, 38, "Echo",ExpressionUUID->"a4499489-9b81-4960-a2a1-b4c77a3544a6"], +Cell[12110, 362, 260, 7, 54, "Echo",ExpressionUUID->"6750b1fb-4db5-4f05-bad3-ef1c14e2fc31"], +Cell[12373, 371, 242, 6, 38, "Echo",ExpressionUUID->"fa591330-eb02-4b9b-8018-23c322d34814"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[13704, 424, 307, 7, 122, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], +Cell[12676, 384, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], Cell[CellGroupData[{ -Cell[14036, 435, 1157, 29, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], +Cell[13008, 395, 1179, 29, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ -Cell[15218, 468, 271, 7, 38, "Echo",ExpressionUUID->"b0609413-5fee-4b86-aed9-380cc72ca5ad"], -Cell[15492, 477, 230, 6, 38, "Echo",ExpressionUUID->"0d8deb13-fecc-40d5-b792-e5be624a621e"] +Cell[14212, 428, 272, 7, 38, "Echo",ExpressionUUID->"4d9e194b-7ad9-4cc9-bcd2-d436ba44db13"], +Cell[14487, 437, 230, 6, 38, "Echo",ExpressionUUID->"36aba80c-b092-4f6c-97f2-6c31a3372355"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[15771, 489, 251, 6, 106, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], +Cell[14766, 449, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], Cell[CellGroupData[{ -Cell[16047, 499, 1719, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], +Cell[15042, 459, 1743, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ -Cell[17791, 549, 304, 7, 38, "Echo",ExpressionUUID->"4fd65137-02a9-41b3-ba18-0ebf41cc4e36"], -Cell[18098, 558, 314, 8, 38, "Echo",ExpressionUUID->"21eb62ab-27a6-41dd-a389-5142ff75a033"] +Cell[16810, 509, 280, 7, 38, "Echo",ExpressionUUID->"4790e4b4-41be-4f5e-8bff-f272d933e968"], +Cell[17093, 518, 286, 7, 38, "Echo",ExpressionUUID->"c8c41200-1626-44b7-a7a2-1fe2c6608cc7"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[18473, 573, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], +Cell[17440, 532, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], Cell[CellGroupData[{ -Cell[18722, 581, 1319, 37, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], -Cell[20044, 620, 211, 6, 38, "Echo",ExpressionUUID->"15c46bab-62f8-4c23-be66-af5cfc278ceb"] +Cell[17689, 540, 1306, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], +Cell[18998, 577, 215, 6, 38, "Echo",ExpressionUUID->"5984be7f-2a65-461d-907d-9fc0751b8263"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[20304, 632, 284, 6, 106, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], -Cell[20591, 640, 1387, 43, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] +Cell[19262, 589, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], +Cell[19549, 597, 1408, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[22039, 690, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], +Cell[21018, 646, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], Cell[CellGroupData[{ -Cell[22219, 697, 290, 7, 122, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], -Cell[22512, 706, 3602, 93, 214, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], +Cell[21198, 653, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], +Cell[21491, 662, 3348, 80, 182, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ -Cell[26139, 803, 4710, 130, 602, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], +Cell[24864, 746, 3106, 90, 393, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ -Cell[30874, 937, 224, 6, 38, "Echo",ExpressionUUID->"1aea5154-7487-4053-9b87-eaebfcd6471a"], -Cell[31101, 945, 200, 6, 38, "Echo",ExpressionUUID->"a705af7b-dd8d-4843-9013-b64731e90a11"], -Cell[31304, 953, 228, 7, 38, "Echo",ExpressionUUID->"d4db3b60-bed3-4a41-b647-914ae220d498"], -Cell[31535, 962, 239, 7, 38, "Echo",ExpressionUUID->"66263894-11e5-431a-bd4e-56e199c15a5b"], -Cell[31777, 971, 320, 8, 63, "Echo",ExpressionUUID->"77e6086f-c8ed-4881-ac7b-1121513e1951"], -Cell[32100, 981, 320, 8, 63, "Echo",ExpressionUUID->"35ae76a0-b666-481e-9dfe-b6888da9c15f"] +Cell[27995, 840, 229, 7, 38, "Echo",ExpressionUUID->"e778761a-c888-41eb-bb8e-ba6277cfb258"], +Cell[28227, 849, 221, 6, 38, "Echo",ExpressionUUID->"2ca752e4-9f24-4123-be27-8e1c30f03b71"], +Cell[28451, 857, 230, 7, 38, "Echo",ExpressionUUID->"a0a4a8d1-3cf9-494d-8a06-67cd9959971d"], +Cell[28684, 866, 222, 6, 38, "Echo",ExpressionUUID->"177255d5-b31d-40b8-b5b5-614559615749"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[32493, 997, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], -Cell[32700, 1003, 568, 13, 142, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], +Cell[28979, 880, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], +Cell[29186, 886, 568, 13, 50, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], Cell[CellGroupData[{ -Cell[33293, 1020, 692, 17, 146, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], -Cell[33988, 1039, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] +Cell[29779, 903, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], +Cell[30412, 920, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] }, Open ]], Cell[CellGroupData[{ -Cell[34709, 1064, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], +Cell[31133, 945, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], Cell[CellGroupData[{ -Cell[35002, 1072, 460, 12, 107, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], +Cell[31426, 953, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], Cell[CellGroupData[{ -Cell[35487, 1088, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], -Cell[47211, 1413, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], +Cell[31911, 969, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], +Cell[43635, 1294, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], Cell[CellGroupData[{ -Cell[50760, 1495, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], -Cell[51065, 1504, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], -Cell[51371, 1514, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], -Cell[51759, 1525, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], -Cell[52003, 1533, 2181, 61, 96, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] +Cell[47184, 1376, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], +Cell[47489, 1385, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], +Cell[47795, 1395, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], +Cell[48183, 1406, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], +Cell[48427, 1414, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[54257, 1602, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], +Cell[50681, 1483, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], Cell[CellGroupData[{ -Cell[54453, 1609, 413, 11, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], +Cell[50877, 1490, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], Cell[CellGroupData[{ -Cell[54891, 1624, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], -Cell[62420, 1841, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], +Cell[51284, 1504, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], +Cell[58813, 1721, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], Cell[CellGroupData[{ -Cell[65998, 1923, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], -Cell[66302, 1932, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], -Cell[66606, 1942, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], -Cell[67000, 1954, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], -Cell[67241, 1962, 2460, 70, 190, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] +Cell[62391, 1803, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], +Cell[62695, 1812, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], +Cell[62999, 1822, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], +Cell[63393, 1834, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], +Cell[63634, 1842, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[69786, 2041, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], +Cell[66179, 1921, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], Cell[CellGroupData[{ -Cell[69975, 2048, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], +Cell[66368, 1928, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], Cell[CellGroupData[{ -Cell[70227, 2057, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], +Cell[66620, 1937, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], Cell[CellGroupData[{ -Cell[72397, 2118, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], -Cell[72706, 2128, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] +Cell[68790, 1998, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], +Cell[69099, 2008, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] }, Open ]] }, Open ]] }, Open ]] From 57924b7f6ca29009a971f29b7e7593f3448b01ea Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 4 Mar 2024 13:34:11 -0700 Subject: [PATCH 02/13] update g3m nb --- src/GeometricMean/README.md | 8 + src/GeometricMean/geometric_mean.nb | 430 ++++++++++++++++------------ 2 files changed, 250 insertions(+), 188 deletions(-) diff --git a/src/GeometricMean/README.md b/src/GeometricMean/README.md index 56cc50f1..538b682c 100644 --- a/src/GeometricMean/README.md +++ b/src/GeometricMean/README.md @@ -42,12 +42,20 @@ Using the price formula above in Eq. (1), we can solve for $y_0$: $$ \boxed{y_0 = \frac{w_Y}{w_X}S_0 x_0} $$ +From here, we get: +$$ +\boxed{L_0 = x_0^{w_X}y_0^{w_Y}} +$$ ### Given $y$ and price Again, using Eq. (1), we get: $$ \boxed{x_0 = \frac{w_X}{w_Y}\frac{1}{S_0}y_0} $$ +And again: +$$ +\boxed{L_0 = x_0^{w_X}y_0^{w_Y}} +$$ ## Swap We require that the trading function remain invariant when a swap is applied, that is: diff --git a/src/GeometricMean/geometric_mean.nb b/src/GeometricMean/geometric_mean.nb index 73ec28e0..13f9ac95 100644 --- a/src/GeometricMean/geometric_mean.nb +++ b/src/GeometricMean/geometric_mean.nb @@ -10,10 +10,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 161, 7] -NotebookDataLength[ 83159, 2316] -NotebookOptionsPosition[ 75246, 2169] -NotebookOutlinePosition[ 75802, 2188] -CellTagsIndexPosition[ 75759, 2185] +NotebookDataLength[ 84736, 2370] +NotebookOptionsPosition[ 76801, 2221] +NotebookOutlinePosition[ 77360, 2240] +CellTagsIndexPosition[ 77317, 2237] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -45,7 +45,7 @@ Cell[BoxData[ RowBox[{"don", "'"}], "t"}]}], " ", "*)"}]}]], "Code", CellChangeTimes->{{3.9119115610079527`*^9, 3.91191157715276*^9}}, CellLabel-> - "In[813]:=",ExpressionUUID->"90a85ca4-15ef-43a6-a1c9-9ded2b5b4873"], + "In[940]:=",ExpressionUUID->"90a85ca4-15ef-43a6-a1c9-9ded2b5b4873"], Cell[CellGroupData[{ @@ -128,7 +128,7 @@ Cell[BoxData[{ 3.911912447202764*^9}, {3.9119132862667913`*^9, 3.911913339991631*^9}, { 3.911913462657144*^9, 3.9119134680216084`*^9}}, CellLabel-> - "In[814]:=",ExpressionUUID->"7253b091-e52f-418b-a1c8-287d88022e6a"] + "In[945]:=",ExpressionUUID->"7253b091-e52f-418b-a1c8-287d88022e6a"] }, Open ]], Cell[CellGroupData[{ @@ -162,7 +162,7 @@ Cell[BoxData[ CellChangeTimes->{{3.911912501940172*^9, 3.911912546049423*^9}, { 3.911912581390644*^9, 3.911912592262026*^9}}, CellLabel-> - "In[818]:=",ExpressionUUID->"18a899a0-963a-45c4-a7a0-9fbeda760047"] + "In[949]:=",ExpressionUUID->"18a899a0-963a-45c4-a7a0-9fbeda760047"] }, Open ]], Cell[CellGroupData[{ @@ -177,12 +177,17 @@ Cell[BoxData[ RowBox[{"x_", ",", "y_", ",", "L_", ",", "w_"}], "]"}], ":=", RowBox[{ RowBox[{ - SuperscriptBox["x", "w"], - SuperscriptBox["y", - RowBox[{"1", "-", "w"}]]}], "-", "L"}]}]], "Code", - CellChangeTimes->{{3.911912609075673*^9, 3.911912634724598*^9}}, + SuperscriptBox[ + RowBox[{"(", + FractionBox["x", "L"], ")"}], "w"], + SuperscriptBox[ + RowBox[{"(", + FractionBox["y", "L"], ")"}], + RowBox[{"1", "-", "w"}]]}], "-", "1"}]}]], "Code", + CellChangeTimes->{{3.911912609075673*^9, 3.911912634724598*^9}, { + 3.918572627487279*^9, 3.918572655393495*^9}}, CellLabel-> - "In[819]:=",ExpressionUUID->"25e959b2-4561-4b40-a658-c7cf56341acc"] + "In[951]:=",ExpressionUUID->"25e959b2-4561-4b40-a658-c7cf56341acc"] }, Open ]] }, Open ]] }, Open ]], @@ -218,7 +223,7 @@ Cell[BoxData[{ SubscriptBox["\[Gamma]", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", RowBox[{ - FractionBox["1", "2"], ",", "1"}], "}"}]}], ";"}], "\n", + FractionBox["1", "4"], ",", "0.995"}], "}"}]}], ";"}], "\n", RowBox[{"Assert", "[", RowBox[{"0", "<=", SubscriptBox["w", "0"], "<=", "1"}], "]"}], "\n", @@ -238,9 +243,10 @@ Cell[BoxData[{ 3.916758461710663*^9, 3.916758485200482*^9}, {3.9167630696181583`*^9, 3.9167630711333857`*^9}, {3.9168506991445208`*^9, 3.916850699759934*^9}, { 3.917375527833433*^9, 3.917375530306773*^9}, {3.917474535641025*^9, - 3.917474536663909*^9}}, + 3.917474536663909*^9}, {3.918572905622752*^9, 3.918572908365975*^9}, { + 3.918573026581327*^9, 3.918573026707073*^9}}, CellLabel-> - "In[820]:=",ExpressionUUID->"a277fd9d-36f8-4eee-9601-665001bbe972"], + "In[1101]:=",ExpressionUUID->"a277fd9d-36f8-4eee-9601-665001bbe972"], Cell[CellGroupData[{ @@ -248,18 +254,17 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(w\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", - FractionBox["1", "2"]}]], "Echo", + FractionBox["1", "4"]}]], "Echo", CellChangeTimes->{ - 3.917474537220233*^9},ExpressionUUID->"e292a780-3309-44c3-be1d-\ -26b2a20e24a3"], + 3.91857302718543*^9},ExpressionUUID->"cba24bcd-4248-4768-9ccc-38294fdb5805"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Gamma]\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1"}]], "Echo", + "EchoLabel"], " ", "0.995`"}]], "Echo", CellChangeTimes->{ - 3.917474537230825*^9},ExpressionUUID->"b4ef115e-13e6-465e-afa5-\ -f607b00b73a0"] + 3.918573027217659*^9},ExpressionUUID->"9e0f3cc3-161b-4f64-8955-\ +315bd5479577"] }, Open ]] }, Open ]] }, Open ]], @@ -285,7 +290,7 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1", ",", " ", "1"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1000000000", ",", " ", "1"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -301,9 +306,11 @@ Cell[BoxData[{ 3.9167584720251627`*^9, 3.916758473473184*^9}, {3.916763078664383*^9, 3.916763079312771*^9}, {3.916850486059314*^9, 3.916850517153616*^9}, { 3.9173801291544447`*^9, 3.917380133892503*^9}, {3.9173803308316917`*^9, - 3.9173803309348583`*^9}, {3.917474542527548*^9, 3.917474545068673*^9}}, + 3.9173803309348583`*^9}, {3.917474542527548*^9, 3.917474545068673*^9}, { + 3.918572821536396*^9, 3.918572823603607*^9}, {3.9185729104081907`*^9, + 3.918572928566394*^9}, {3.918572999585181*^9, 3.9185730234312067`*^9}}, CellLabel-> - "In[823]:=",ExpressionUUID->"fabf4afc-21e6-47a6-b63d-ba788b915987"], + "In[1104]:=",ExpressionUUID->"fabf4afc-21e6-47a6-b63d-ba788b915987"], Cell[CellGroupData[{ @@ -311,18 +318,18 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial X-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(x\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1"}]], "Echo", + "EchoLabel"], " ", "1000000000"}]], "Echo", CellChangeTimes->{ - 3.917474545509263*^9},ExpressionUUID->"01616c47-d47f-4163-ae7f-\ -1486a28100e4"], + 3.918573028754086*^9},ExpressionUUID->"1d278e94-c651-4137-83e9-\ +d2326c525bcd"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(S\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.917474545542253*^9},ExpressionUUID->"fc434cef-4acc-4e55-bde9-\ -391e8b23b2d8"] + 3.918573028786948*^9},ExpressionUUID->"53c2e4f4-bee6-4c1d-83f6-\ +d3ecd21f40b1"] }, Open ]] }, Open ]], @@ -377,7 +384,7 @@ Cell[BoxData[{ CellChangeTimes->{{3.911912822320621*^9, 3.911912827848645*^9}, { 3.911912883452937*^9, 3.9119128835495768`*^9}}, CellLabel-> - "In[825]:=",ExpressionUUID->"ee083f7c-4161-4e24-8675-42d8b5ffacbe"], + "In[1106]:=",ExpressionUUID->"ee083f7c-4161-4e24-8675-42d8b5ffacbe"], Cell[CellGroupData[{ @@ -385,19 +392,19 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial liquidity is: \\!\\(\\*SubscriptBox[\\(L\\), \ \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1.`18."}]], "Echo", + "EchoLabel"], " ", "2.279507056954777641993563252`18.*^9"}]], "Echo", CellChangeTimes->{ - 3.917474548436577*^9},ExpressionUUID->"47b0b03a-8b5e-49c0-ab03-\ -4782db75c308"], + 3.918573030178784*^9},ExpressionUUID->"6b61905f-d1d8-44b7-9fd3-\ +6efde1eb1d66"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial Y-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(y\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1.`18."}]], "Echo", + "EchoLabel"], " ", "3.`18.*^9"}]], "Echo", CellChangeTimes->{ - 3.9174745484663353`*^9},ExpressionUUID->"dc83f75a-8600-43f2-b1e3-\ -eba4431e2b04"] + 3.918573030212949*^9},ExpressionUUID->"60c82180-6ac4-4f59-bd05-\ +b87827fc82ed"] }, Open ]] }, Open ]] }, Open ]], @@ -432,15 +439,15 @@ Cell[BoxData[{ "\"\\""}], "]"}], ";"}]}], "Code", CellChangeTimes->{{3.911912932500325*^9, 3.911912980651959*^9}}, CellLabel-> - "In[827]:=",ExpressionUUID->"9b2bc5ef-d095-45dd-ac2b-15f02684ac4f"], + "In[1108]:=",ExpressionUUID->"9b2bc5ef-d095-45dd-ac2b-15f02684ac4f"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial price is: P = \"\>", "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.917474552187778*^9},ExpressionUUID->"4a6673d1-2530-4a7d-9666-\ -b22656868b6c"] + 3.918573031739126*^9},ExpressionUUID->"8da8050f-0e99-4100-bd4f-\ +9431d231aafe"] }, Open ]] }, Open ]], @@ -492,7 +499,7 @@ Cell[BoxData[{ CellChangeTimes->{{3.911913388555017*^9, 3.911913437262168*^9}, 3.9119134968996763`*^9}, CellLabel-> - "In[829]:=",ExpressionUUID->"5ace6d65-c46d-491e-a7b3-d364ee7f21fb"] + "In[1110]:=",ExpressionUUID->"5ace6d65-c46d-491e-a7b3-d364ee7f21fb"] }, Open ]] }, Open ]] }, Open ]], @@ -513,21 +520,31 @@ Cell["Now we need to set up the swap logic.", "Subsection", Cell[BoxData[{ RowBox[{ - RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"fees", "[", RowBox[{"\[CapitalDelta]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Gamma]"}], ")"}], "\[CapitalDelta]"}]}], "\n", RowBox[{ RowBox[{ - SubscriptBox["\[Delta]", "Liq"], "[", - RowBox[{"\[CapitalDelta]_", ",", "R_", ",", "L_", ",", "\[Gamma]_"}], + SubscriptBox["\[Delta]", "LiqX"], "[", + RowBox[{ + "\[CapitalDelta]_", ",", "R_", ",", "L_", ",", "w_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", + RowBox[{"w", " ", + RowBox[{"fees", "[", + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], + FractionBox["L", "R"]}]}], "\n", + RowBox[{ RowBox[{ - FractionBox["1", "2"], + SubscriptBox["\[Delta]", "LiqY"], "[", RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", + "\[CapitalDelta]_", ",", "R_", ",", "L_", ",", "w_", ",", "\[Gamma]_"}], + "]"}], " ", ":=", " ", + RowBox[{ + RowBox[{"(", + RowBox[{"1", "-", "w"}], ")"}], " ", + RowBox[{"fees", "[", RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], FractionBox["L", "R"]}]}], "\n", RowBox[{ @@ -542,8 +559,9 @@ Cell[BoxData[{ FractionBox[ RowBox[{"L", "+", RowBox[{ - SubscriptBox["\[Delta]", "Liq"], "[", - RowBox[{"\[CapitalDelta]", ",", "y", ",", "L", ",", "\[Gamma]"}], + SubscriptBox["\[Delta]", "LiqY"], "[", + RowBox[{ + "\[CapitalDelta]", ",", "y", ",", "L", ",", "w", ",", "\[Gamma]"}], "]"}]}], SuperscriptBox[ RowBox[{"(", @@ -562,8 +580,9 @@ Cell[BoxData[{ FractionBox[ RowBox[{"L", "+", RowBox[{ - SubscriptBox["\[Delta]", "Liq"], "[", - RowBox[{"\[CapitalDelta]", ",", "x", ",", "L", ",", "\[Gamma]"}], + SubscriptBox["\[Delta]", "LiqX"], "[", + RowBox[{ + "\[CapitalDelta]", ",", "x", ",", "L", ",", "w", ",", "\[Gamma]"}], "]"}]}], SuperscriptBox[ RowBox[{"(", @@ -581,115 +600,148 @@ Cell[BoxData[{ 3.916750092177647*^9, 3.916750092710829*^9}, {3.917375550285816*^9, 3.917375553361146*^9}, {3.917375646968779*^9, 3.917375651113062*^9}, { 3.9173757221234703`*^9, 3.9173758146366262`*^9}, {3.917380235352436*^9, - 3.917380256042615*^9}, {3.917380371447682*^9, 3.917380373267902*^9}}, + 3.917380256042615*^9}, {3.917380371447682*^9, 3.917380373267902*^9}, { + 3.918572231405321*^9, 3.918572284540254*^9}, {3.918572681943273*^9, + 3.91857268496103*^9}}, CellLabel-> - "In[831]:=",ExpressionUUID->"6c9eba4a-50a0-4c93-b07c-3139817809de"], + "In[1112]:=",ExpressionUUID->"6c9eba4a-50a0-4c93-b07c-3139817809de"], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ - SubscriptBox["\[CapitalDelta]", "X"], "[", - RowBox[{"0.1", ",", - SubscriptBox["x", "0"], ",", - SubscriptBox["y", "0"], ",", - SubscriptBox["L", "0"], ",", - SubscriptBox["w", "0"], ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}], "\n", + RowBox[{"YIn", " ", "=", " ", "1"}], ";"}], "\n", RowBox[{ - RowBox[{"\[CurlyPhi]", "[", + RowBox[{"Echo", "[", RowBox[{ RowBox[{ - SubscriptBox["x", "0"], "+", - RowBox[{ - SubscriptBox["\[CapitalDelta]", "X"], "[", - RowBox[{"0.1", ",", - SubscriptBox["x", "0"], ",", - SubscriptBox["y", "0"], ",", - SubscriptBox["L", "0"], ",", - SubscriptBox["w", "0"], ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ",", - RowBox[{ - SubscriptBox["y", "0"], "+", "0.1"}], ",", - RowBox[{ - SubscriptBox["L", "0"], "+", - RowBox[{ - SubscriptBox["\[Delta]", "Liq"], "[", - RowBox[{"0.1", ",", - SubscriptBox["y", "0"], ",", - SubscriptBox["L", "0"], ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ",", - SubscriptBox["w", "0"]}], "]"}], "\n"}], "\n", + SubscriptBox["\[CapitalDelta]", "X"], "[", + RowBox[{"YIn", ",", + SubscriptBox["x", "0"], ",", + SubscriptBox["y", "0"], ",", + SubscriptBox["L", "0"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}], ",", " ", + "\"\<\!\(\*SubscriptBox[\(\[CapitalDelta]\), \(X\)]\) = \>\""}], "]"}], + ";"}], "\n", RowBox[{ - SubscriptBox["\[CapitalDelta]", "Y"], "[", - RowBox[{"0.1", ",", - SubscriptBox["x", "0"], ",", - SubscriptBox["y", "0"], ",", - SubscriptBox["L", "0"], ",", - SubscriptBox["w", "0"], ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}], "\n", - RowBox[{"\[CurlyPhi]", "[", RowBox[{ + RowBox[{"Echo", "[", + RowBox[{ + RowBox[{"\[CurlyPhi]", "[", + RowBox[{ + RowBox[{ + SubscriptBox["x", "0"], "+", + RowBox[{ + SubscriptBox["\[CapitalDelta]", "X"], "[", + RowBox[{"YIn", ",", + SubscriptBox["x", "0"], ",", + SubscriptBox["y", "0"], ",", + SubscriptBox["L", "0"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ",", + RowBox[{ + SubscriptBox["y", "0"], "+", "YIn"}], ",", + RowBox[{ + SubscriptBox["L", "0"], "+", + RowBox[{ + SubscriptBox["\[Delta]", "LiqY"], "[", + RowBox[{"YIn", ",", + SubscriptBox["y", "0"], ",", + SubscriptBox["L", "0"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ",", + SubscriptBox["w", "0"]}], "]"}], ",", " ", "\"\\""}], + "]"}], ";"}], "\n"}], "\n", + RowBox[{ + RowBox[{"XIn", " ", "=", " ", "1"}], ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", RowBox[{ - SubscriptBox["x", "0"], "+", "0.1"}], ",", - RowBox[{ - SubscriptBox["y", "0"], "+", RowBox[{ SubscriptBox["\[CapitalDelta]", "Y"], "[", - RowBox[{"0.1", ",", + RowBox[{"XIn", ",", SubscriptBox["x", "0"], ",", SubscriptBox["y", "0"], ",", SubscriptBox["L", "0"], ",", SubscriptBox["w", "0"], ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}], ",", " ", + "\"\<\!\(\*SubscriptBox[\(\[CapitalDelta]\), \(Y\)]\) = \>\""}], "]"}], + ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", RowBox[{ - SubscriptBox["L", "0"], "+", - RowBox[{ - SubscriptBox["\[Delta]", "Liq"], "[", - RowBox[{"0.1", ",", - SubscriptBox["x", "0"], ",", - SubscriptBox["L", "0"], ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ",", - SubscriptBox["w", "0"]}], "]"}]}], "Code", + RowBox[{"\[CurlyPhi]", "[", + RowBox[{ + RowBox[{ + SubscriptBox["x", "0"], "+", "XIn"}], ",", + RowBox[{ + SubscriptBox["y", "0"], "+", + RowBox[{ + SubscriptBox["\[CapitalDelta]", "Y"], "[", + RowBox[{"XIn", ",", + SubscriptBox["x", "0"], ",", + SubscriptBox["y", "0"], ",", + SubscriptBox["L", "0"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ",", + RowBox[{ + SubscriptBox["L", "0"], "+", + RowBox[{ + SubscriptBox["\[Delta]", "LiqX"], "[", + RowBox[{"XIn", ",", + SubscriptBox["x", "0"], ",", + SubscriptBox["L", "0"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ",", + SubscriptBox["w", "0"]}], "]"}], ",", " ", "\"\\""}], + "]"}], ";"}]}], "Code", CellChangeTimes->{{3.9173801538368683`*^9, 3.917380182502496*^9}, { 3.917380406138091*^9, 3.917380427451881*^9}, {3.917382817211936*^9, - 3.917382944892488*^9}, {3.917474578659257*^9, 3.917474580665434*^9}}, + 3.917382944892488*^9}, {3.917474578659257*^9, 3.917474580665434*^9}, { + 3.918572295967634*^9, 3.918572371350017*^9}, {3.9185727421179123`*^9, + 3.918572807871854*^9}, {3.918572860607503*^9, 3.918572860836522*^9}, { + 3.91857320247493*^9, 3.9185732282521553`*^9}}, CellLabel-> - "In[835]:=",ExpressionUUID->"57d57c6e-b361-4057-8fe3-86b50c9464e4"], + "In[1129]:=",ExpressionUUID->"57d57c6e-b361-4057-8fe3-86b50c9464e4"], + +Cell[CellGroupData[{ Cell[BoxData[ - RowBox[{"-", "0.09090909090909105`"}]], "Output", + RowBox[{ + TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[CapitalDelta]\\), \\(X\\)]\\) = \"\>", + "EchoLabel"], " ", + RowBox[{"-", "0.9949992895126343`"}]}]], "Echo", CellChangeTimes->{ - 3.917380183658939*^9, 3.917380259953665*^9, 3.917380340546103*^9, { - 3.917380375623798*^9, 3.917380379003302*^9}, 3.9173804285014133`*^9, { - 3.9173829183952293`*^9, 3.917382946517559*^9}, 3.917474557013838*^9}, - CellLabel-> - "Out[835]=",ExpressionUUID->"705276af-d995-4ce0-b354-84831b308d2d"], + 3.918573228616233*^9},ExpressionUUID->"d6a8b04d-c910-4e7c-8f79-\ +81235e5e6791"], -Cell[BoxData["0.`"], "Output", +Cell[BoxData[ + RowBox[{ + TagBox["\<\"Validation = \"\>", + "EchoLabel"], " ", "0.`"}]], "Echo", CellChangeTimes->{ - 3.917380183658939*^9, 3.917380259953665*^9, 3.917380340546103*^9, { - 3.917380375623798*^9, 3.917380379003302*^9}, 3.9173804285014133`*^9, { - 3.9173829183952293`*^9, 3.917382946517559*^9}, 3.917474557016643*^9}, - CellLabel-> - "Out[836]=",ExpressionUUID->"2110b4c3-3d24-4487-ab7a-315bad605229"], + 3.918573228655465*^9},ExpressionUUID->"09c97b17-eeb7-4aae-8224-\ +5c0f9cf5bcc9"], Cell[BoxData[ - RowBox[{"-", "0.09090909090909105`"}]], "Output", + RowBox[{ + TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[CapitalDelta]\\), \\(Y\\)]\\) = \"\>", + "EchoLabel"], " ", + RowBox[{"-", "0.9950032234191895`"}]}]], "Echo", CellChangeTimes->{ - 3.917380183658939*^9, 3.917380259953665*^9, 3.917380340546103*^9, { - 3.917380375623798*^9, 3.917380379003302*^9}, 3.9173804285014133`*^9, { - 3.9173829183952293`*^9, 3.917382946517559*^9}, 3.91747455701805*^9}, - CellLabel-> - "Out[837]=",ExpressionUUID->"da9c9147-ed0c-4928-9879-cb5907e8605b"], + 3.918573228665968*^9},ExpressionUUID->"3bf155be-f9be-4302-8853-\ +4b7a88743fbb"], -Cell[BoxData["0.`"], "Output", +Cell[BoxData[ + RowBox[{ + TagBox["\<\"Validation = \"\>", + "EchoLabel"], " ", + RowBox[{"-", "8.881784197001252`*^-16"}]}]], "Echo", CellChangeTimes->{ - 3.917380183658939*^9, 3.917380259953665*^9, 3.917380340546103*^9, { - 3.917380375623798*^9, 3.917380379003302*^9}, 3.9173804285014133`*^9, { - 3.9173829183952293`*^9, 3.917382946517559*^9}, 3.917474557019392*^9}, - CellLabel-> - "Out[838]=",ExpressionUUID->"318c935c-af9d-45ae-996b-68e575a47d69"] + 3.9185732286931057`*^9},ExpressionUUID->"18159b0c-f093-45a2-b773-\ +84a61f12b297"] +}, Open ]] }, Open ]] }, Open ]] }, Open ]], @@ -2167,8 +2219,8 @@ Cell[BoxData[ }, Open ]] }, Open ]] }, -WindowSize->{992, 1233}, -WindowMargins->{{Automatic, 12}, {-819, Automatic}}, +WindowSize->{1491, 2083}, +WindowMargins->{{Automatic, 1514}, {Automatic, -819}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, FrontEndVersion->"13.2 for Mac OS X ARM (64-bit) (January 31, 2023)", @@ -2188,7 +2240,7 @@ CellTagsIndex->{} (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ -Cell[583, 22, 189, 3, 238, "Title",ExpressionUUID->"464b00f2-edbc-4299-9ebc-bbbbadc48e36"], +Cell[583, 22, 189, 3, 146, "Title",ExpressionUUID->"464b00f2-edbc-4299-9ebc-bbbbadc48e36"], Cell[CellGroupData[{ Cell[797, 29, 177, 3, 101, "Section",ExpressionUUID->"7647c4f8-4fe4-4b60-9236-0948b016bc8d"], Cell[977, 34, 531, 13, 54, "Code",ExpressionUUID->"90a85ca4-15ef-43a6-a1c9-9ded2b5b4873"], @@ -2200,119 +2252,121 @@ Cell[1995, 65, 644, 20, 50, "Text",ExpressionUUID->"9a6a4459-0d52-4b73-811d-1f5b Cell[2642, 87, 1453, 43, 230, "Code",ExpressionUUID->"7253b091-e52f-418b-a1c8-287d88022e6a"] }, Open ]], Cell[CellGroupData[{ -Cell[4132, 135, 558, 16, 107, "Subsubsection",ExpressionUUID->"c79752c3-b802-42fd-9612-2c9ed31365e8"], +Cell[4132, 135, 558, 16, 68, "Subsubsection",ExpressionUUID->"c79752c3-b802-42fd-9612-2c9ed31365e8"], Cell[4693, 153, 399, 11, 68, "Code",ExpressionUUID->"18a899a0-963a-45c4-a7a0-9fbeda760047"] }, Open ]], Cell[CellGroupData[{ Cell[5129, 169, 182, 2, 67, "Subsubsection",ExpressionUUID->"ccc19f67-4212-4173-8f38-591d9c869a78"], -Cell[5314, 173, 404, 11, 54, "Code",ExpressionUUID->"25e959b2-4561-4b40-a658-c7cf56341acc"] +Cell[5314, 173, 555, 16, 68, "Code",ExpressionUUID->"25e959b2-4561-4b40-a658-c7cf56341acc"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[5779, 191, 237, 6, 158, "Section",ExpressionUUID->"8ecbbf5d-d7c2-4753-8dae-ccd81d3ed5db"], +Cell[5930, 196, 237, 6, 101, "Section",ExpressionUUID->"8ecbbf5d-d7c2-4753-8dae-ccd81d3ed5db"], Cell[CellGroupData[{ -Cell[6041, 201, 257, 6, 122, "Subsection",ExpressionUUID->"3778290c-33c8-4669-bd57-a54efc82c76a"], +Cell[6192, 206, 257, 6, 81, "Subsection",ExpressionUUID->"3778290c-33c8-4669-bd57-a54efc82c76a"], Cell[CellGroupData[{ -Cell[6323, 211, 1232, 31, 136, "Code",ExpressionUUID->"a277fd9d-36f8-4eee-9601-665001bbe972"], +Cell[6474, 216, 1332, 32, 136, "Code",ExpressionUUID->"a277fd9d-36f8-4eee-9601-665001bbe972"], Cell[CellGroupData[{ -Cell[7580, 246, 251, 7, 53, "Echo",ExpressionUUID->"e292a780-3309-44c3-be1d-26b2a20e24a3"], -Cell[7834, 255, 237, 6, 38, "Echo",ExpressionUUID->"b4ef115e-13e6-465e-afa5-f607b00b73a0"] +Cell[7831, 252, 248, 6, 53, "Echo",ExpressionUUID->"cba24bcd-4248-4768-9ccc-38294fdb5805"], +Cell[8082, 260, 242, 6, 38, "Echo",ExpressionUUID->"9e0f3cc3-161b-4f64-8955-315bd5479577"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[8132, 268, 254, 6, 122, "Subsection",ExpressionUUID->"0e4b0b5f-de16-4a42-af35-cb7f8c5a845c"], +Cell[8385, 273, 254, 6, 81, "Subsection",ExpressionUUID->"0e4b0b5f-de16-4a42-af35-cb7f8c5a845c"], Cell[CellGroupData[{ -Cell[8411, 278, 1047, 27, 86, "Code",ExpressionUUID->"fabf4afc-21e6-47a6-b63d-ba788b915987"], +Cell[8664, 283, 1205, 29, 86, "Code",ExpressionUUID->"fabf4afc-21e6-47a6-b63d-ba788b915987"], Cell[CellGroupData[{ -Cell[9483, 309, 266, 7, 38, "Echo",ExpressionUUID->"01616c47-d47f-4163-ae7f-1486a28100e4"], -Cell[9752, 318, 230, 6, 38, "Echo",ExpressionUUID->"fc434cef-4acc-4e55-bde9-391e8b23b2d8"] +Cell[9894, 316, 275, 7, 38, "Echo",ExpressionUUID->"1d278e94-c651-4137-83e9-d2326c525bcd"], +Cell[10172, 325, 230, 6, 38, "Echo",ExpressionUUID->"53c2e4f4-bee6-4c1d-83f6-d3ecd21f40b1"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[10031, 330, 250, 6, 67, "Subsubsection",ExpressionUUID->"d14796ee-6661-403b-a067-2e1c5a6c6211"], +Cell[10451, 337, 250, 6, 67, "Subsubsection",ExpressionUUID->"d14796ee-6661-403b-a067-2e1c5a6c6211"], Cell[CellGroupData[{ -Cell[10306, 340, 1297, 39, 86, "Code",ExpressionUUID->"ee083f7c-4161-4e24-8675-42d8b5ffacbe"], +Cell[10726, 347, 1298, 39, 86, "Code",ExpressionUUID->"ee083f7c-4161-4e24-8675-42d8b5ffacbe"], Cell[CellGroupData[{ -Cell[11628, 383, 263, 7, 38, "Echo",ExpressionUUID->"47b0b03a-8b5e-49c0-ab03-4782db75c308"], -Cell[11894, 392, 273, 7, 38, "Echo",ExpressionUUID->"dc83f75a-8600-43f2-b1e3-eba4431e2b04"] +Cell[12049, 390, 293, 7, 38, "Echo",ExpressionUUID->"6b61905f-d1d8-44b7-9fd3-6efde1eb1d66"], +Cell[12345, 399, 274, 7, 38, "Echo",ExpressionUUID->"60c82180-6ac4-4f59-bd05-b87827fc82ed"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[12228, 406, 225, 4, 67, "Subsubsection",ExpressionUUID->"0a95fd1e-5759-46f5-b752-6b4f74d4268c"], +Cell[12680, 413, 225, 4, 67, "Subsubsection",ExpressionUUID->"0a95fd1e-5759-46f5-b752-6b4f74d4268c"], Cell[CellGroupData[{ -Cell[12478, 414, 675, 20, 86, "Code",ExpressionUUID->"9b2bc5ef-d095-45dd-ac2b-15f02684ac4f"], -Cell[13156, 436, 211, 6, 38, "Echo",ExpressionUUID->"4a6673d1-2530-4a7d-9666-b22656868b6c"] +Cell[12930, 421, 676, 20, 86, "Code",ExpressionUUID->"9b2bc5ef-d095-45dd-ac2b-15f02684ac4f"], +Cell[13609, 443, 211, 6, 38, "Echo",ExpressionUUID->"8da8050f-0e99-4100-bd4f-9431d231aafe"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[13416, 448, 280, 6, 106, "Subsubsection",ExpressionUUID->"f59add3e-9736-413f-b760-d953f4b2de71"], -Cell[13699, 456, 1145, 38, 98, "Code",ExpressionUUID->"5ace6d65-c46d-491e-a7b3-d364ee7f21fb"] +Cell[13869, 455, 280, 6, 67, "Subsubsection",ExpressionUUID->"f59add3e-9736-413f-b760-d953f4b2de71"], +Cell[14152, 463, 1146, 38, 98, "Code",ExpressionUUID->"5ace6d65-c46d-491e-a7b3-d364ee7f21fb"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[14905, 501, 153, 3, 101, "Section",ExpressionUUID->"0aa1aa4a-a222-4348-9a33-bdcf246c0ec1"], +Cell[15359, 508, 153, 3, 101, "Section",ExpressionUUID->"0aa1aa4a-a222-4348-9a33-bdcf246c0ec1"], +Cell[CellGroupData[{ +Cell[15537, 515, 208, 3, 81, "Subsection",ExpressionUUID->"a09de9d8-3ec0-4d13-8819-089fc369fa6e"], +Cell[15748, 520, 3283, 86, 294, "Code",ExpressionUUID->"6c9eba4a-50a0-4c93-b07c-3139817809de"], Cell[CellGroupData[{ -Cell[15083, 508, 208, 3, 81, "Subsection",ExpressionUUID->"a09de9d8-3ec0-4d13-8819-089fc369fa6e"], -Cell[15294, 513, 2831, 72, 242, "Code",ExpressionUUID->"6c9eba4a-50a0-4c93-b07c-3139817809de"], +Cell[19056, 610, 3419, 95, 245, "Code",ExpressionUUID->"57d57c6e-b361-4057-8fe3-86b50c9464e4"], Cell[CellGroupData[{ -Cell[18150, 589, 2337, 68, 183, "Code",ExpressionUUID->"57d57c6e-b361-4057-8fe3-86b50c9464e4"], -Cell[20490, 659, 384, 7, 40, "Output",ExpressionUUID->"705276af-d995-4ce0-b354-84831b308d2d"], -Cell[20877, 668, 350, 6, 40, "Output",ExpressionUUID->"2110b4c3-3d24-4487-ab7a-315bad605229"], -Cell[21230, 676, 383, 7, 40, "Output",ExpressionUUID->"da9c9147-ed0c-4928-9879-cb5907e8605b"], -Cell[21616, 685, 350, 6, 40, "Output",ExpressionUUID->"318c935c-af9d-45ae-996b-68e575a47d69"] +Cell[22500, 709, 280, 7, 38, "Echo",ExpressionUUID->"d6a8b04d-c910-4e7c-8f79-81235e5e6791"], +Cell[22783, 718, 200, 6, 38, "Echo",ExpressionUUID->"09c97b17-eeb7-4aae-8224-5c0f9cf5bcc9"], +Cell[22986, 726, 280, 7, 38, "Echo",ExpressionUUID->"3bf155be-f9be-4302-8853-4b7a88743fbb"], +Cell[23269, 735, 240, 7, 38, "Echo",ExpressionUUID->"18159b0c-f093-45a2-b773-84a61f12b297"] +}, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[22027, 698, 156, 3, 101, "Section",ExpressionUUID->"2af33c95-75fa-4c2a-987e-0c0efa8a1771"], -Cell[22186, 703, 515, 12, 111, "Text",ExpressionUUID->"72430652-d39e-479e-8fb5-8c2568d7c943"], +Cell[23582, 750, 156, 3, 101, "Section",ExpressionUUID->"2af33c95-75fa-4c2a-987e-0c0efa8a1771"], +Cell[23741, 755, 515, 12, 81, "Text",ExpressionUUID->"72430652-d39e-479e-8fb5-8c2568d7c943"], Cell[CellGroupData[{ -Cell[22726, 719, 537, 14, 108, "Subsubsection",ExpressionUUID->"a8656622-88c3-4ada-82e5-d33556722b56"], -Cell[23266, 735, 517, 17, 107, "Code",ExpressionUUID->"8864b3f3-1b36-4dcd-99b8-7a357f5a3a30"] +Cell[24281, 771, 537, 14, 68, "Subsubsection",ExpressionUUID->"a8656622-88c3-4ada-82e5-d33556722b56"], +Cell[24821, 787, 517, 17, 107, "Code",ExpressionUUID->"8864b3f3-1b36-4dcd-99b8-7a357f5a3a30"] }, Open ]], Cell[CellGroupData[{ -Cell[23820, 757, 171, 3, 81, "Subsection",ExpressionUUID->"f9739415-ba82-4653-b842-33b37c1cd286"], +Cell[25375, 809, 171, 3, 81, "Subsection",ExpressionUUID->"f9739415-ba82-4653-b842-33b37c1cd286"], Cell[CellGroupData[{ -Cell[24016, 764, 400, 11, 107, "Subsubsection",ExpressionUUID->"905228e2-efe5-43aa-9780-0b193149ea3d"], +Cell[25571, 816, 400, 11, 68, "Subsubsection",ExpressionUUID->"905228e2-efe5-43aa-9780-0b193149ea3d"], Cell[CellGroupData[{ -Cell[24441, 779, 12280, 363, 721, "Code",ExpressionUUID->"1a8d1d1f-d7f4-4461-a836-4d4571ea6392"], -Cell[36724, 1144, 7205, 138, 337, "Output",ExpressionUUID->"986f7163-cf03-4de4-b998-9538f3a4c8bc"], +Cell[25996, 831, 12280, 363, 721, "Code",ExpressionUUID->"1a8d1d1f-d7f4-4461-a836-4d4571ea6392"], +Cell[38279, 1196, 7205, 138, 337, "Output",ExpressionUUID->"986f7163-cf03-4de4-b998-9538f3a4c8bc"], Cell[CellGroupData[{ -Cell[43954, 1286, 300, 6, 38, "Echo",ExpressionUUID->"6394a97c-351e-437d-8c02-9b0642aacf09"], -Cell[44257, 1294, 302, 8, 38, "Echo",ExpressionUUID->"5e6b589a-5de5-4f17-9268-a35f46b410b1"], -Cell[44562, 1304, 392, 10, 38, "Echo",ExpressionUUID->"957d146b-e63f-416f-a7cb-8c6b69727396"], -Cell[44957, 1316, 279, 7, 38, "Echo",ExpressionUUID->"a6375d85-fb17-4296-9761-db2b17a953c6"], -Cell[45239, 1325, 236, 5, 38, "Echo",ExpressionUUID->"ea158521-8811-4328-bda0-60677eb48800"], -Cell[45478, 1332, 3029, 98, 201, "Echo",ExpressionUUID->"4c5f61bd-03b7-4432-a272-0f26503b2dfb"] +Cell[45509, 1338, 300, 6, 38, "Echo",ExpressionUUID->"6394a97c-351e-437d-8c02-9b0642aacf09"], +Cell[45812, 1346, 302, 8, 38, "Echo",ExpressionUUID->"5e6b589a-5de5-4f17-9268-a35f46b410b1"], +Cell[46117, 1356, 392, 10, 38, "Echo",ExpressionUUID->"957d146b-e63f-416f-a7cb-8c6b69727396"], +Cell[46512, 1368, 279, 7, 38, "Echo",ExpressionUUID->"a6375d85-fb17-4296-9761-db2b17a953c6"], +Cell[46794, 1377, 236, 5, 38, "Echo",ExpressionUUID->"ea158521-8811-4328-bda0-60677eb48800"], +Cell[47033, 1384, 3029, 98, 178, "Echo",ExpressionUUID->"4c5f61bd-03b7-4432-a272-0f26503b2dfb"] }, Open ]], -Cell[48522, 1433, 384, 7, 40, "Output",ExpressionUUID->"a1f818a7-7515-42f6-8412-5023424e7584"], -Cell[48909, 1442, 364, 6, 40, "Output",ExpressionUUID->"53eae298-6178-4ff5-afd7-6d8d8a6d15d1"], -Cell[49276, 1450, 363, 6, 40, "Output",ExpressionUUID->"8a5a30f2-553b-4cde-86b0-6f924840169e"] +Cell[50077, 1485, 384, 7, 40, "Output",ExpressionUUID->"a1f818a7-7515-42f6-8412-5023424e7584"], +Cell[50464, 1494, 364, 6, 40, "Output",ExpressionUUID->"53eae298-6178-4ff5-afd7-6d8d8a6d15d1"], +Cell[50831, 1502, 363, 6, 40, "Output",ExpressionUUID->"8a5a30f2-553b-4cde-86b0-6f924840169e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[49700, 1463, 171, 3, 81, "Subsection",ExpressionUUID->"f642d822-e56a-4daf-87b3-4a7c12588060"], +Cell[51255, 1515, 171, 3, 81, "Subsection",ExpressionUUID->"f642d822-e56a-4daf-87b3-4a7c12588060"], Cell[CellGroupData[{ -Cell[49896, 1470, 377, 10, 68, "Subsubsection",ExpressionUUID->"53a95604-bde4-406e-8c5f-f440053636d6"], +Cell[51451, 1522, 377, 10, 68, "Subsubsection",ExpressionUUID->"53a95604-bde4-406e-8c5f-f440053636d6"], Cell[CellGroupData[{ -Cell[50298, 1484, 13806, 417, 879, "Code",ExpressionUUID->"7a15b2a1-0c7b-4080-9632-dc9021620919"], -Cell[64107, 1903, 7344, 140, 330, "Output",ExpressionUUID->"f6e93834-5111-4db5-8c3e-43dda9b8a147"], +Cell[51853, 1536, 13806, 417, 879, "Code",ExpressionUUID->"7a15b2a1-0c7b-4080-9632-dc9021620919"], +Cell[65662, 1955, 7344, 140, 330, "Output",ExpressionUUID->"f6e93834-5111-4db5-8c3e-43dda9b8a147"], Cell[CellGroupData[{ -Cell[71476, 2047, 304, 7, 38, "Echo",ExpressionUUID->"8ac1734a-e0db-4cdb-81dc-2aa139ec630e"], -Cell[71783, 2056, 304, 8, 38, "Echo",ExpressionUUID->"cef205b4-24c5-4b42-84f6-3911caee3c22"], -Cell[72090, 2066, 394, 10, 38, "Echo",ExpressionUUID->"7b57ec96-1204-4b48-b343-3a8cb80fbd77"], -Cell[72487, 2078, 279, 7, 38, "Echo",ExpressionUUID->"9c3d0530-4afa-4a50-a712-9da4101925ad"], -Cell[72769, 2087, 241, 6, 38, "Echo",ExpressionUUID->"40d8d1a6-b0d6-46a6-b818-6eaf5ee08fcd"], -Cell[73013, 2095, 1291, 43, 86, "Echo",ExpressionUUID->"ed0c361d-6c42-46c2-a90d-f49fa0612c9c"] +Cell[73031, 2099, 304, 7, 38, "Echo",ExpressionUUID->"8ac1734a-e0db-4cdb-81dc-2aa139ec630e"], +Cell[73338, 2108, 304, 8, 38, "Echo",ExpressionUUID->"cef205b4-24c5-4b42-84f6-3911caee3c22"], +Cell[73645, 2118, 394, 10, 38, "Echo",ExpressionUUID->"7b57ec96-1204-4b48-b343-3a8cb80fbd77"], +Cell[74042, 2130, 279, 7, 38, "Echo",ExpressionUUID->"9c3d0530-4afa-4a50-a712-9da4101925ad"], +Cell[74324, 2139, 241, 6, 38, "Echo",ExpressionUUID->"40d8d1a6-b0d6-46a6-b818-6eaf5ee08fcd"], +Cell[74568, 2147, 1291, 43, 86, "Echo",ExpressionUUID->"ed0c361d-6c42-46c2-a90d-f49fa0612c9c"] }, Open ]], -Cell[74319, 2141, 292, 6, 40, "Output",ExpressionUUID->"7cf2cd9d-1ff3-448c-8907-80dcc7585b4c"], -Cell[74614, 2149, 276, 5, 40, "Output",ExpressionUUID->"a16d71b5-1eb7-4c52-831c-1c470734a16a"], -Cell[74893, 2156, 289, 6, 40, "Output",ExpressionUUID->"ae67615f-9200-4a1b-b127-1e6135b099df"] +Cell[75874, 2193, 292, 6, 40, "Output",ExpressionUUID->"7cf2cd9d-1ff3-448c-8907-80dcc7585b4c"], +Cell[76169, 2201, 276, 5, 40, "Output",ExpressionUUID->"a16d71b5-1eb7-4c52-831c-1c470734a16a"], +Cell[76448, 2208, 289, 6, 40, "Output",ExpressionUUID->"ae67615f-9200-4a1b-b127-1e6135b099df"] }, Open ]] }, Open ]] }, Open ]] From 4dcd1c4cd5bc8fe490606d925f98f3b773ba5fe2 Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 4 Mar 2024 14:13:51 -0700 Subject: [PATCH 03/13] Update geometric_mean.nb --- src/GeometricMean/geometric_mean.nb | 128 ++++++++++++++-------------- 1 file changed, 66 insertions(+), 62 deletions(-) diff --git a/src/GeometricMean/geometric_mean.nb b/src/GeometricMean/geometric_mean.nb index 13f9ac95..3285011a 100644 --- a/src/GeometricMean/geometric_mean.nb +++ b/src/GeometricMean/geometric_mean.nb @@ -10,10 +10,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 161, 7] -NotebookDataLength[ 84736, 2370] -NotebookOptionsPosition[ 76801, 2221] -NotebookOutlinePosition[ 77360, 2240] -CellTagsIndexPosition[ 77317, 2237] +NotebookDataLength[ 84997, 2374] +NotebookOptionsPosition[ 77062, 2225] +NotebookOutlinePosition[ 77621, 2244] +CellTagsIndexPosition[ 77578, 2241] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -602,9 +602,11 @@ Cell[BoxData[{ 3.9173757221234703`*^9, 3.9173758146366262`*^9}, {3.917380235352436*^9, 3.917380256042615*^9}, {3.917380371447682*^9, 3.917380373267902*^9}, { 3.918572231405321*^9, 3.918572284540254*^9}, {3.918572681943273*^9, - 3.91857268496103*^9}}, + 3.91857268496103*^9}, {3.918575228425824*^9, 3.918575248534638*^9}, { + 3.9185752845411987`*^9, 3.9185752961950283`*^9}, 3.918575371410864*^9, { + 3.918575477141179*^9, 3.918575510485251*^9}}, CellLabel-> - "In[1112]:=",ExpressionUUID->"6c9eba4a-50a0-4c93-b07c-3139817809de"], + "In[1163]:=",ExpressionUUID->"6c9eba4a-50a0-4c93-b07c-3139817809de"], Cell[CellGroupData[{ @@ -614,14 +616,15 @@ Cell[BoxData[{ RowBox[{ RowBox[{"Echo", "[", RowBox[{ - RowBox[{ - SubscriptBox["\[CapitalDelta]", "X"], "[", - RowBox[{"YIn", ",", - SubscriptBox["x", "0"], ",", - SubscriptBox["y", "0"], ",", - SubscriptBox["L", "0"], ",", - SubscriptBox["w", "0"], ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}], ",", " ", + RowBox[{"N", "[", + RowBox[{ + SubscriptBox["\[CapitalDelta]", "X"], "[", + RowBox[{"YIn", ",", + SubscriptBox["x", "0"], ",", + SubscriptBox["y", "0"], ",", + SubscriptBox["L", "0"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}], "]"}], ",", " ", "\"\<\!\(\*SubscriptBox[\(\[CapitalDelta]\), \(X\)]\) = \>\""}], "]"}], ";"}], "\n", RowBox[{ @@ -701,9 +704,10 @@ Cell[BoxData[{ 3.917382944892488*^9}, {3.917474578659257*^9, 3.917474580665434*^9}, { 3.918572295967634*^9, 3.918572371350017*^9}, {3.9185727421179123`*^9, 3.918572807871854*^9}, {3.918572860607503*^9, 3.918572860836522*^9}, { - 3.91857320247493*^9, 3.9185732282521553`*^9}}, + 3.91857320247493*^9, 3.9185732282521553`*^9}, {3.918575432420752*^9, + 3.918575435715103*^9}}, CellLabel-> - "In[1129]:=",ExpressionUUID->"57d57c6e-b361-4057-8fe3-86b50c9464e4"], + "In[1168]:=",ExpressionUUID->"57d57c6e-b361-4057-8fe3-86b50c9464e4"], Cell[CellGroupData[{ @@ -713,16 +717,16 @@ Cell[BoxData[ "EchoLabel"], " ", RowBox[{"-", "0.9949992895126343`"}]}]], "Echo", CellChangeTimes->{ - 3.918573228616233*^9},ExpressionUUID->"d6a8b04d-c910-4e7c-8f79-\ -81235e5e6791"], + 3.9185755125952473`*^9},ExpressionUUID->"075b0db1-54f8-4fe5-824d-\ +678cfdca59bb"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", "EchoLabel"], " ", "0.`"}]], "Echo", CellChangeTimes->{ - 3.918573228655465*^9},ExpressionUUID->"09c97b17-eeb7-4aae-8224-\ -5c0f9cf5bcc9"], + 3.918575512631504*^9},ExpressionUUID->"c63ebd0b-561e-4e36-95c8-\ +952ff058d8ac"], Cell[BoxData[ RowBox[{ @@ -730,8 +734,8 @@ Cell[BoxData[ "EchoLabel"], " ", RowBox[{"-", "0.9950032234191895`"}]}]], "Echo", CellChangeTimes->{ - 3.918573228665968*^9},ExpressionUUID->"3bf155be-f9be-4302-8853-\ -4b7a88743fbb"], + 3.918575512639958*^9},ExpressionUUID->"542a0d11-9ce8-4cd4-8e8a-\ +80ba04570b3b"], Cell[BoxData[ RowBox[{ @@ -739,8 +743,8 @@ Cell[BoxData[ "EchoLabel"], " ", RowBox[{"-", "8.881784197001252`*^-16"}]}]], "Echo", CellChangeTimes->{ - 3.9185732286931057`*^9},ExpressionUUID->"18159b0c-f093-45a2-b773-\ -84a61f12b297"] + 3.9185755126641893`*^9},ExpressionUUID->"9a8696eb-4c30-4aa5-a12f-\ +0cb440faf8c1"] }, Open ]] }, Open ]] }, Open ]] @@ -2219,8 +2223,8 @@ Cell[BoxData[ }, Open ]] }, Open ]] }, -WindowSize->{1491, 2083}, -WindowMargins->{{Automatic, 1514}, {Automatic, -819}}, +WindowSize->{1651, 2083}, +WindowMargins->{{Automatic, 1674}, {Automatic, -819}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, FrontEndVersion->"13.2 for Mac OS X ARM (64-bit) (January 31, 2023)", @@ -2309,64 +2313,64 @@ Cell[CellGroupData[{ Cell[15359, 508, 153, 3, 101, "Section",ExpressionUUID->"0aa1aa4a-a222-4348-9a33-bdcf246c0ec1"], Cell[CellGroupData[{ Cell[15537, 515, 208, 3, 81, "Subsection",ExpressionUUID->"a09de9d8-3ec0-4d13-8819-089fc369fa6e"], -Cell[15748, 520, 3283, 86, 294, "Code",ExpressionUUID->"6c9eba4a-50a0-4c93-b07c-3139817809de"], +Cell[15748, 520, 3455, 88, 294, "Code",ExpressionUUID->"6c9eba4a-50a0-4c93-b07c-3139817809de"], Cell[CellGroupData[{ -Cell[19056, 610, 3419, 95, 245, "Code",ExpressionUUID->"57d57c6e-b361-4057-8fe3-86b50c9464e4"], +Cell[19228, 612, 3506, 97, 245, "Code",ExpressionUUID->"57d57c6e-b361-4057-8fe3-86b50c9464e4"], Cell[CellGroupData[{ -Cell[22500, 709, 280, 7, 38, "Echo",ExpressionUUID->"d6a8b04d-c910-4e7c-8f79-81235e5e6791"], -Cell[22783, 718, 200, 6, 38, "Echo",ExpressionUUID->"09c97b17-eeb7-4aae-8224-5c0f9cf5bcc9"], -Cell[22986, 726, 280, 7, 38, "Echo",ExpressionUUID->"3bf155be-f9be-4302-8853-4b7a88743fbb"], -Cell[23269, 735, 240, 7, 38, "Echo",ExpressionUUID->"18159b0c-f093-45a2-b773-84a61f12b297"] +Cell[22759, 713, 282, 7, 38, "Echo",ExpressionUUID->"075b0db1-54f8-4fe5-824d-678cfdca59bb"], +Cell[23044, 722, 200, 6, 38, "Echo",ExpressionUUID->"c63ebd0b-561e-4e36-95c8-952ff058d8ac"], +Cell[23247, 730, 280, 7, 38, "Echo",ExpressionUUID->"542a0d11-9ce8-4cd4-8e8a-80ba04570b3b"], +Cell[23530, 739, 240, 7, 38, "Echo",ExpressionUUID->"9a8696eb-4c30-4aa5-a12f-0cb440faf8c1"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[23582, 750, 156, 3, 101, "Section",ExpressionUUID->"2af33c95-75fa-4c2a-987e-0c0efa8a1771"], -Cell[23741, 755, 515, 12, 81, "Text",ExpressionUUID->"72430652-d39e-479e-8fb5-8c2568d7c943"], +Cell[23843, 754, 156, 3, 101, "Section",ExpressionUUID->"2af33c95-75fa-4c2a-987e-0c0efa8a1771"], +Cell[24002, 759, 515, 12, 81, "Text",ExpressionUUID->"72430652-d39e-479e-8fb5-8c2568d7c943"], Cell[CellGroupData[{ -Cell[24281, 771, 537, 14, 68, "Subsubsection",ExpressionUUID->"a8656622-88c3-4ada-82e5-d33556722b56"], -Cell[24821, 787, 517, 17, 107, "Code",ExpressionUUID->"8864b3f3-1b36-4dcd-99b8-7a357f5a3a30"] +Cell[24542, 775, 537, 14, 68, "Subsubsection",ExpressionUUID->"a8656622-88c3-4ada-82e5-d33556722b56"], +Cell[25082, 791, 517, 17, 107, "Code",ExpressionUUID->"8864b3f3-1b36-4dcd-99b8-7a357f5a3a30"] }, Open ]], Cell[CellGroupData[{ -Cell[25375, 809, 171, 3, 81, "Subsection",ExpressionUUID->"f9739415-ba82-4653-b842-33b37c1cd286"], +Cell[25636, 813, 171, 3, 81, "Subsection",ExpressionUUID->"f9739415-ba82-4653-b842-33b37c1cd286"], Cell[CellGroupData[{ -Cell[25571, 816, 400, 11, 68, "Subsubsection",ExpressionUUID->"905228e2-efe5-43aa-9780-0b193149ea3d"], +Cell[25832, 820, 400, 11, 68, "Subsubsection",ExpressionUUID->"905228e2-efe5-43aa-9780-0b193149ea3d"], Cell[CellGroupData[{ -Cell[25996, 831, 12280, 363, 721, "Code",ExpressionUUID->"1a8d1d1f-d7f4-4461-a836-4d4571ea6392"], -Cell[38279, 1196, 7205, 138, 337, "Output",ExpressionUUID->"986f7163-cf03-4de4-b998-9538f3a4c8bc"], +Cell[26257, 835, 12280, 363, 721, "Code",ExpressionUUID->"1a8d1d1f-d7f4-4461-a836-4d4571ea6392"], +Cell[38540, 1200, 7205, 138, 337, "Output",ExpressionUUID->"986f7163-cf03-4de4-b998-9538f3a4c8bc"], Cell[CellGroupData[{ -Cell[45509, 1338, 300, 6, 38, "Echo",ExpressionUUID->"6394a97c-351e-437d-8c02-9b0642aacf09"], -Cell[45812, 1346, 302, 8, 38, "Echo",ExpressionUUID->"5e6b589a-5de5-4f17-9268-a35f46b410b1"], -Cell[46117, 1356, 392, 10, 38, "Echo",ExpressionUUID->"957d146b-e63f-416f-a7cb-8c6b69727396"], -Cell[46512, 1368, 279, 7, 38, "Echo",ExpressionUUID->"a6375d85-fb17-4296-9761-db2b17a953c6"], -Cell[46794, 1377, 236, 5, 38, "Echo",ExpressionUUID->"ea158521-8811-4328-bda0-60677eb48800"], -Cell[47033, 1384, 3029, 98, 178, "Echo",ExpressionUUID->"4c5f61bd-03b7-4432-a272-0f26503b2dfb"] +Cell[45770, 1342, 300, 6, 38, "Echo",ExpressionUUID->"6394a97c-351e-437d-8c02-9b0642aacf09"], +Cell[46073, 1350, 302, 8, 38, "Echo",ExpressionUUID->"5e6b589a-5de5-4f17-9268-a35f46b410b1"], +Cell[46378, 1360, 392, 10, 38, "Echo",ExpressionUUID->"957d146b-e63f-416f-a7cb-8c6b69727396"], +Cell[46773, 1372, 279, 7, 38, "Echo",ExpressionUUID->"a6375d85-fb17-4296-9761-db2b17a953c6"], +Cell[47055, 1381, 236, 5, 38, "Echo",ExpressionUUID->"ea158521-8811-4328-bda0-60677eb48800"], +Cell[47294, 1388, 3029, 98, 178, "Echo",ExpressionUUID->"4c5f61bd-03b7-4432-a272-0f26503b2dfb"] }, Open ]], -Cell[50077, 1485, 384, 7, 40, "Output",ExpressionUUID->"a1f818a7-7515-42f6-8412-5023424e7584"], -Cell[50464, 1494, 364, 6, 40, "Output",ExpressionUUID->"53eae298-6178-4ff5-afd7-6d8d8a6d15d1"], -Cell[50831, 1502, 363, 6, 40, "Output",ExpressionUUID->"8a5a30f2-553b-4cde-86b0-6f924840169e"] +Cell[50338, 1489, 384, 7, 40, "Output",ExpressionUUID->"a1f818a7-7515-42f6-8412-5023424e7584"], +Cell[50725, 1498, 364, 6, 40, "Output",ExpressionUUID->"53eae298-6178-4ff5-afd7-6d8d8a6d15d1"], +Cell[51092, 1506, 363, 6, 40, "Output",ExpressionUUID->"8a5a30f2-553b-4cde-86b0-6f924840169e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[51255, 1515, 171, 3, 81, "Subsection",ExpressionUUID->"f642d822-e56a-4daf-87b3-4a7c12588060"], +Cell[51516, 1519, 171, 3, 81, "Subsection",ExpressionUUID->"f642d822-e56a-4daf-87b3-4a7c12588060"], Cell[CellGroupData[{ -Cell[51451, 1522, 377, 10, 68, "Subsubsection",ExpressionUUID->"53a95604-bde4-406e-8c5f-f440053636d6"], +Cell[51712, 1526, 377, 10, 68, "Subsubsection",ExpressionUUID->"53a95604-bde4-406e-8c5f-f440053636d6"], Cell[CellGroupData[{ -Cell[51853, 1536, 13806, 417, 879, "Code",ExpressionUUID->"7a15b2a1-0c7b-4080-9632-dc9021620919"], -Cell[65662, 1955, 7344, 140, 330, "Output",ExpressionUUID->"f6e93834-5111-4db5-8c3e-43dda9b8a147"], +Cell[52114, 1540, 13806, 417, 879, "Code",ExpressionUUID->"7a15b2a1-0c7b-4080-9632-dc9021620919"], +Cell[65923, 1959, 7344, 140, 330, "Output",ExpressionUUID->"f6e93834-5111-4db5-8c3e-43dda9b8a147"], Cell[CellGroupData[{ -Cell[73031, 2099, 304, 7, 38, "Echo",ExpressionUUID->"8ac1734a-e0db-4cdb-81dc-2aa139ec630e"], -Cell[73338, 2108, 304, 8, 38, "Echo",ExpressionUUID->"cef205b4-24c5-4b42-84f6-3911caee3c22"], -Cell[73645, 2118, 394, 10, 38, "Echo",ExpressionUUID->"7b57ec96-1204-4b48-b343-3a8cb80fbd77"], -Cell[74042, 2130, 279, 7, 38, "Echo",ExpressionUUID->"9c3d0530-4afa-4a50-a712-9da4101925ad"], -Cell[74324, 2139, 241, 6, 38, "Echo",ExpressionUUID->"40d8d1a6-b0d6-46a6-b818-6eaf5ee08fcd"], -Cell[74568, 2147, 1291, 43, 86, "Echo",ExpressionUUID->"ed0c361d-6c42-46c2-a90d-f49fa0612c9c"] +Cell[73292, 2103, 304, 7, 38, "Echo",ExpressionUUID->"8ac1734a-e0db-4cdb-81dc-2aa139ec630e"], +Cell[73599, 2112, 304, 8, 38, "Echo",ExpressionUUID->"cef205b4-24c5-4b42-84f6-3911caee3c22"], +Cell[73906, 2122, 394, 10, 38, "Echo",ExpressionUUID->"7b57ec96-1204-4b48-b343-3a8cb80fbd77"], +Cell[74303, 2134, 279, 7, 38, "Echo",ExpressionUUID->"9c3d0530-4afa-4a50-a712-9da4101925ad"], +Cell[74585, 2143, 241, 6, 38, "Echo",ExpressionUUID->"40d8d1a6-b0d6-46a6-b818-6eaf5ee08fcd"], +Cell[74829, 2151, 1291, 43, 86, "Echo",ExpressionUUID->"ed0c361d-6c42-46c2-a90d-f49fa0612c9c"] }, Open ]], -Cell[75874, 2193, 292, 6, 40, "Output",ExpressionUUID->"7cf2cd9d-1ff3-448c-8907-80dcc7585b4c"], -Cell[76169, 2201, 276, 5, 40, "Output",ExpressionUUID->"a16d71b5-1eb7-4c52-831c-1c470734a16a"], -Cell[76448, 2208, 289, 6, 40, "Output",ExpressionUUID->"ae67615f-9200-4a1b-b127-1e6135b099df"] +Cell[76135, 2197, 292, 6, 40, "Output",ExpressionUUID->"7cf2cd9d-1ff3-448c-8907-80dcc7585b4c"], +Cell[76430, 2205, 276, 5, 40, "Output",ExpressionUUID->"a16d71b5-1eb7-4c52-831c-1c470734a16a"], +Cell[76709, 2212, 289, 6, 40, "Output",ExpressionUUID->"ae67615f-9200-4a1b-b127-1e6135b099df"] }, Open ]] }, Open ]] }, Open ]] From eb71edfb21e7c952b69bb0ccc968a30a66a21d18 Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 4 Mar 2024 16:09:44 -0700 Subject: [PATCH 04/13] Update log_normal.nb --- src/LogNormal/log_normal.nb | 307 +++++++++++++++++++----------------- 1 file changed, 159 insertions(+), 148 deletions(-) diff --git a/src/LogNormal/log_normal.nb b/src/LogNormal/log_normal.nb index 1a251fce..6e2df6d1 100644 --- a/src/LogNormal/log_normal.nb +++ b/src/LogNormal/log_normal.nb @@ -3,10 +3,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 0, 0] -NotebookDataLength[ 77989, 2194] -NotebookOptionsPosition[ 69461, 2022] -NotebookOutlinePosition[ 70018, 2041] -CellTagsIndexPosition[ 69975, 2038] +NotebookDataLength[ 78773, 2205] +NotebookOptionsPosition[ 70245, 2033] +NotebookOutlinePosition[ 70802, 2052] +CellTagsIndexPosition[ 70759, 2049] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -50,7 +50,7 @@ Cell[BoxData[ CellChangeTimes->{{3.91138727840687*^9, 3.911387281430051*^9}, { 3.911387543969853*^9, 3.911387555514419*^9}}, CellLabel-> - "In[786]:=",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] + "In[1492]:=",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] }, Open ]], Cell[CellGroupData[{ @@ -79,7 +79,7 @@ Cell[BoxData[{ 3.917383102823773*^9}, {3.9173831552741337`*^9, 3.917383158507695*^9}, 3.917383532443891*^9}, CellLabel-> - "In[787]:=",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] + "In[1493]:=",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] }, Open ]], Cell[CellGroupData[{ @@ -120,7 +120,7 @@ Cell[BoxData[{ 3.911383144055451*^9, 3.911383310823001*^9}, {3.9113851030677443`*^9, 3.91138511600043*^9}, 3.9185709112502613`*^9}, CellLabel-> - "In[789]:=",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] + "In[1495]:=",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] }, Open ]], Cell[CellGroupData[{ @@ -203,7 +203,7 @@ Cell[BoxData[{ 3.911385324670476*^9, 3.911385325035862*^9}, {3.911409187909778*^9, 3.9114091880800257`*^9}, 3.9185709187863417`*^9}, CellLabel-> - "In[791]:=",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] + "In[1497]:=",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] }, Open ]], Cell[CellGroupData[{ @@ -252,7 +252,7 @@ Cell[BoxData[{ CellChangeTimes->{{3.9113839769604807`*^9, 3.911384029460125*^9}, { 3.911385062781126*^9, 3.911385091502931*^9}, 3.91857093005863*^9}, CellLabel-> - "In[795]:=",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] + "In[1501]:=",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] }, Open ]], Cell[CellGroupData[{ @@ -278,7 +278,7 @@ Cell[BoxData[ CellChangeTimes->{{3.911410806554799*^9, 3.911410882453505*^9}, { 3.9114109468550673`*^9, 3.9114109866059113`*^9}, 3.9185709352254477`*^9}, CellLabel-> - "In[797]:=",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] + "In[1503]:=",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] }, Open ]] }, Open ]] }, Open ]], @@ -317,8 +317,8 @@ Cell[BoxData[{ SubscriptBox["\[Sigma]", "0"], ",", " ", SubscriptBox["\[Gamma]", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1.8", ",", " ", - FractionBox["1", "8"], ",", " ", "0.997"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1.9", ",", " ", + FractionBox["1", "4"], ",", " ", "0.995"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -346,9 +346,11 @@ Cell[BoxData[{ 3.917384085426984*^9}, {3.9173856229323063`*^9, 3.917385639341588*^9}, { 3.91751517656183*^9, 3.917515189435231*^9}, {3.918570943201333*^9, 3.918570984185614*^9}, {3.918571110139764*^9, 3.9185711113502274`*^9}, { - 3.9185720081337433`*^9, 3.918572008408592*^9}}, + 3.9185720081337433`*^9, 3.918572008408592*^9}, {3.918575751023251*^9, + 3.918575751913149*^9}, {3.918576073288947*^9, 3.9185760735774183`*^9}, { + 3.918576642017666*^9, 3.918576642103425*^9}}, CellLabel-> - "In[899]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], + "In[1504]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ @@ -357,25 +359,25 @@ Cell[BoxData[ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(K\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.918572009101523*^9},ExpressionUUID->"a4499489-9b81-4960-a2a1-\ -b4c77a3544a6"], + 3.918580103968833*^9},ExpressionUUID->"b460212b-8111-4462-82ea-\ +1d4884b0edec"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Sigma]\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", - FractionBox["1", "8"]}]], "Echo", + FractionBox["1", "4"]}]], "Echo", CellChangeTimes->{ - 3.9185720091361227`*^9},ExpressionUUID->"6750b1fb-4db5-4f05-bad3-\ -ef1c14e2fc31"], + 3.918580104009186*^9},ExpressionUUID->"2123e2e4-3ac4-4d91-bab0-\ +09ebe8b93b1c"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Gamma]\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "0.997`"}]], "Echo", + "EchoLabel"], " ", "0.995`"}]], "Echo", CellChangeTimes->{ - 3.918572009144829*^9},ExpressionUUID->"fa591330-eb02-4b9b-8018-\ -23c322d34814"] + 3.918580104020659*^9},ExpressionUUID->"08e73440-17e1-4643-a21e-\ +c69dc97a9db6"] }, Open ]] }, Open ]] }, Open ]], @@ -402,7 +404,7 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1000000", ",", " ", "2"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1000000000", ",", " ", "2"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -420,9 +422,10 @@ Cell[BoxData[{ 3.917383705323718*^9}, {3.917383899939695*^9, 3.9173839018597183`*^9}, { 3.917383976339484*^9, 3.917383976688408*^9}, 3.917384041262576*^9, { 3.9173840921075373`*^9, 3.9173840922911777`*^9}, 3.917384525229738*^9, { - 3.917515198755231*^9, 3.917515199530878*^9}}, + 3.917515198755231*^9, 3.917515199530878*^9}, {3.918575982190796*^9, + 3.918575982584321*^9}}, CellLabel-> - "In[901]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], + "In[1506]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ @@ -430,18 +433,17 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial X-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(x\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1000000"}]], "Echo", + "EchoLabel"], " ", "1000000000"}]], "Echo", CellChangeTimes->{ - 3.918572010578458*^9},ExpressionUUID->"4d9e194b-7ad9-4cc9-bcd2-\ -d436ba44db13"], + 3.91858010549249*^9},ExpressionUUID->"8d2618c8-b8b8-4562-a0b9-110adc153f53"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(S\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "2"}]], "Echo", CellChangeTimes->{ - 3.918572010617074*^9},ExpressionUUID->"36aba80c-b092-4f6c-97f2-\ -6c31a3372355"] + 3.918580105498043*^9},ExpressionUUID->"b917c7a5-a4a5-469e-881d-\ +5b11a9cae52a"] }, Open ]] }, Open ]], @@ -503,7 +505,7 @@ Cell[BoxData[{ 3.918570990618823*^9, 3.918570994101475*^9}, {3.9185711059481163`*^9, 3.9185711082874823`*^9}}, CellLabel-> - "In[903]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], + "In[1508]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ @@ -511,19 +513,19 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial liquidity is: \\!\\(\\*SubscriptBox[\\(L\\), \ \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "5.475522837620823`*^6"}]], "Echo", + "EchoLabel"], " ", "2.6980754571090493`*^9"}]], "Echo", CellChangeTimes->{ - 3.9185720116787777`*^9},ExpressionUUID->"4790e4b4-41be-4f5e-8bff-\ -f272d933e968"], + 3.918580106964847*^9},ExpressionUUID->"1430ef1b-eccb-4e58-a69a-\ +c2225bd2dd25"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial Y-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(y\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "7.711461742635077`*^6"}]], "Echo", + "EchoLabel"], " ", "2.7269595783081117`*^9"}]], "Echo", CellChangeTimes->{ - 3.918572011720044*^9},ExpressionUUID->"c8c41200-1626-44b7-a7a2-\ -1fe2c6608cc7"] + 3.9185801070006723`*^9},ExpressionUUID->"cb0b3756-642b-4eb7-bafe-\ +76d26628d0fa"] }, Open ]] }, Open ]] }, Open ]], @@ -573,15 +575,15 @@ Cell[BoxData[{ 3.911912928324705*^9, {3.9185711812613907`*^9, 3.918571185390046*^9}, { 3.91857169317227*^9, 3.918571699558569*^9}}, CellLabel-> - "In[905]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], + "In[1510]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial price is: P = \"\>", - "EchoLabel"], " ", "2.`"}]], "Echo", + "EchoLabel"], " ", "1.9999999999999998`"}]], "Echo", CellChangeTimes->{ - 3.9185720149225597`*^9},ExpressionUUID->"5984be7f-2a65-461d-907d-\ -9fc0751b8263"] + 3.918580108101726*^9},ExpressionUUID->"c7597b0b-bc21-44b1-8e33-\ +eed5b0c6c7a7"] }, Open ]] }, Open ]], @@ -637,7 +639,7 @@ Cell[BoxData[{ 3.911409206365666*^9}, {3.918571188362344*^9, 3.918571190424653*^9}, { 3.9185717026957493`*^9, 3.918571706012089*^9}}, CellLabel-> - "In[907]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] + "In[1512]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], @@ -663,17 +665,19 @@ reserve.\ Cell[BoxData[{ RowBox[{ RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", - RowBox[{ - RowBox[{"(", - RowBox[{"1", "-", "\[Gamma]"}], ")"}], "\[CapitalDelta]"}]}], "\n", + RowBox[{ + SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"\[CapitalDelta]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", + RowBox[{ + RowBox[{"(", + RowBox[{"1", "-", "\[Gamma]"}], ")"}], "\[CapitalDelta]"}]}], + " "}], "\n", RowBox[{ RowBox[{ SubscriptBox["\[CapitalDelta]", "X"], "[", RowBox[{ "\[CapitalDelta]_", ",", "x_", ",", "y_", ",", "L_", ",", "\[Mu]_", ",", - "\[Sigma]_", ",", "\[Tau]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", + "\[Sigma]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{ RowBox[{"(", @@ -704,7 +708,7 @@ Cell[BoxData[{ SubscriptBox["\[CapitalDelta]", "Y"], "[", RowBox[{ "\[CapitalDelta]_", ",", "x_", ",", "y_", ",", "L_", ",", "\[Mu]_", ",", - "\[Sigma]_", ",", "\[Tau]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", + "\[Sigma]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"\[Mu]", RowBox[{"(", @@ -738,9 +742,18 @@ Cell[BoxData[{ 3.9173850860945387`*^9, 3.917385090363779*^9}, 3.917385467785697*^9, { 3.91857109514256*^9, 3.9185711020502167`*^9}, {3.91857136201642*^9, 3.918571379355769*^9}, {3.9185719508515673`*^9, 3.9185719564304523`*^9}, { - 3.918572032513034*^9, 3.9185720372819643`*^9}}, - CellLabel-> - "In[922]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], + 3.918572032513034*^9, 3.9185720372819643`*^9}, {3.918575843943832*^9, + 3.918575846003868*^9}, {3.918576114999403*^9, 3.9185761615915833`*^9}, { + 3.918576659877521*^9, 3.918576669588545*^9}, {3.918576871025722*^9, + 3.918576980060952*^9}, {3.9185799351979227`*^9, 3.918580034351376*^9}, { + 3.918580066820713*^9, 3.918580088205531*^9}, {3.91858024962215*^9, + 3.918580262523444*^9}, {3.918580294205887*^9, 3.918580298495079*^9}, { + 3.918580365884131*^9, 3.9185803726739683`*^9}, {3.9185815280229187`*^9, + 3.918581595304048*^9}, {3.918581637999057*^9, 3.9185817030183477`*^9}, { + 3.9185818429293957`*^9, 3.9185818876898746`*^9}, {3.9185823204024343`*^9, + 3.918582435530633*^9}, {3.918582488030525*^9, + 3.918582492481691*^9}},ExpressionUUID->"0716117c-5381-46be-8b57-\ +f2cefa727879"], Cell[CellGroupData[{ @@ -757,7 +770,6 @@ Cell[BoxData[{ SubscriptBox["L", "0"], ",", SubscriptBox["\[Mu]", "0"], ",", SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"], ",", SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"Echo", "[", @@ -765,9 +777,13 @@ Cell[BoxData[{ RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"YIn", ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", + RowBox[{ + SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"YIn", ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}], + FractionBox[ + SubscriptBox["L", "0"], + SubscriptBox["y", "0"]]}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"Echo", "[", @@ -779,13 +795,9 @@ Cell[BoxData[{ RowBox[{ SubscriptBox["y", "0"], "+", "YIn"}], ",", RowBox[{ - SubscriptBox["L", "0"], "+", - RowBox[{ - FractionBox["1", - SubscriptBox["\[Mu]", "0"]], "DeltaL"}]}], ",", + SubscriptBox["L", "0"], "+", "DeltaL"}], ",", SubscriptBox["\[Mu]", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}], ",", " ", + SubscriptBox["\[Sigma]", "0"]}], "]"}], ",", " ", "\"\\""}], "]"}], ";"}], "\n"}], "\n", RowBox[{ RowBox[{"XIn", " ", "=", " ", "1"}], ";"}], "\n", @@ -799,7 +811,6 @@ Cell[BoxData[{ SubscriptBox["L", "0"], ",", SubscriptBox["\[Mu]", "0"], ",", SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"], ",", SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"Echo", "[", @@ -822,19 +833,19 @@ Cell[BoxData[{ RowBox[{ SubscriptBox["L", "0"], "+", "DeltaL"}], ",", SubscriptBox["\[Mu]", "0"], ",", - SubscriptBox["\[Sigma]", "0"], ",", - SubscriptBox["\[Tau]", "0"]}], "]"}], ",", " ", + SubscriptBox["\[Sigma]", "0"]}], "]"}], ",", " ", "\"\\""}], "]"}], ";"}]}], "Code", CellChangeTimes->CompressedData[" -1:eJxTTMoPSmViYGAQBmIQLfaXOfuC/ltHpmLmOhC9I/NDK4hOUVo6EURLTV2y +1:eJxTTMoPSmViYGAQBWIQLfaXOfuC/ltHpmLmOhC9I/NDK4hOUVo6EURLTV2y FERvCg5fAaInb7deA6Ljko+A6T3ixZtAdFHvLDC9fMPS3SDa4VfJHhDNKn73 EIiedfPZURB9ztHsCti+KOZrINotmuUriGZ/YPMNRJ9eN4P3IpDewjNHGEQX GN9VB9GfOCM1QPSyWcqhILozXjIORAc9ZiwE0W3/M0pBNM+xtkoQfSz4dS2I duruXgyiBbzvgGmfuE3nQXTJtk83QbTKtsvvRIzeOmZ+aPsEouPSdkuIAulv -M++C6VfNXy3AfHtXSxANANaRnXs= +M++C6VfNXy3AfHtXSxAd0OMvKw6kGTQfy4Pon5mp3pJA2q1c2g9EAwBEYKkI + "], CellLabel-> - "In[925]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], + "In[1735]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ @@ -842,35 +853,35 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"XOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "0.49852197780273855`"}]}]], "Echo", + RowBox[{"-", "0.4958993196487427`"}]}]], "Echo", CellChangeTimes->{ - 3.918572039366729*^9},ExpressionUUID->"e778761a-c888-41eb-bb8e-\ -ba6277cfb258"], + 3.918582439324806*^9},ExpressionUUID->"5f331040-002f-4954-b9b0-\ +0596a256b6ef"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", "1.1102230246251565`*^-16"}]], "Echo", + "EchoLabel"], " ", + RowBox[{"-", "2.2842838731662596`*^-13"}]}]], "Echo", CellChangeTimes->{ - 3.918572039398485*^9},ExpressionUUID->"2ca752e4-9f24-4123-be27-\ -8e1c30f03b71"], + 3.918582439361703*^9},ExpressionUUID->"d2c9b9e5-953a-4163-87ed-\ +40fd12874ed9"], Cell[BoxData[ RowBox[{ TagBox["\<\"YOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "1.9946790738031268`"}]}]], "Echo", + RowBox[{"-", "1.991239070892334`"}]}]], "Echo", CellChangeTimes->{ - 3.9185720394081783`*^9},ExpressionUUID->"a0a4a8d1-3cf9-494d-8a06-\ -67cd9959971d"], + 3.9185824393736*^9},ExpressionUUID->"5f43ec81-6c75-4b19-b03c-0ef03046042f"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", "2.220446049250313`*^-16"}]], "Echo", + "EchoLabel"], " ", "1.6653345369377348`*^-16"}]], "Echo", CellChangeTimes->{ - 3.9185720394322042`*^9},ExpressionUUID->"177255d5-b31d-40b8-b5b5-\ -614559615749"] + 3.918582439398159*^9},ExpressionUUID->"d8cd2298-cc6c-4ce6-a9ea-\ +44495d515509"] }, Open ]] }, Open ]] }, Open ]] @@ -2020,8 +2031,8 @@ f3028622cb8d"] }, Open ]] }, Open ]] }, -WindowSize->{2993, 2083}, -WindowMargins->{{Automatic, 12}, {Automatic, -819}}, +WindowSize->{1651, 2083}, +WindowMargins->{{Automatic, 11}, {Automatic, -819}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, FrontEndVersion->"13.2 for Mac OS X ARM (64-bit) (January 31, 2023)", @@ -2046,144 +2057,144 @@ Cell[CellGroupData[{ Cell[632, 22, 221, 5, 101, "Section",ExpressionUUID->"514be430-48c5-4dc6-92af-6b1c3a5b8586"], Cell[CellGroupData[{ Cell[878, 31, 222, 5, 81, "Subsection",ExpressionUUID->"f16f1652-ed41-4414-8c9b-6b6d5d8061ac"], -Cell[1103, 38, 578, 14, 54, "Code",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] +Cell[1103, 38, 579, 14, 54, "Code",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] }, Open ]], Cell[CellGroupData[{ -Cell[1718, 57, 202, 3, 81, "Subsection",ExpressionUUID->"b3dd161e-0b53-4183-b30c-be7844f26477"], -Cell[1923, 62, 808, 19, 86, "Code",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] +Cell[1719, 57, 202, 3, 81, "Subsection",ExpressionUUID->"b3dd161e-0b53-4183-b30c-be7844f26477"], +Cell[1924, 62, 809, 19, 86, "Code",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] }, Open ]], Cell[CellGroupData[{ -Cell[2768, 86, 307, 7, 81, "Subsection",ExpressionUUID->"f601d02f-f91e-4780-a166-a78097a54f48"], -Cell[3078, 95, 977, 27, 165, "Code",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] +Cell[2770, 86, 307, 7, 81, "Subsection",ExpressionUUID->"f601d02f-f91e-4780-a166-a78097a54f48"], +Cell[3080, 95, 978, 27, 165, "Code",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] }, Open ]], Cell[CellGroupData[{ -Cell[4092, 127, 296, 7, 81, "Subsection",ExpressionUUID->"009a24ad-ebe5-4d73-bdda-a7839592332a"], +Cell[4095, 127, 296, 7, 81, "Subsection",ExpressionUUID->"009a24ad-ebe5-4d73-bdda-a7839592332a"], Cell[CellGroupData[{ -Cell[4413, 138, 244, 6, 67, "Subsubsection",ExpressionUUID->"3b15f5e3-f420-4095-899a-506c7286cc40"], -Cell[4660, 146, 2207, 59, 192, "Code",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] +Cell[4416, 138, 244, 6, 67, "Subsubsection",ExpressionUUID->"3b15f5e3-f420-4095-899a-506c7286cc40"], +Cell[4663, 146, 2208, 59, 192, "Code",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] }, Open ]], Cell[CellGroupData[{ -Cell[6904, 210, 253, 6, 67, "Subsubsection",ExpressionUUID->"6228385e-cfd2-4bd0-97f4-58c98a5a994e"], -Cell[7160, 218, 1227, 36, 127, "Code",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] +Cell[6908, 210, 253, 6, 67, "Subsubsection",ExpressionUUID->"6228385e-cfd2-4bd0-97f4-58c98a5a994e"], +Cell[7164, 218, 1228, 36, 127, "Code",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] }, Open ]], Cell[CellGroupData[{ -Cell[8424, 259, 186, 3, 67, "Subsubsection",ExpressionUUID->"18015876-38da-4fa9-82b7-a417d745ef90"], -Cell[8613, 264, 648, 16, 72, "Code",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] +Cell[8429, 259, 186, 3, 67, "Subsubsection",ExpressionUUID->"18015876-38da-4fa9-82b7-a417d745ef90"], +Cell[8618, 264, 649, 16, 72, "Code",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[9322, 287, 285, 7, 101, "Section",ExpressionUUID->"da815218-0c74-4720-a5c9-76f45781c5e2"], +Cell[9328, 287, 285, 7, 101, "Section",ExpressionUUID->"da815218-0c74-4720-a5c9-76f45781c5e2"], Cell[CellGroupData[{ -Cell[9632, 298, 305, 7, 81, "Subsection",ExpressionUUID->"d461a415-44ca-4804-8248-6137a0f9449f"], +Cell[9638, 298, 305, 7, 81, "Subsection",ExpressionUUID->"d461a415-44ca-4804-8248-6137a0f9449f"], Cell[CellGroupData[{ -Cell[9962, 309, 1890, 41, 106, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], +Cell[9968, 309, 2039, 43, 105, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ -Cell[11877, 354, 230, 6, 38, "Echo",ExpressionUUID->"a4499489-9b81-4960-a2a1-b4c77a3544a6"], -Cell[12110, 362, 260, 7, 54, "Echo",ExpressionUUID->"6750b1fb-4db5-4f05-bad3-ef1c14e2fc31"], -Cell[12373, 371, 242, 6, 38, "Echo",ExpressionUUID->"fa591330-eb02-4b9b-8018-23c322d34814"] +Cell[12032, 356, 230, 6, 38, "Echo",ExpressionUUID->"b460212b-8111-4462-82ea-1d4884b0edec"], +Cell[12265, 364, 258, 7, 53, "Echo",ExpressionUUID->"2123e2e4-3ac4-4d91-bab0-09ebe8b93b1c"], +Cell[12526, 373, 242, 6, 38, "Echo",ExpressionUUID->"08e73440-17e1-4643-a21e-c69dc97a9db6"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[12676, 384, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], +Cell[12829, 386, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], Cell[CellGroupData[{ -Cell[13008, 395, 1179, 29, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], +Cell[13161, 397, 1233, 30, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ -Cell[14212, 428, 272, 7, 38, "Echo",ExpressionUUID->"4d9e194b-7ad9-4cc9-bcd2-d436ba44db13"], -Cell[14487, 437, 230, 6, 38, "Echo",ExpressionUUID->"36aba80c-b092-4f6c-97f2-6c31a3372355"] +Cell[14419, 431, 272, 6, 38, "Echo",ExpressionUUID->"8d2618c8-b8b8-4562-a0b9-110adc153f53"], +Cell[14694, 439, 230, 6, 38, "Echo",ExpressionUUID->"b917c7a5-a4a5-469e-881d-5b11a9cae52a"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[14766, 449, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], +Cell[14973, 451, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], Cell[CellGroupData[{ -Cell[15042, 459, 1743, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], +Cell[15249, 461, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ -Cell[16810, 509, 280, 7, 38, "Echo",ExpressionUUID->"4790e4b4-41be-4f5e-8bff-f272d933e968"], -Cell[17093, 518, 286, 7, 38, "Echo",ExpressionUUID->"c8c41200-1626-44b7-a7a2-1fe2c6608cc7"] +Cell[17018, 511, 279, 7, 38, "Echo",ExpressionUUID->"1430ef1b-eccb-4e58-a69a-c2225bd2dd25"], +Cell[17300, 520, 289, 7, 38, "Echo",ExpressionUUID->"cb0b3756-642b-4eb7-bafe-76d26628d0fa"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[17440, 532, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], +Cell[17650, 534, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], Cell[CellGroupData[{ -Cell[17689, 540, 1306, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], -Cell[18998, 577, 215, 6, 38, "Echo",ExpressionUUID->"5984be7f-2a65-461d-907d-9fc0751b8263"] +Cell[17899, 542, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], +Cell[19209, 579, 229, 6, 38, "Echo",ExpressionUUID->"c7597b0b-bc21-44b1-8e33-eed5b0c6c7a7"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[19262, 589, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], -Cell[19549, 597, 1408, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] +Cell[19487, 591, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], +Cell[19774, 599, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[21018, 646, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], +Cell[21244, 648, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], Cell[CellGroupData[{ -Cell[21198, 653, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], -Cell[21491, 662, 3348, 80, 182, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], +Cell[21424, 655, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], +Cell[21717, 664, 4016, 91, 182, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ -Cell[24864, 746, 3106, 90, 393, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], +Cell[25758, 759, 2987, 88, 393, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ -Cell[27995, 840, 229, 7, 38, "Echo",ExpressionUUID->"e778761a-c888-41eb-bb8e-ba6277cfb258"], -Cell[28227, 849, 221, 6, 38, "Echo",ExpressionUUID->"2ca752e4-9f24-4123-be27-8e1c30f03b71"], -Cell[28451, 857, 230, 7, 38, "Echo",ExpressionUUID->"a0a4a8d1-3cf9-494d-8a06-67cd9959971d"], -Cell[28684, 866, 222, 6, 38, "Echo",ExpressionUUID->"177255d5-b31d-40b8-b5b5-614559615749"] +Cell[28770, 851, 228, 7, 38, "Echo",ExpressionUUID->"5f331040-002f-4954-b9b0-0596a256b6ef"], +Cell[29001, 860, 239, 7, 38, "Echo",ExpressionUUID->"d2c9b9e5-953a-4163-87ed-40fd12874ed9"], +Cell[29243, 869, 223, 6, 38, "Echo",ExpressionUUID->"5f43ec81-6c75-4b19-b03c-0ef03046042f"], +Cell[29469, 877, 221, 6, 38, "Echo",ExpressionUUID->"d8cd2298-cc6c-4ce6-a9ea-44495d515509"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[28979, 880, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], -Cell[29186, 886, 568, 13, 50, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], +Cell[29763, 891, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], +Cell[29970, 897, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], Cell[CellGroupData[{ -Cell[29779, 903, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], -Cell[30412, 920, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] +Cell[30563, 914, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], +Cell[31196, 931, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] }, Open ]], Cell[CellGroupData[{ -Cell[31133, 945, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], +Cell[31917, 956, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], Cell[CellGroupData[{ -Cell[31426, 953, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], +Cell[32210, 964, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], Cell[CellGroupData[{ -Cell[31911, 969, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], -Cell[43635, 1294, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], +Cell[32695, 980, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], +Cell[44419, 1305, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], Cell[CellGroupData[{ -Cell[47184, 1376, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], -Cell[47489, 1385, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], -Cell[47795, 1395, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], -Cell[48183, 1406, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], -Cell[48427, 1414, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] +Cell[47968, 1387, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], +Cell[48273, 1396, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], +Cell[48579, 1406, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], +Cell[48967, 1417, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], +Cell[49211, 1425, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[50681, 1483, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], +Cell[51465, 1494, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], Cell[CellGroupData[{ -Cell[50877, 1490, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], +Cell[51661, 1501, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], Cell[CellGroupData[{ -Cell[51284, 1504, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], -Cell[58813, 1721, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], +Cell[52068, 1515, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], +Cell[59597, 1732, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], Cell[CellGroupData[{ -Cell[62391, 1803, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], -Cell[62695, 1812, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], -Cell[62999, 1822, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], -Cell[63393, 1834, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], -Cell[63634, 1842, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] +Cell[63175, 1814, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], +Cell[63479, 1823, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], +Cell[63783, 1833, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], +Cell[64177, 1845, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], +Cell[64418, 1853, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[66179, 1921, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], +Cell[66963, 1932, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], Cell[CellGroupData[{ -Cell[66368, 1928, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], +Cell[67152, 1939, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], Cell[CellGroupData[{ -Cell[66620, 1937, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], +Cell[67404, 1948, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], Cell[CellGroupData[{ -Cell[68790, 1998, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], -Cell[69099, 2008, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] +Cell[69574, 2009, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], +Cell[69883, 2019, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] }, Open ]] }, Open ]] }, Open ]] From 1d2d65775868cf7284ad03c95c6e200b2eab83a7 Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 4 Mar 2024 16:17:16 -0700 Subject: [PATCH 05/13] progress on ln fees --- src/LogNormal/log_normal.nb | 256 ++++++++++++++++++++---------------- 1 file changed, 140 insertions(+), 116 deletions(-) diff --git a/src/LogNormal/log_normal.nb b/src/LogNormal/log_normal.nb index 6e2df6d1..ba561229 100644 --- a/src/LogNormal/log_normal.nb +++ b/src/LogNormal/log_normal.nb @@ -3,10 +3,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 0, 0] -NotebookDataLength[ 78773, 2205] -NotebookOptionsPosition[ 70245, 2033] -NotebookOutlinePosition[ 70802, 2052] -CellTagsIndexPosition[ 70759, 2049] +NotebookDataLength[ 79745, 2229] +NotebookOptionsPosition[ 71215, 2057] +NotebookOutlinePosition[ 71772, 2076] +CellTagsIndexPosition[ 71729, 2073] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -317,8 +317,8 @@ Cell[BoxData[{ SubscriptBox["\[Sigma]", "0"], ",", " ", SubscriptBox["\[Gamma]", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1.9", ",", " ", - FractionBox["1", "4"], ",", " ", "0.995"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1", ",", " ", + FractionBox["1", "2"], ",", " ", "0.995"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -348,9 +348,11 @@ Cell[BoxData[{ 3.918570984185614*^9}, {3.918571110139764*^9, 3.9185711113502274`*^9}, { 3.9185720081337433`*^9, 3.918572008408592*^9}, {3.918575751023251*^9, 3.918575751913149*^9}, {3.918576073288947*^9, 3.9185760735774183`*^9}, { - 3.918576642017666*^9, 3.918576642103425*^9}}, + 3.918576642017666*^9, 3.918576642103425*^9}, {3.918582513027935*^9, + 3.918582513467471*^9}, {3.918582809143463*^9, 3.918582809217847*^9}, { + 3.918582876514236*^9, 3.918582923985523*^9}}, CellLabel-> - "In[1504]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], + "In[1969]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ @@ -359,25 +361,25 @@ Cell[BoxData[ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(K\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.918580103968833*^9},ExpressionUUID->"b460212b-8111-4462-82ea-\ -1d4884b0edec"], + 3.918582925252103*^9},ExpressionUUID->"6de3a9a7-ba0a-48f3-b95c-\ +a5672ab093d5"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Sigma]\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", - FractionBox["1", "4"]}]], "Echo", + FractionBox["1", "2"]}]], "Echo", CellChangeTimes->{ - 3.918580104009186*^9},ExpressionUUID->"2123e2e4-3ac4-4d91-bab0-\ -09ebe8b93b1c"], + 3.9185829252865887`*^9},ExpressionUUID->"1fd66cda-69cc-43a9-a381-\ +04fed714617b"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Gamma]\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "0.995`"}]], "Echo", CellChangeTimes->{ - 3.918580104020659*^9},ExpressionUUID->"08e73440-17e1-4643-a21e-\ -c69dc97a9db6"] + 3.918582925297202*^9},ExpressionUUID->"35529706-149c-407d-8516-\ +976104e1257d"] }, Open ]] }, Open ]] }, Open ]], @@ -404,7 +406,7 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1000000000", ",", " ", "2"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1000000000", ",", " ", "1.1"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -423,9 +425,11 @@ Cell[BoxData[{ 3.917383976339484*^9, 3.917383976688408*^9}, 3.917384041262576*^9, { 3.9173840921075373`*^9, 3.9173840922911777`*^9}, 3.917384525229738*^9, { 3.917515198755231*^9, 3.917515199530878*^9}, {3.918575982190796*^9, - 3.918575982584321*^9}}, + 3.918575982584321*^9}, {3.918582811121216*^9, 3.9185828112296124`*^9}, { + 3.918582880689728*^9, 3.9185828808310337`*^9}, {3.918582926936624*^9, + 3.9185829296473217`*^9}, {3.91858299719833*^9, 3.918582997406849*^9}}, CellLabel-> - "In[1506]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], + "In[1994]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ @@ -435,15 +439,16 @@ Cell[BoxData[ \\!\\(\\*SubscriptBox[\\(x\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1000000000"}]], "Echo", CellChangeTimes->{ - 3.91858010549249*^9},ExpressionUUID->"8d2618c8-b8b8-4562-a0b9-110adc153f53"], + 3.918582997858343*^9},ExpressionUUID->"8d7f8dfa-cf4d-4e7a-9b28-\ +a0d8608c639d"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(S\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "2"}]], "Echo", + "EchoLabel"], " ", "1.1`"}]], "Echo", CellChangeTimes->{ - 3.918580105498043*^9},ExpressionUUID->"b917c7a5-a4a5-469e-881d-\ -5b11a9cae52a"] + 3.918582997895363*^9},ExpressionUUID->"5f66860e-9855-4b07-8a22-\ +5f0ae740f01f"] }, Open ]] }, Open ]], @@ -505,7 +510,7 @@ Cell[BoxData[{ 3.918570990618823*^9, 3.918570994101475*^9}, {3.9185711059481163`*^9, 3.9185711082874823`*^9}}, CellLabel-> - "In[1508]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], + "In[1996]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ @@ -513,19 +518,19 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial liquidity is: \\!\\(\\*SubscriptBox[\\(L\\), \ \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "2.6980754571090493`*^9"}]], "Echo", + "EchoLabel"], " ", "3.0326562752735147`*^9"}]], "Echo", CellChangeTimes->{ - 3.918580106964847*^9},ExpressionUUID->"1430ef1b-eccb-4e58-a69a-\ -c2225bd2dd25"], + 3.918582999935073*^9},ExpressionUUID->"d786b49f-052b-4006-9068-\ +ec0adea52029"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial Y-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(y\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "2.7269595783081117`*^9"}]], "Echo", + "EchoLabel"], " ", "1.4445295894783616`*^9"}]], "Echo", CellChangeTimes->{ - 3.9185801070006723`*^9},ExpressionUUID->"cb0b3756-642b-4eb7-bafe-\ -76d26628d0fa"] + 3.918582999966805*^9},ExpressionUUID->"1c75ef58-4f17-4970-95fd-\ +8a759a2435af"] }, Open ]] }, Open ]] }, Open ]], @@ -575,15 +580,15 @@ Cell[BoxData[{ 3.911912928324705*^9, {3.9185711812613907`*^9, 3.918571185390046*^9}, { 3.91857169317227*^9, 3.918571699558569*^9}}, CellLabel-> - "In[1510]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], + "In[1998]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial price is: P = \"\>", - "EchoLabel"], " ", "1.9999999999999998`"}]], "Echo", + "EchoLabel"], " ", "1.1`"}]], "Echo", CellChangeTimes->{ - 3.918580108101726*^9},ExpressionUUID->"c7597b0b-bc21-44b1-8e33-\ -eed5b0c6c7a7"] + 3.9185830019794073`*^9},ExpressionUUID->"3ff2d5d3-2b6e-4b97-980a-\ +c7bf6980d2ea"] }, Open ]] }, Open ]], @@ -639,7 +644,7 @@ Cell[BoxData[{ 3.911409206365666*^9}, {3.918571188362344*^9, 3.918571190424653*^9}, { 3.9185717026957493`*^9, 3.918571706012089*^9}}, CellLabel-> - "In[1512]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] + "In[2000]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], @@ -683,10 +688,11 @@ Cell[BoxData[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox["1", "\[Mu]"], + FractionBox["1", "2"], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], ")"}], + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], + FractionBox["L", "y"]}]}], ")"}], RowBox[{"\[CapitalPhi]", "[", RowBox[{ RowBox[{"-", "\[Sigma]"}], " ", "-", " ", @@ -698,11 +704,12 @@ Cell[BoxData[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox["1", "\[Mu]"], + FractionBox["1", "2"], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], - ")"}]}]], "]"}]}], "]"}]}], "-", "x"}]}], "\n", + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], + FractionBox["L", "y"]}]}], ")"}]}]], "]"}]}], "]"}]}], "-", + "x"}]}], "\n", RowBox[{ RowBox[{ SubscriptBox["\[CapitalDelta]", "Y"], "[", @@ -714,8 +721,11 @@ Cell[BoxData[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}], ")"}], + FractionBox["1", "2"], + RowBox[{ + SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], + FractionBox["L", "x"]}]}], ")"}], RowBox[{"\[CapitalPhi]", "[", RowBox[{ RowBox[{"-", "\[Sigma]"}], " ", "-", " ", @@ -725,9 +735,12 @@ Cell[BoxData[{ RowBox[{"x", "+", "\[CapitalDelta]"}], RowBox[{"L", "+", RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]], "]"}]}], - "]"}]}], "-", "y"}]}]}], "Code", + FractionBox["1", "2"], + RowBox[{ + SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], + FractionBox["L", "x"]}]}]], "]"}]}], "]"}]}], "-", "y"}]}]}], "Code",\ + CellChangeTimes->{{3.9113879019426517`*^9, 3.91138810608572*^9}, { 3.911388182414874*^9, 3.911388482660475*^9}, {3.911388787674255*^9, 3.911388979350903*^9}, {3.911389141187207*^9, 3.911389159323999*^9}, { @@ -751,9 +764,11 @@ Cell[BoxData[{ 3.918580365884131*^9, 3.9185803726739683`*^9}, {3.9185815280229187`*^9, 3.918581595304048*^9}, {3.918581637999057*^9, 3.9185817030183477`*^9}, { 3.9185818429293957`*^9, 3.9185818876898746`*^9}, {3.9185823204024343`*^9, - 3.918582435530633*^9}, {3.918582488030525*^9, - 3.918582492481691*^9}},ExpressionUUID->"0716117c-5381-46be-8b57-\ -f2cefa727879"], + 3.918582435530633*^9}, {3.918582488030525*^9, 3.918582492481691*^9}, { + 3.918582676185212*^9, 3.918582684377091*^9}, {3.9185827212029133`*^9, + 3.918582726305999*^9}, {3.918582845001643*^9, 3.918582856707839*^9}}, + CellLabel-> + "In[2002]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ @@ -777,6 +792,7 @@ Cell[BoxData[{ RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ + FractionBox["1", "2"], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", RowBox[{"YIn", ",", @@ -818,9 +834,14 @@ Cell[BoxData[{ RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"XIn", ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", + FractionBox["1", "2"], + RowBox[{ + SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"XIn", ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}], + FractionBox[ + SubscriptBox["L", "0"], + SubscriptBox["x", "0"]]}]}], ";"}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -836,16 +857,17 @@ Cell[BoxData[{ SubscriptBox["\[Sigma]", "0"]}], "]"}], ",", " ", "\"\\""}], "]"}], ";"}]}], "Code", CellChangeTimes->CompressedData[" -1:eJxTTMoPSmViYGAQBWIQLfaXOfuC/ltHpmLmOhC9I/NDK4hOUVo6EURLTV2y +1:eJxTTMoPSmViYGCQBGIQLfaXOfuC/ltHpmLmOhC9I/NDK4hOUVo6EURLTV2y FERvCg5fAaInb7deA6Ljko+A6T3ixZtAdFHvLDC9fMPS3SDa4VfJHhDNKn73 EIiedfPZURB9ztHsCti+KOZrINotmuUriGZ/YPMNRJ9eN4P3IpDewjNHGEQX GN9VB9GfOCM1QPSyWcqhILozXjIORAc9ZiwE0W3/M0pBNM+xtkoQfSz4dS2I duruXgyiBbzvgGmfuE3nQXTJtk83QbTKtsvvRIzeOmZ+aPsEouPSdkuIAulv -M++C6VfNXy3AfHtXSxAd0OMvKw6kGTQfy4Pon5mp3pJA2q1c2g9EAwBEYKkI +M++C6VfNXy3AfHtXSxAd0OMvKw6kGTQfy4Pon5mp3pJA2q1c2g9EhxVeT5AC +0qfc1dJA9KYwhhIQfU7yI5j+4lRYCaLlGsSrQPSTMOEuED2JeSaYBgDn1sMd "], CellLabel-> - "In[1735]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], + "In[2005]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ @@ -853,35 +875,37 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"XOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "0.4958993196487427`"}]}]], "Echo", + RowBox[{"-", "0.9050873517990112`"}]}]], "Echo", CellChangeTimes->{ - 3.918582439324806*^9},ExpressionUUID->"5f331040-002f-4954-b9b0-\ -0596a256b6ef"], + 3.9185830080275784`*^9},ExpressionUUID->"e1118ffd-b385-4250-bff9-\ +df8bfdd9302b"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", "EchoLabel"], " ", - RowBox[{"-", "2.2842838731662596`*^-13"}]}]], "Echo", + RowBox[{"-", "1.1102230246251565`*^-16"}]}]], "Echo", CellChangeTimes->{ - 3.918582439361703*^9},ExpressionUUID->"d2c9b9e5-953a-4163-87ed-\ -40fd12874ed9"], + 3.9185830080587883`*^9},ExpressionUUID->"6b64f7ad-62d2-4c23-a62f-\ +c0c18db864b6"], Cell[BoxData[ RowBox[{ TagBox["\<\"YOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "1.991239070892334`"}]}]], "Echo", + RowBox[{"-", "1.0936386585235596`"}]}]], "Echo", CellChangeTimes->{ - 3.9185824393736*^9},ExpressionUUID->"5f43ec81-6c75-4b19-b03c-0ef03046042f"], + 3.918583008066724*^9},ExpressionUUID->"3a3bbd45-564b-4322-8449-\ +bcd7296898d4"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", "1.6653345369377348`*^-16"}]], "Echo", + "EchoLabel"], " ", + RowBox[{"-", "1.1102230246251565`*^-16"}]}]], "Echo", CellChangeTimes->{ - 3.918582439398159*^9},ExpressionUUID->"d8cd2298-cc6c-4ce6-a9ea-\ -44495d515509"] + 3.9185830080905657`*^9},ExpressionUUID->"a3a5e902-c65c-4cbc-a0a6-\ +34075aee731b"] }, Open ]] }, Open ]] }, Open ]] @@ -2088,113 +2112,113 @@ Cell[9328, 287, 285, 7, 101, "Section",ExpressionUUID->"da815218-0c74-4720-a5c9- Cell[CellGroupData[{ Cell[9638, 298, 305, 7, 81, "Subsection",ExpressionUUID->"d461a415-44ca-4804-8248-6137a0f9449f"], Cell[CellGroupData[{ -Cell[9968, 309, 2039, 43, 105, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], +Cell[9968, 309, 2183, 45, 105, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ -Cell[12032, 356, 230, 6, 38, "Echo",ExpressionUUID->"b460212b-8111-4462-82ea-1d4884b0edec"], -Cell[12265, 364, 258, 7, 53, "Echo",ExpressionUUID->"2123e2e4-3ac4-4d91-bab0-09ebe8b93b1c"], -Cell[12526, 373, 242, 6, 38, "Echo",ExpressionUUID->"08e73440-17e1-4643-a21e-c69dc97a9db6"] +Cell[12176, 358, 230, 6, 38, "Echo",ExpressionUUID->"6de3a9a7-ba0a-48f3-b95c-a5672ab093d5"], +Cell[12409, 366, 260, 7, 53, "Echo",ExpressionUUID->"1fd66cda-69cc-43a9-a381-04fed714617b"], +Cell[12672, 375, 242, 6, 38, "Echo",ExpressionUUID->"35529706-149c-407d-8516-976104e1257d"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[12829, 386, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], +Cell[12975, 388, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], Cell[CellGroupData[{ -Cell[13161, 397, 1233, 30, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], +Cell[13307, 399, 1432, 32, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ -Cell[14419, 431, 272, 6, 38, "Echo",ExpressionUUID->"8d2618c8-b8b8-4562-a0b9-110adc153f53"], -Cell[14694, 439, 230, 6, 38, "Echo",ExpressionUUID->"b917c7a5-a4a5-469e-881d-5b11a9cae52a"] +Cell[14764, 435, 275, 7, 38, "Echo",ExpressionUUID->"8d7f8dfa-cf4d-4e7a-9b28-a0d8608c639d"], +Cell[15042, 444, 233, 6, 38, "Echo",ExpressionUUID->"5f66860e-9855-4b07-8a22-5f0ae740f01f"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[14973, 451, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], +Cell[15324, 456, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], Cell[CellGroupData[{ -Cell[15249, 461, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], +Cell[15600, 466, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ -Cell[17018, 511, 279, 7, 38, "Echo",ExpressionUUID->"1430ef1b-eccb-4e58-a69a-c2225bd2dd25"], -Cell[17300, 520, 289, 7, 38, "Echo",ExpressionUUID->"cb0b3756-642b-4eb7-bafe-76d26628d0fa"] +Cell[17369, 516, 279, 7, 38, "Echo",ExpressionUUID->"d786b49f-052b-4006-9068-ec0adea52029"], +Cell[17651, 525, 287, 7, 38, "Echo",ExpressionUUID->"1c75ef58-4f17-4970-95fd-8a759a2435af"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[17650, 534, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], +Cell[17999, 539, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], Cell[CellGroupData[{ -Cell[17899, 542, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], -Cell[19209, 579, 229, 6, 38, "Echo",ExpressionUUID->"c7597b0b-bc21-44b1-8e33-eed5b0c6c7a7"] +Cell[18248, 547, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], +Cell[19558, 584, 216, 6, 38, "Echo",ExpressionUUID->"3ff2d5d3-2b6e-4b97-980a-c7bf6980d2ea"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[19487, 591, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], -Cell[19774, 599, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] +Cell[19823, 596, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], +Cell[20110, 604, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[21244, 648, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], +Cell[21580, 653, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], Cell[CellGroupData[{ -Cell[21424, 655, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], -Cell[21717, 664, 4016, 91, 182, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], +Cell[21760, 660, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], +Cell[22053, 669, 4408, 101, 194, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ -Cell[25758, 759, 2987, 88, 393, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], +Cell[26486, 774, 3200, 95, 421, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ -Cell[28770, 851, 228, 7, 38, "Echo",ExpressionUUID->"5f331040-002f-4954-b9b0-0596a256b6ef"], -Cell[29001, 860, 239, 7, 38, "Echo",ExpressionUUID->"d2c9b9e5-953a-4163-87ed-40fd12874ed9"], -Cell[29243, 869, 223, 6, 38, "Echo",ExpressionUUID->"5f43ec81-6c75-4b19-b03c-0ef03046042f"], -Cell[29469, 877, 221, 6, 38, "Echo",ExpressionUUID->"d8cd2298-cc6c-4ce6-a9ea-44495d515509"] +Cell[29711, 873, 230, 7, 38, "Echo",ExpressionUUID->"e1118ffd-b385-4250-bff9-df8bfdd9302b"], +Cell[29944, 882, 241, 7, 38, "Echo",ExpressionUUID->"6b64f7ad-62d2-4c23-a62f-c0c18db864b6"], +Cell[30188, 891, 228, 7, 38, "Echo",ExpressionUUID->"3a3bbd45-564b-4322-8449-bcd7296898d4"], +Cell[30419, 900, 241, 7, 38, "Echo",ExpressionUUID->"a3a5e902-c65c-4cbc-a0a6-34075aee731b"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[29763, 891, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], -Cell[29970, 897, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], +Cell[30733, 915, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], +Cell[30940, 921, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], Cell[CellGroupData[{ -Cell[30563, 914, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], -Cell[31196, 931, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] +Cell[31533, 938, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], +Cell[32166, 955, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] }, Open ]], Cell[CellGroupData[{ -Cell[31917, 956, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], +Cell[32887, 980, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], Cell[CellGroupData[{ -Cell[32210, 964, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], +Cell[33180, 988, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], Cell[CellGroupData[{ -Cell[32695, 980, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], -Cell[44419, 1305, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], +Cell[33665, 1004, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], +Cell[45389, 1329, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], Cell[CellGroupData[{ -Cell[47968, 1387, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], -Cell[48273, 1396, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], -Cell[48579, 1406, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], -Cell[48967, 1417, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], -Cell[49211, 1425, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] +Cell[48938, 1411, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], +Cell[49243, 1420, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], +Cell[49549, 1430, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], +Cell[49937, 1441, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], +Cell[50181, 1449, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[51465, 1494, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], +Cell[52435, 1518, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], Cell[CellGroupData[{ -Cell[51661, 1501, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], +Cell[52631, 1525, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], Cell[CellGroupData[{ -Cell[52068, 1515, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], -Cell[59597, 1732, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], +Cell[53038, 1539, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], +Cell[60567, 1756, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], Cell[CellGroupData[{ -Cell[63175, 1814, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], -Cell[63479, 1823, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], -Cell[63783, 1833, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], -Cell[64177, 1845, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], -Cell[64418, 1853, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] +Cell[64145, 1838, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], +Cell[64449, 1847, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], +Cell[64753, 1857, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], +Cell[65147, 1869, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], +Cell[65388, 1877, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[66963, 1932, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], +Cell[67933, 1956, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], Cell[CellGroupData[{ -Cell[67152, 1939, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], +Cell[68122, 1963, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], Cell[CellGroupData[{ -Cell[67404, 1948, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], +Cell[68374, 1972, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], Cell[CellGroupData[{ -Cell[69574, 2009, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], -Cell[69883, 2019, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] +Cell[70544, 2033, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], +Cell[70853, 2043, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] }, Open ]] }, Open ]] }, Open ]] From 7dc05fa3386bb53b5331f1c69b8aed630a9b26e9 Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 4 Mar 2024 16:29:55 -0700 Subject: [PATCH 06/13] save --- src/LogNormal/log_normal.nb | 212 ++++++++++++++++++------------------ 1 file changed, 109 insertions(+), 103 deletions(-) diff --git a/src/LogNormal/log_normal.nb b/src/LogNormal/log_normal.nb index ba561229..340b6c0f 100644 --- a/src/LogNormal/log_normal.nb +++ b/src/LogNormal/log_normal.nb @@ -3,10 +3,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 0, 0] -NotebookDataLength[ 79745, 2229] -NotebookOptionsPosition[ 71215, 2057] -NotebookOutlinePosition[ 71772, 2076] -CellTagsIndexPosition[ 71729, 2073] +NotebookDataLength[ 80164, 2235] +NotebookOptionsPosition[ 71634, 2063] +NotebookOutlinePosition[ 72191, 2082] +CellTagsIndexPosition[ 72148, 2079] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -350,9 +350,10 @@ Cell[BoxData[{ 3.918575751913149*^9}, {3.918576073288947*^9, 3.9185760735774183`*^9}, { 3.918576642017666*^9, 3.918576642103425*^9}, {3.918582513027935*^9, 3.918582513467471*^9}, {3.918582809143463*^9, 3.918582809217847*^9}, { - 3.918582876514236*^9, 3.918582923985523*^9}}, + 3.918582876514236*^9, 3.918582923985523*^9}, {3.918583425222728*^9, + 3.918583425376048*^9}, {3.918583546078206*^9, 3.918583546573629*^9}}, CellLabel-> - "In[1969]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], + "In[2072]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ @@ -361,8 +362,8 @@ Cell[BoxData[ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(K\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.918582925252103*^9},ExpressionUUID->"6de3a9a7-ba0a-48f3-b95c-\ -a5672ab093d5"], + 3.918583553940104*^9},ExpressionUUID->"c8c53f28-6e27-423c-8a5c-\ +4794ce2970b9"], Cell[BoxData[ RowBox[{ @@ -370,16 +371,16 @@ Cell[BoxData[ "EchoLabel"], " ", FractionBox["1", "2"]}]], "Echo", CellChangeTimes->{ - 3.9185829252865887`*^9},ExpressionUUID->"1fd66cda-69cc-43a9-a381-\ -04fed714617b"], + 3.918583553975247*^9},ExpressionUUID->"dc550320-6006-40be-9122-\ +c3bf89a67732"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Gamma]\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "0.995`"}]], "Echo", CellChangeTimes->{ - 3.918582925297202*^9},ExpressionUUID->"35529706-149c-407d-8516-\ -976104e1257d"] + 3.918583553983861*^9},ExpressionUUID->"71c5101c-44e1-43aa-8a32-\ +335221689632"] }, Open ]] }, Open ]] }, Open ]], @@ -406,7 +407,7 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1000000000", ",", " ", "1.1"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1000000000", ",", " ", "1.25"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -427,9 +428,11 @@ Cell[BoxData[{ 3.917515198755231*^9, 3.917515199530878*^9}, {3.918575982190796*^9, 3.918575982584321*^9}, {3.918582811121216*^9, 3.9185828112296124`*^9}, { 3.918582880689728*^9, 3.9185828808310337`*^9}, {3.918582926936624*^9, - 3.9185829296473217`*^9}, {3.91858299719833*^9, 3.918582997406849*^9}}, + 3.9185829296473217`*^9}, {3.91858299719833*^9, 3.918582997406849*^9}, { + 3.918583291020159*^9, 3.918583291177719*^9}, {3.918583428982098*^9, + 3.9185834291087303`*^9}, {3.918583548048421*^9, 3.918583551706524*^9}}, CellLabel-> - "In[1994]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], + "In[2074]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ @@ -439,16 +442,16 @@ Cell[BoxData[ \\!\\(\\*SubscriptBox[\\(x\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1000000000"}]], "Echo", CellChangeTimes->{ - 3.918582997858343*^9},ExpressionUUID->"8d7f8dfa-cf4d-4e7a-9b28-\ -a0d8608c639d"], + 3.918583555170699*^9},ExpressionUUID->"e579f41d-0400-49ac-8168-\ +5f3cab04fff4"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(S\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1.1`"}]], "Echo", + "EchoLabel"], " ", "1.25`"}]], "Echo", CellChangeTimes->{ - 3.918582997895363*^9},ExpressionUUID->"5f66860e-9855-4b07-8a22-\ -5f0ae740f01f"] + 3.918583555201631*^9},ExpressionUUID->"ec8acd37-6bc2-4d0e-91c3-\ +da81592e5c78"] }, Open ]] }, Open ]], @@ -510,7 +513,7 @@ Cell[BoxData[{ 3.918570990618823*^9, 3.918570994101475*^9}, {3.9185711059481163`*^9, 3.9185711082874823`*^9}}, CellLabel-> - "In[1996]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], + "In[2076]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ @@ -518,19 +521,19 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial liquidity is: \\!\\(\\*SubscriptBox[\\(L\\), \ \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "3.0326562752735147`*^9"}]], "Echo", + "EchoLabel"], " ", "4.113118587902806`*^9"}]], "Echo", CellChangeTimes->{ - 3.918582999935073*^9},ExpressionUUID->"d786b49f-052b-4006-9068-\ -ec0adea52029"], + 3.9185835569635773`*^9},ExpressionUUID->"d43384f5-006f-45e5-a92e-\ +25d9db0d35af"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial Y-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(y\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1.4445295894783616`*^9"}]], "Echo", + "EchoLabel"], " ", "2.376589831415242`*^9"}]], "Echo", CellChangeTimes->{ - 3.918582999966805*^9},ExpressionUUID->"1c75ef58-4f17-4970-95fd-\ -8a759a2435af"] + 3.918583556998584*^9},ExpressionUUID->"94e9320f-642e-4afc-908b-\ +19d770a8f8cf"] }, Open ]] }, Open ]] }, Open ]], @@ -580,15 +583,15 @@ Cell[BoxData[{ 3.911912928324705*^9, {3.9185711812613907`*^9, 3.918571185390046*^9}, { 3.91857169317227*^9, 3.918571699558569*^9}}, CellLabel-> - "In[1998]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], + "In[2078]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial price is: P = \"\>", - "EchoLabel"], " ", "1.1`"}]], "Echo", + "EchoLabel"], " ", "1.25`"}]], "Echo", CellChangeTimes->{ - 3.9185830019794073`*^9},ExpressionUUID->"3ff2d5d3-2b6e-4b97-980a-\ -c7bf6980d2ea"] + 3.9185835585061274`*^9},ExpressionUUID->"1fe00aba-5dd2-4d2d-a13c-\ +f83f9832cb62"] }, Open ]] }, Open ]], @@ -644,7 +647,7 @@ Cell[BoxData[{ 3.911409206365666*^9}, {3.918571188362344*^9, 3.918571190424653*^9}, { 3.9185717026957493`*^9, 3.918571706012089*^9}}, CellLabel-> - "In[2000]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] + "In[2080]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], @@ -766,9 +769,11 @@ Cell[BoxData[{ 3.9185818429293957`*^9, 3.9185818876898746`*^9}, {3.9185823204024343`*^9, 3.918582435530633*^9}, {3.918582488030525*^9, 3.918582492481691*^9}, { 3.918582676185212*^9, 3.918582684377091*^9}, {3.9185827212029133`*^9, - 3.918582726305999*^9}, {3.918582845001643*^9, 3.918582856707839*^9}}, + 3.918582726305999*^9}, {3.918582845001643*^9, 3.918582856707839*^9}, { + 3.91858350972567*^9, 3.918583524907681*^9}, {3.9185836349151993`*^9, + 3.918583689775346*^9}}, CellLabel-> - "In[2002]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], + "In[2108]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ @@ -793,6 +798,9 @@ Cell[BoxData[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ FractionBox["1", "2"], + FractionBox[ + SubscriptBox["S", "0"], + SubscriptBox["\[Mu]", "0"]], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", RowBox[{"YIn", ",", @@ -857,17 +865,17 @@ Cell[BoxData[{ SubscriptBox["\[Sigma]", "0"]}], "]"}], ",", " ", "\"\\""}], "]"}], ";"}]}], "Code", CellChangeTimes->CompressedData[" -1:eJxTTMoPSmViYGCQBGIQLfaXOfuC/ltHpmLmOhC9I/NDK4hOUVo6EURLTV2y +1:eJxTTMoPSmViYGCQAmIQLfaXOfuC/ltHpmLmOhC9I/NDK4hOUVo6EURLTV2y FERvCg5fAaInb7deA6Ljko+A6T3ixZtAdFHvLDC9fMPS3SDa4VfJHhDNKn73 EIiedfPZURB9ztHsCti+KOZrINotmuUriGZ/YPMNRJ9eN4P3IpDewjNHGEQX GN9VB9GfOCM1QPSyWcqhILozXjIORAc9ZiwE0W3/M0pBNM+xtkoQfSz4dS2I duruXgyiBbzvgGmfuE3nQXTJtk83QbTKtsvvRIzeOmZ+aPsEouPSdkuIAulv M++C6VfNXy3AfHtXSxAd0OMvKw6kGTQfy4Pon5mp3pJA2q1c2g9EhxVeT5AC -0qfc1dJA9KYwhhIQfU7yI5j+4lRYCaLlGsSrQPSTMOEuED2JeSaYBgDn1sMd - +0qfc1dJA9KYwhhIQfU7yI5j+4lRYCaLlGsSrQPSTMOEuED2JeSaYXv4t5DqI +7nbuvgmiAWQcyww= "], CellLabel-> - "In[2005]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], + "In[2111]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ @@ -875,37 +883,35 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"XOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "0.9050873517990112`"}]}]], "Echo", + RowBox[{"-", "0.7969475984573364`"}]}]], "Echo", CellChangeTimes->{ - 3.9185830080275784`*^9},ExpressionUUID->"e1118ffd-b385-4250-bff9-\ -df8bfdd9302b"], + 3.918583693215186*^9},ExpressionUUID->"dc98c57f-e446-42cf-a0a8-\ +08f592402e13"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", "EchoLabel"], " ", - RowBox[{"-", "1.1102230246251565`*^-16"}]}]], "Echo", + RowBox[{"-", "5.92303983637521`*^-13"}]}]], "Echo", CellChangeTimes->{ - 3.9185830080587883`*^9},ExpressionUUID->"6b64f7ad-62d2-4c23-a62f-\ -c0c18db864b6"], + 3.91858369324612*^9},ExpressionUUID->"2560ea19-05d8-41a9-84ab-4f3021950e44"], Cell[BoxData[ RowBox[{ TagBox["\<\"YOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "1.0936386585235596`"}]}]], "Echo", + RowBox[{"-", "1.2409334182739258`"}]}]], "Echo", CellChangeTimes->{ - 3.918583008066724*^9},ExpressionUUID->"3a3bbd45-564b-4322-8449-\ -bcd7296898d4"], + 3.9185836932545357`*^9},ExpressionUUID->"12ab682a-b8d3-46c0-a577-\ +e3fed30684d2"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", - RowBox[{"-", "1.1102230246251565`*^-16"}]}]], "Echo", + "EchoLabel"], " ", "1.1102230246251565`*^-16"}]], "Echo", CellChangeTimes->{ - 3.9185830080905657`*^9},ExpressionUUID->"a3a5e902-c65c-4cbc-a0a6-\ -34075aee731b"] + 3.9185836932806473`*^9},ExpressionUUID->"d39b55e5-cba6-4feb-a589-\ +e4d6a04d5437"] }, Open ]] }, Open ]] }, Open ]] @@ -2112,113 +2118,113 @@ Cell[9328, 287, 285, 7, 101, "Section",ExpressionUUID->"da815218-0c74-4720-a5c9- Cell[CellGroupData[{ Cell[9638, 298, 305, 7, 81, "Subsection",ExpressionUUID->"d461a415-44ca-4804-8248-6137a0f9449f"], Cell[CellGroupData[{ -Cell[9968, 309, 2183, 45, 105, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], +Cell[9968, 309, 2279, 46, 105, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ -Cell[12176, 358, 230, 6, 38, "Echo",ExpressionUUID->"6de3a9a7-ba0a-48f3-b95c-a5672ab093d5"], -Cell[12409, 366, 260, 7, 53, "Echo",ExpressionUUID->"1fd66cda-69cc-43a9-a381-04fed714617b"], -Cell[12672, 375, 242, 6, 38, "Echo",ExpressionUUID->"35529706-149c-407d-8516-976104e1257d"] +Cell[12272, 359, 230, 6, 38, "Echo",ExpressionUUID->"c8c53f28-6e27-423c-8a5c-4794ce2970b9"], +Cell[12505, 367, 258, 7, 53, "Echo",ExpressionUUID->"dc550320-6006-40be-9122-c3bf89a67732"], +Cell[12766, 376, 242, 6, 38, "Echo",ExpressionUUID->"71c5101c-44e1-43aa-8a32-335221689632"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[12975, 388, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], +Cell[13069, 389, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], Cell[CellGroupData[{ -Cell[13307, 399, 1432, 32, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], +Cell[13401, 400, 1581, 34, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ -Cell[14764, 435, 275, 7, 38, "Echo",ExpressionUUID->"8d7f8dfa-cf4d-4e7a-9b28-a0d8608c639d"], -Cell[15042, 444, 233, 6, 38, "Echo",ExpressionUUID->"5f66860e-9855-4b07-8a22-5f0ae740f01f"] +Cell[15007, 438, 275, 7, 38, "Echo",ExpressionUUID->"e579f41d-0400-49ac-8168-5f3cab04fff4"], +Cell[15285, 447, 234, 6, 38, "Echo",ExpressionUUID->"ec8acd37-6bc2-4d0e-91c3-da81592e5c78"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[15324, 456, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], +Cell[15568, 459, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], Cell[CellGroupData[{ -Cell[15600, 466, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], +Cell[15844, 469, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ -Cell[17369, 516, 279, 7, 38, "Echo",ExpressionUUID->"d786b49f-052b-4006-9068-ec0adea52029"], -Cell[17651, 525, 287, 7, 38, "Echo",ExpressionUUID->"1c75ef58-4f17-4970-95fd-8a759a2435af"] +Cell[17613, 519, 280, 7, 38, "Echo",ExpressionUUID->"d43384f5-006f-45e5-a92e-25d9db0d35af"], +Cell[17896, 528, 286, 7, 38, "Echo",ExpressionUUID->"94e9320f-642e-4afc-908b-19d770a8f8cf"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[17999, 539, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], +Cell[18243, 542, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], Cell[CellGroupData[{ -Cell[18248, 547, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], -Cell[19558, 584, 216, 6, 38, "Echo",ExpressionUUID->"3ff2d5d3-2b6e-4b97-980a-c7bf6980d2ea"] +Cell[18492, 550, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], +Cell[19802, 587, 217, 6, 38, "Echo",ExpressionUUID->"1fe00aba-5dd2-4d2d-a13c-f83f9832cb62"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[19823, 596, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], -Cell[20110, 604, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] +Cell[20068, 599, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], +Cell[20355, 607, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[21580, 653, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], +Cell[21825, 656, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], Cell[CellGroupData[{ -Cell[21760, 660, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], -Cell[22053, 669, 4408, 101, 194, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], +Cell[22005, 663, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], +Cell[22298, 672, 4509, 103, 194, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ -Cell[26486, 774, 3200, 95, 421, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], +Cell[26832, 779, 3298, 98, 421, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ -Cell[29711, 873, 230, 7, 38, "Echo",ExpressionUUID->"e1118ffd-b385-4250-bff9-df8bfdd9302b"], -Cell[29944, 882, 241, 7, 38, "Echo",ExpressionUUID->"6b64f7ad-62d2-4c23-a62f-c0c18db864b6"], -Cell[30188, 891, 228, 7, 38, "Echo",ExpressionUUID->"3a3bbd45-564b-4322-8449-bcd7296898d4"], -Cell[30419, 900, 241, 7, 38, "Echo",ExpressionUUID->"a3a5e902-c65c-4cbc-a0a6-34075aee731b"] +Cell[30155, 881, 228, 7, 38, "Echo",ExpressionUUID->"dc98c57f-e446-42cf-a0a8-08f592402e13"], +Cell[30386, 890, 234, 6, 38, "Echo",ExpressionUUID->"2560ea19-05d8-41a9-84ab-4f3021950e44"], +Cell[30623, 898, 230, 7, 38, "Echo",ExpressionUUID->"12ab682a-b8d3-46c0-a577-e3fed30684d2"], +Cell[30856, 907, 223, 6, 38, "Echo",ExpressionUUID->"d39b55e5-cba6-4feb-a589-e4d6a04d5437"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[30733, 915, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], -Cell[30940, 921, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], +Cell[31152, 921, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], +Cell[31359, 927, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], Cell[CellGroupData[{ -Cell[31533, 938, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], -Cell[32166, 955, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] +Cell[31952, 944, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], +Cell[32585, 961, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] }, Open ]], Cell[CellGroupData[{ -Cell[32887, 980, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], +Cell[33306, 986, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], Cell[CellGroupData[{ -Cell[33180, 988, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], +Cell[33599, 994, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], Cell[CellGroupData[{ -Cell[33665, 1004, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], -Cell[45389, 1329, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], +Cell[34084, 1010, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], +Cell[45808, 1335, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], Cell[CellGroupData[{ -Cell[48938, 1411, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], -Cell[49243, 1420, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], -Cell[49549, 1430, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], -Cell[49937, 1441, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], -Cell[50181, 1449, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] +Cell[49357, 1417, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], +Cell[49662, 1426, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], +Cell[49968, 1436, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], +Cell[50356, 1447, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], +Cell[50600, 1455, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[52435, 1518, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], +Cell[52854, 1524, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], Cell[CellGroupData[{ -Cell[52631, 1525, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], +Cell[53050, 1531, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], Cell[CellGroupData[{ -Cell[53038, 1539, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], -Cell[60567, 1756, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], +Cell[53457, 1545, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], +Cell[60986, 1762, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], Cell[CellGroupData[{ -Cell[64145, 1838, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], -Cell[64449, 1847, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], -Cell[64753, 1857, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], -Cell[65147, 1869, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], -Cell[65388, 1877, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] +Cell[64564, 1844, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], +Cell[64868, 1853, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], +Cell[65172, 1863, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], +Cell[65566, 1875, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], +Cell[65807, 1883, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[67933, 1956, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], +Cell[68352, 1962, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], Cell[CellGroupData[{ -Cell[68122, 1963, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], +Cell[68541, 1969, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], Cell[CellGroupData[{ -Cell[68374, 1972, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], +Cell[68793, 1978, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], Cell[CellGroupData[{ -Cell[70544, 2033, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], -Cell[70853, 2043, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] +Cell[70963, 2039, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], +Cell[71272, 2049, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] }, Open ]] }, Open ]] }, Open ]] From 41476694c4c40835d6cc2e86e908040582b137e3 Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 4 Mar 2024 16:40:19 -0700 Subject: [PATCH 07/13] works for S = K perfectly --- src/LogNormal/log_normal.nb | 237 +++++++++++++++++++----------------- 1 file changed, 123 insertions(+), 114 deletions(-) diff --git a/src/LogNormal/log_normal.nb b/src/LogNormal/log_normal.nb index 340b6c0f..26efd935 100644 --- a/src/LogNormal/log_normal.nb +++ b/src/LogNormal/log_normal.nb @@ -3,10 +3,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 0, 0] -NotebookDataLength[ 80164, 2235] -NotebookOptionsPosition[ 71634, 2063] -NotebookOutlinePosition[ 72191, 2082] -CellTagsIndexPosition[ 72148, 2079] +NotebookDataLength[ 81330, 2244] +NotebookOptionsPosition[ 72798, 2072] +NotebookOutlinePosition[ 73355, 2091] +CellTagsIndexPosition[ 73312, 2088] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -318,7 +318,7 @@ Cell[BoxData[{ SubscriptBox["\[Gamma]", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", RowBox[{"1", ",", " ", - FractionBox["1", "2"], ",", " ", "0.995"}], "}"}]}], ";"}], " "}], "\n", + FractionBox["1", "4"], ",", " ", "0.995"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -351,9 +351,10 @@ Cell[BoxData[{ 3.918576642017666*^9, 3.918576642103425*^9}, {3.918582513027935*^9, 3.918582513467471*^9}, {3.918582809143463*^9, 3.918582809217847*^9}, { 3.918582876514236*^9, 3.918582923985523*^9}, {3.918583425222728*^9, - 3.918583425376048*^9}, {3.918583546078206*^9, 3.918583546573629*^9}}, + 3.918583425376048*^9}, {3.918583546078206*^9, 3.918583546573629*^9}, { + 3.918584395359364*^9, 3.918584395834972*^9}}, CellLabel-> - "In[2072]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], + "In[2272]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ @@ -362,25 +363,24 @@ Cell[BoxData[ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(K\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.918583553940104*^9},ExpressionUUID->"c8c53f28-6e27-423c-8a5c-\ -4794ce2970b9"], + 3.918584396247592*^9},ExpressionUUID->"aab1c81d-cfc5-4d2b-8007-\ +0279a6972b9e"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Sigma]\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", - FractionBox["1", "2"]}]], "Echo", + FractionBox["1", "4"]}]], "Echo", CellChangeTimes->{ - 3.918583553975247*^9},ExpressionUUID->"dc550320-6006-40be-9122-\ -c3bf89a67732"], + 3.9185843962811623`*^9},ExpressionUUID->"b16e722c-3d60-475c-8418-\ +e69117c417f6"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Gamma]\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "0.995`"}]], "Echo", CellChangeTimes->{ - 3.918583553983861*^9},ExpressionUUID->"71c5101c-44e1-43aa-8a32-\ -335221689632"] + 3.91858439629158*^9},ExpressionUUID->"cca42629-2992-4776-8d20-cfe72c5e9e33"] }, Open ]] }, Open ]] }, Open ]], @@ -407,7 +407,7 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1000000000", ",", " ", "1.25"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1000000000", ",", " ", "1"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -430,9 +430,11 @@ Cell[BoxData[{ 3.918582880689728*^9, 3.9185828808310337`*^9}, {3.918582926936624*^9, 3.9185829296473217`*^9}, {3.91858299719833*^9, 3.918582997406849*^9}, { 3.918583291020159*^9, 3.918583291177719*^9}, {3.918583428982098*^9, - 3.9185834291087303`*^9}, {3.918583548048421*^9, 3.918583551706524*^9}}, + 3.9185834291087303`*^9}, {3.918583548048421*^9, 3.918583551706524*^9}, { + 3.918584158439363*^9, 3.918584158785482*^9}, {3.918584216906336*^9, + 3.9185842170754147`*^9}, {3.918584354834117*^9, 3.918584355139624*^9}}, CellLabel-> - "In[2074]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], + "In[2274]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ @@ -442,16 +444,16 @@ Cell[BoxData[ \\!\\(\\*SubscriptBox[\\(x\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1000000000"}]], "Echo", CellChangeTimes->{ - 3.918583555170699*^9},ExpressionUUID->"e579f41d-0400-49ac-8168-\ -5f3cab04fff4"], + 3.9185843979372873`*^9},ExpressionUUID->"be8bf032-0069-4657-8e96-\ +0ee23fe91652"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(S\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1.25`"}]], "Echo", + "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.918583555201631*^9},ExpressionUUID->"ec8acd37-6bc2-4d0e-91c3-\ -da81592e5c78"] + 3.9185843979729137`*^9},ExpressionUUID->"a5a784d5-80b4-4e48-82f7-\ +c3a4e0391d47"] }, Open ]] }, Open ]], @@ -513,7 +515,7 @@ Cell[BoxData[{ 3.918570990618823*^9, 3.918570994101475*^9}, {3.9185711059481163`*^9, 3.9185711082874823`*^9}}, CellLabel-> - "In[2076]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], + "In[2276]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ @@ -521,19 +523,19 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial liquidity is: \\!\\(\\*SubscriptBox[\\(L\\), \ \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "4.113118587902806`*^9"}]], "Echo", + "EchoLabel"], " ", "2.220930256899317255524578432`18.*^9"}]], "Echo", CellChangeTimes->{ - 3.9185835569635773`*^9},ExpressionUUID->"d43384f5-006f-45e5-a92e-\ -25d9db0d35af"], + 3.9185843992812157`*^9},ExpressionUUID->"5aca6835-d555-4962-9567-\ +e3c5397521d2"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial Y-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(y\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "2.376589831415242`*^9"}]], "Echo", + "EchoLabel"], " ", "1.`18.*^9"}]], "Echo", CellChangeTimes->{ - 3.918583556998584*^9},ExpressionUUID->"94e9320f-642e-4afc-908b-\ -19d770a8f8cf"] + 3.918584399317502*^9},ExpressionUUID->"93ced48d-dc4c-49ba-b38b-\ +5f4b8785f3b8"] }, Open ]] }, Open ]] }, Open ]], @@ -583,15 +585,15 @@ Cell[BoxData[{ 3.911912928324705*^9, {3.9185711812613907`*^9, 3.918571185390046*^9}, { 3.91857169317227*^9, 3.918571699558569*^9}}, CellLabel-> - "In[2078]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], + "In[2278]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial price is: P = \"\>", - "EchoLabel"], " ", "1.25`"}]], "Echo", + "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.9185835585061274`*^9},ExpressionUUID->"1fe00aba-5dd2-4d2d-a13c-\ -f83f9832cb62"] + 3.918584400756894*^9},ExpressionUUID->"4727ab0c-ccdd-4afc-a840-\ +98a5dbd0062f"] }, Open ]] }, Open ]], @@ -647,7 +649,7 @@ Cell[BoxData[{ 3.911409206365666*^9}, {3.918571188362344*^9, 3.918571190424653*^9}, { 3.9185717026957493`*^9, 3.918571706012089*^9}}, CellLabel-> - "In[2080]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] + "In[2280]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], @@ -771,9 +773,12 @@ Cell[BoxData[{ 3.918582676185212*^9, 3.918582684377091*^9}, {3.9185827212029133`*^9, 3.918582726305999*^9}, {3.918582845001643*^9, 3.918582856707839*^9}, { 3.91858350972567*^9, 3.918583524907681*^9}, {3.9185836349151993`*^9, - 3.918583689775346*^9}}, + 3.918583689775346*^9}, {3.918583814649831*^9, 3.918583887826089*^9}, + 3.918584019823391*^9, {3.918584115383397*^9, 3.918584125997015*^9}, { + 3.918584188749694*^9, 3.918584207807349*^9}, {3.918584252596579*^9, + 3.918584283333911*^9}, {3.9185843240947323`*^9, 3.9185843419430447`*^9}}, CellLabel-> - "In[2108]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], + "In[2282]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ @@ -798,9 +803,6 @@ Cell[BoxData[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ FractionBox["1", "2"], - FractionBox[ - SubscriptBox["S", "0"], - SubscriptBox["\[Mu]", "0"]], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", RowBox[{"YIn", ",", @@ -864,18 +866,26 @@ Cell[BoxData[{ SubscriptBox["\[Mu]", "0"], ",", SubscriptBox["\[Sigma]", "0"]}], "]"}], ",", " ", "\"\\""}], "]"}], ";"}]}], "Code", - CellChangeTimes->CompressedData[" -1:eJxTTMoPSmViYGCQAmIQLfaXOfuC/ltHpmLmOhC9I/NDK4hOUVo6EURLTV2y -FERvCg5fAaInb7deA6Ljko+A6T3ixZtAdFHvLDC9fMPS3SDa4VfJHhDNKn73 -EIiedfPZURB9ztHsCti+KOZrINotmuUriGZ/YPMNRJ9eN4P3IpDewjNHGEQX -GN9VB9GfOCM1QPSyWcqhILozXjIORAc9ZiwE0W3/M0pBNM+xtkoQfSz4dS2I -duruXgyiBbzvgGmfuE3nQXTJtk83QbTKtsvvRIzeOmZ+aPsEouPSdkuIAulv -M++C6VfNXy3AfHtXSxAd0OMvKw6kGTQfy4Pon5mp3pJA2q1c2g9EhxVeT5AC -0qfc1dJA9KYwhhIQfU7yI5j+4lRYCaLlGsSrQPSTMOEuED2JeSaYXv4t5DqI -7nbuvgmiAWQcyww= - "], + CellChangeTimes->{{3.9173824881246443`*^9, 3.917382640107789*^9}, { + 3.917382703512905*^9, 3.917382797160448*^9}, {3.917382957143201*^9, + 3.9173829787289667`*^9}, {3.917383009866159*^9, 3.91738301413713*^9}, { + 3.9173830595966473`*^9, 3.9173830608297663`*^9}, {3.917383133177814*^9, + 3.917383139655548*^9}, {3.91738319090906*^9, 3.9173832152140627`*^9}, { + 3.917383329695533*^9, 3.9173833441047373`*^9}, {3.917383592136142*^9, + 3.917383601902347*^9}, {3.917383788771337*^9, 3.9173838368765507`*^9}, { + 3.917383998912529*^9, 3.917384002782464*^9}, {3.917384361112628*^9, + 3.917384432792912*^9}, {3.917384584058999*^9, 3.917384619281192*^9}, { + 3.9173846522116756`*^9, 3.9173846873539762`*^9}, {3.9173849883607492`*^9, + 3.917384990884163*^9}, {3.917385341574011*^9, 3.917385423584772*^9}, { + 3.918571382615984*^9, 3.918571412216847*^9}, {3.918571717856246*^9, + 3.918571718925044*^9}, {3.918571975672353*^9, 3.9185719781640577`*^9}, { + 3.918575850485878*^9, 3.918575871098755*^9}, {3.918580315169186*^9, + 3.9185803368583097`*^9}, {3.918582534732585*^9, 3.9185825771962633`*^9}, { + 3.918582688010583*^9, 3.9185826955344*^9}, {3.918582731539423*^9, + 3.9185827367343893`*^9}, {3.918582864604357*^9, 3.918582868781686*^9}, { + 3.918583482655109*^9, 3.918583500351995*^9}, 3.9185843702651167`*^9}, CellLabel-> - "In[2111]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], + "In[2285]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ @@ -883,35 +893,34 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"XOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "0.7969475984573364`"}]}]], "Echo", + RowBox[{"-", "0.9950002431869507`"}]}]], "Echo", CellChangeTimes->{ - 3.918583693215186*^9},ExpressionUUID->"dc98c57f-e446-42cf-a0a8-\ -08f592402e13"], + 3.91858440490403*^9},ExpressionUUID->"9ebefba2-96a8-4726-a84e-97d67d23c7d5"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", - RowBox[{"-", "5.92303983637521`*^-13"}]}]], "Echo", + "EchoLabel"], " ", "0.`"}]], "Echo", CellChangeTimes->{ - 3.91858369324612*^9},ExpressionUUID->"2560ea19-05d8-41a9-84ab-4f3021950e44"], + 3.918584404939888*^9},ExpressionUUID->"3e3921ac-00ac-4edb-8b2e-\ +c0f6f9979c85"], Cell[BoxData[ RowBox[{ TagBox["\<\"YOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "1.2409334182739258`"}]}]], "Echo", + RowBox[{"-", "0.9950002431869507`"}]}]], "Echo", CellChangeTimes->{ - 3.9185836932545357`*^9},ExpressionUUID->"12ab682a-b8d3-46c0-a577-\ -e3fed30684d2"], + 3.9185844049482937`*^9},ExpressionUUID->"59b169d4-a98e-4b1d-8262-\ +d44ae8a2f2ac"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", "1.1102230246251565`*^-16"}]], "Echo", + "EchoLabel"], " ", "0.`"}]], "Echo", CellChangeTimes->{ - 3.9185836932806473`*^9},ExpressionUUID->"d39b55e5-cba6-4feb-a589-\ -e4d6a04d5437"] + 3.9185844049722443`*^9},ExpressionUUID->"89ed0b6d-caf4-426b-a017-\ +a3832aac19af"] }, Open ]] }, Open ]] }, Open ]] @@ -2118,113 +2127,113 @@ Cell[9328, 287, 285, 7, 101, "Section",ExpressionUUID->"da815218-0c74-4720-a5c9- Cell[CellGroupData[{ Cell[9638, 298, 305, 7, 81, "Subsection",ExpressionUUID->"d461a415-44ca-4804-8248-6137a0f9449f"], Cell[CellGroupData[{ -Cell[9968, 309, 2279, 46, 105, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], +Cell[9968, 309, 2329, 47, 105, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ -Cell[12272, 359, 230, 6, 38, "Echo",ExpressionUUID->"c8c53f28-6e27-423c-8a5c-4794ce2970b9"], -Cell[12505, 367, 258, 7, 53, "Echo",ExpressionUUID->"dc550320-6006-40be-9122-c3bf89a67732"], -Cell[12766, 376, 242, 6, 38, "Echo",ExpressionUUID->"71c5101c-44e1-43aa-8a32-335221689632"] +Cell[12322, 360, 230, 6, 38, "Echo",ExpressionUUID->"aab1c81d-cfc5-4d2b-8007-0279a6972b9e"], +Cell[12555, 368, 260, 7, 53, "Echo",ExpressionUUID->"b16e722c-3d60-475c-8418-e69117c417f6"], +Cell[12818, 377, 239, 5, 38, "Echo",ExpressionUUID->"cca42629-2992-4776-8d20-cfe72c5e9e33"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[13069, 389, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], +Cell[13118, 389, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], Cell[CellGroupData[{ -Cell[13401, 400, 1581, 34, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], +Cell[13450, 400, 1726, 36, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ -Cell[15007, 438, 275, 7, 38, "Echo",ExpressionUUID->"e579f41d-0400-49ac-8168-5f3cab04fff4"], -Cell[15285, 447, 234, 6, 38, "Echo",ExpressionUUID->"ec8acd37-6bc2-4d0e-91c3-da81592e5c78"] +Cell[15201, 440, 277, 7, 38, "Echo",ExpressionUUID->"be8bf032-0069-4657-8e96-0ee23fe91652"], +Cell[15481, 449, 232, 6, 38, "Echo",ExpressionUUID->"a5a784d5-80b4-4e48-82f7-c3a4e0391d47"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[15568, 459, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], +Cell[15762, 461, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], Cell[CellGroupData[{ -Cell[15844, 469, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], +Cell[16038, 471, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ -Cell[17613, 519, 280, 7, 38, "Echo",ExpressionUUID->"d43384f5-006f-45e5-a92e-25d9db0d35af"], -Cell[17896, 528, 286, 7, 38, "Echo",ExpressionUUID->"94e9320f-642e-4afc-908b-19d770a8f8cf"] +Cell[17807, 521, 295, 7, 38, "Echo",ExpressionUUID->"5aca6835-d555-4962-9567-e3c5397521d2"], +Cell[18105, 530, 274, 7, 38, "Echo",ExpressionUUID->"93ced48d-dc4c-49ba-b38b-5f4b8785f3b8"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[18243, 542, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], +Cell[18440, 544, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], Cell[CellGroupData[{ -Cell[18492, 550, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], -Cell[19802, 587, 217, 6, 38, "Echo",ExpressionUUID->"1fe00aba-5dd2-4d2d-a13c-f83f9832cb62"] +Cell[18689, 552, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], +Cell[19999, 589, 211, 6, 38, "Echo",ExpressionUUID->"4727ab0c-ccdd-4afc-a840-98a5dbd0062f"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[20068, 599, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], -Cell[20355, 607, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] +Cell[20259, 601, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], +Cell[20546, 609, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[21825, 656, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], +Cell[22016, 658, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], Cell[CellGroupData[{ -Cell[22005, 663, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], -Cell[22298, 672, 4509, 103, 194, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], +Cell[22196, 665, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], +Cell[22489, 674, 4777, 106, 194, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ -Cell[26832, 779, 3298, 98, 421, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], +Cell[27291, 784, 4061, 103, 421, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ -Cell[30155, 881, 228, 7, 38, "Echo",ExpressionUUID->"dc98c57f-e446-42cf-a0a8-08f592402e13"], -Cell[30386, 890, 234, 6, 38, "Echo",ExpressionUUID->"2560ea19-05d8-41a9-84ab-4f3021950e44"], -Cell[30623, 898, 230, 7, 38, "Echo",ExpressionUUID->"12ab682a-b8d3-46c0-a577-e3fed30684d2"], -Cell[30856, 907, 223, 6, 38, "Echo",ExpressionUUID->"d39b55e5-cba6-4feb-a589-e4d6a04d5437"] +Cell[31377, 891, 225, 6, 38, "Echo",ExpressionUUID->"9ebefba2-96a8-4726-a84e-97d67d23c7d5"], +Cell[31605, 899, 200, 6, 38, "Echo",ExpressionUUID->"3e3921ac-00ac-4edb-8b2e-c0f6f9979c85"], +Cell[31808, 907, 230, 7, 38, "Echo",ExpressionUUID->"59b169d4-a98e-4b1d-8262-d44ae8a2f2ac"], +Cell[32041, 916, 202, 6, 38, "Echo",ExpressionUUID->"89ed0b6d-caf4-426b-a017-a3832aac19af"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[31152, 921, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], -Cell[31359, 927, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], +Cell[32316, 930, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], +Cell[32523, 936, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], Cell[CellGroupData[{ -Cell[31952, 944, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], -Cell[32585, 961, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] +Cell[33116, 953, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], +Cell[33749, 970, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] }, Open ]], Cell[CellGroupData[{ -Cell[33306, 986, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], +Cell[34470, 995, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], Cell[CellGroupData[{ -Cell[33599, 994, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], +Cell[34763, 1003, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], Cell[CellGroupData[{ -Cell[34084, 1010, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], -Cell[45808, 1335, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], +Cell[35248, 1019, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], +Cell[46972, 1344, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], Cell[CellGroupData[{ -Cell[49357, 1417, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], -Cell[49662, 1426, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], -Cell[49968, 1436, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], -Cell[50356, 1447, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], -Cell[50600, 1455, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] +Cell[50521, 1426, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], +Cell[50826, 1435, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], +Cell[51132, 1445, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], +Cell[51520, 1456, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], +Cell[51764, 1464, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[52854, 1524, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], +Cell[54018, 1533, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], Cell[CellGroupData[{ -Cell[53050, 1531, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], +Cell[54214, 1540, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], Cell[CellGroupData[{ -Cell[53457, 1545, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], -Cell[60986, 1762, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], +Cell[54621, 1554, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], +Cell[62150, 1771, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], Cell[CellGroupData[{ -Cell[64564, 1844, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], -Cell[64868, 1853, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], -Cell[65172, 1863, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], -Cell[65566, 1875, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], -Cell[65807, 1883, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] +Cell[65728, 1853, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], +Cell[66032, 1862, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], +Cell[66336, 1872, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], +Cell[66730, 1884, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], +Cell[66971, 1892, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[68352, 1962, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], +Cell[69516, 1971, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], Cell[CellGroupData[{ -Cell[68541, 1969, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], +Cell[69705, 1978, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], Cell[CellGroupData[{ -Cell[68793, 1978, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], +Cell[69957, 1987, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], Cell[CellGroupData[{ -Cell[70963, 2039, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], -Cell[71272, 2049, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] +Cell[72127, 2048, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], +Cell[72436, 2058, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] }, Open ]] }, Open ]] }, Open ]] From 7dff2c975f98636fbb5ce227b3aa030f00c815b2 Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 4 Mar 2024 17:10:19 -0700 Subject: [PATCH 08/13] closer? --- src/LogNormal/log_normal.nb | 193 +++++++++++++++++++----------------- 1 file changed, 102 insertions(+), 91 deletions(-) diff --git a/src/LogNormal/log_normal.nb b/src/LogNormal/log_normal.nb index 26efd935..a547811c 100644 --- a/src/LogNormal/log_normal.nb +++ b/src/LogNormal/log_normal.nb @@ -3,10 +3,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 0, 0] -NotebookDataLength[ 81330, 2244] -NotebookOptionsPosition[ 72798, 2072] -NotebookOutlinePosition[ 73355, 2091] -CellTagsIndexPosition[ 73312, 2088] +NotebookDataLength[ 81748, 2255] +NotebookOptionsPosition[ 73215, 2083] +NotebookOutlinePosition[ 73772, 2102] +CellTagsIndexPosition[ 73729, 2099] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -407,7 +407,7 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1000000000", ",", " ", "1"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1000000000", ",", " ", "1.25"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -432,9 +432,10 @@ Cell[BoxData[{ 3.918583291020159*^9, 3.918583291177719*^9}, {3.918583428982098*^9, 3.9185834291087303`*^9}, {3.918583548048421*^9, 3.918583551706524*^9}, { 3.918584158439363*^9, 3.918584158785482*^9}, {3.918584216906336*^9, - 3.9185842170754147`*^9}, {3.918584354834117*^9, 3.918584355139624*^9}}, + 3.9185842170754147`*^9}, {3.918584354834117*^9, 3.918584355139624*^9}, { + 3.918584446835289*^9, 3.918584447252163*^9}}, CellLabel-> - "In[2274]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], + "In[2295]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ @@ -444,16 +445,16 @@ Cell[BoxData[ \\!\\(\\*SubscriptBox[\\(x\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1000000000"}]], "Echo", CellChangeTimes->{ - 3.9185843979372873`*^9},ExpressionUUID->"be8bf032-0069-4657-8e96-\ -0ee23fe91652"], + 3.9185844477146397`*^9},ExpressionUUID->"d7b66282-ccf5-4a61-b050-\ +e5369432ea02"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(S\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1"}]], "Echo", + "EchoLabel"], " ", "1.25`"}]], "Echo", CellChangeTimes->{ - 3.9185843979729137`*^9},ExpressionUUID->"a5a784d5-80b4-4e48-82f7-\ -c3a4e0391d47"] + 3.9185844477551947`*^9},ExpressionUUID->"340222fe-c633-43e4-bcba-\ +01526539e08e"] }, Open ]] }, Open ]], @@ -515,7 +516,7 @@ Cell[BoxData[{ 3.918570990618823*^9, 3.918570994101475*^9}, {3.9185711059481163`*^9, 3.9185711082874823`*^9}}, CellLabel-> - "In[2276]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], + "In[2297]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ @@ -523,19 +524,19 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial liquidity is: \\!\\(\\*SubscriptBox[\\(L\\), \ \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "2.220930256899317255524578432`18.*^9"}]], "Echo", + "EchoLabel"], " ", "6.474999117447036`*^9"}]], "Echo", CellChangeTimes->{ - 3.9185843992812157`*^9},ExpressionUUID->"5aca6835-d555-4962-9567-\ -e3c5397521d2"], + 3.918584449161414*^9},ExpressionUUID->"e3081357-70e4-4b4e-afcb-\ +1060b0eb7683"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial Y-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(y\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1.`18.*^9"}]], "Echo", + "EchoLabel"], " ", "5.041627941250906`*^9"}]], "Echo", CellChangeTimes->{ - 3.918584399317502*^9},ExpressionUUID->"93ced48d-dc4c-49ba-b38b-\ -5f4b8785f3b8"] + 3.918584449197938*^9},ExpressionUUID->"9ef66918-0e39-406d-b6bc-\ +23b4ca68d567"] }, Open ]] }, Open ]] }, Open ]], @@ -585,15 +586,15 @@ Cell[BoxData[{ 3.911912928324705*^9, {3.9185711812613907`*^9, 3.918571185390046*^9}, { 3.91857169317227*^9, 3.918571699558569*^9}}, CellLabel-> - "In[2278]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], + "In[2299]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial price is: P = \"\>", - "EchoLabel"], " ", "1"}]], "Echo", + "EchoLabel"], " ", "1.25`"}]], "Echo", CellChangeTimes->{ - 3.918584400756894*^9},ExpressionUUID->"4727ab0c-ccdd-4afc-a840-\ -98a5dbd0062f"] + 3.918584450921071*^9},ExpressionUUID->"17d3d6dc-6f36-435e-8e73-\ +faa74dfd6a32"] }, Open ]] }, Open ]], @@ -649,7 +650,7 @@ Cell[BoxData[{ 3.911409206365666*^9}, {3.918571188362344*^9, 3.918571190424653*^9}, { 3.9185717026957493`*^9, 3.918571706012089*^9}}, CellLabel-> - "In[2280]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] + "In[2301]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], @@ -776,9 +777,10 @@ Cell[BoxData[{ 3.918583689775346*^9}, {3.918583814649831*^9, 3.918583887826089*^9}, 3.918584019823391*^9, {3.918584115383397*^9, 3.918584125997015*^9}, { 3.918584188749694*^9, 3.918584207807349*^9}, {3.918584252596579*^9, - 3.918584283333911*^9}, {3.9185843240947323`*^9, 3.9185843419430447`*^9}}, + 3.918584283333911*^9}, {3.9185843240947323`*^9, 3.9185843419430447`*^9}, { + 3.918584596408697*^9, 3.918584605431155*^9}}, CellLabel-> - "In[2282]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], + "In[2326]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ @@ -797,8 +799,11 @@ Cell[BoxData[{ SubscriptBox["\[Sigma]", "0"], ",", SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", RowBox[{ - RowBox[{"Echo", "[", - RowBox[{"XOut", ",", " ", "\"\\""}], "]"}], ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", + RowBox[{"XOut", ",", " ", "\"\\""}], "]"}], ";"}], " ", + RowBox[{"(*", " ", + RowBox[{"Should", " ", "be", " ", "1.24375"}], " ", "*)"}]}], "\n", RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ @@ -839,8 +844,11 @@ Cell[BoxData[{ SubscriptBox["\[Sigma]", "0"], ",", SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", RowBox[{ - RowBox[{"Echo", "[", - RowBox[{"YOut", ",", " ", "\"\\""}], "]"}], ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", + RowBox[{"YOut", ",", " ", "\"\\""}], "]"}], ";"}], " ", + RowBox[{"(*", " ", + RowBox[{"Should", " ", "be", " ", ".796"}], " ", "*)"}]}], "\n", RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ @@ -883,9 +891,10 @@ Cell[BoxData[{ 3.9185803368583097`*^9}, {3.918582534732585*^9, 3.9185825771962633`*^9}, { 3.918582688010583*^9, 3.9185826955344*^9}, {3.918582731539423*^9, 3.9185827367343893`*^9}, {3.918582864604357*^9, 3.918582868781686*^9}, { - 3.918583482655109*^9, 3.918583500351995*^9}, 3.9185843702651167`*^9}, - CellLabel-> - "In[2285]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], + 3.918583482655109*^9, 3.918583500351995*^9}, 3.9185843702651167`*^9, { + 3.918584645054994*^9, + 3.9185846751565027`*^9}},ExpressionUUID->"2687c350-1150-4951-bcf0-\ +28364fa5bf73"], Cell[CellGroupData[{ @@ -893,34 +902,36 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"XOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "0.9950002431869507`"}]}]], "Echo", + RowBox[{"-", "0.7975035905838013`"}]}]], "Echo", CellChangeTimes->{ - 3.91858440490403*^9},ExpressionUUID->"9ebefba2-96a8-4726-a84e-97d67d23c7d5"], + 3.918584456007188*^9},ExpressionUUID->"a2980cec-938c-4e9c-a1ac-\ +2bb327818fb7"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", "0.`"}]], "Echo", + "EchoLabel"], " ", + RowBox[{"-", "2.220446049250313`*^-16"}]}]], "Echo", CellChangeTimes->{ - 3.918584404939888*^9},ExpressionUUID->"3e3921ac-00ac-4edb-8b2e-\ -c0f6f9979c85"], + 3.918584456041801*^9},ExpressionUUID->"768ab9e6-6ad3-4b5f-b157-\ +2bf161d2d395"], Cell[BoxData[ RowBox[{ TagBox["\<\"YOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "0.9950002431869507`"}]}]], "Echo", + RowBox[{"-", "1.2342700958251953`"}]}]], "Echo", CellChangeTimes->{ - 3.9185844049482937`*^9},ExpressionUUID->"59b169d4-a98e-4b1d-8262-\ -d44ae8a2f2ac"], + 3.9185844560501013`*^9},ExpressionUUID->"22863c93-5e22-404d-a4b1-\ +c66192081160"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", "0.`"}]], "Echo", + "EchoLabel"], " ", + RowBox[{"-", "2.220446049250313`*^-16"}]}]], "Echo", CellChangeTimes->{ - 3.9185844049722443`*^9},ExpressionUUID->"89ed0b6d-caf4-426b-a017-\ -a3832aac19af"] + 3.9185844560737*^9},ExpressionUUID->"3bb1ba96-c9bf-461a-8beb-3a324d045c5d"] }, Open ]] }, Open ]] }, Open ]] @@ -2138,102 +2149,102 @@ Cell[12818, 377, 239, 5, 38, "Echo",ExpressionUUID->"cca42629-2992-4776-8d20-cfe Cell[CellGroupData[{ Cell[13118, 389, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], Cell[CellGroupData[{ -Cell[13450, 400, 1726, 36, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], +Cell[13450, 400, 1779, 37, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ -Cell[15201, 440, 277, 7, 38, "Echo",ExpressionUUID->"be8bf032-0069-4657-8e96-0ee23fe91652"], -Cell[15481, 449, 232, 6, 38, "Echo",ExpressionUUID->"a5a784d5-80b4-4e48-82f7-c3a4e0391d47"] +Cell[15254, 441, 277, 7, 38, "Echo",ExpressionUUID->"d7b66282-ccf5-4a61-b050-e5369432ea02"], +Cell[15534, 450, 236, 6, 38, "Echo",ExpressionUUID->"340222fe-c633-43e4-bcba-01526539e08e"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[15762, 461, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], +Cell[15819, 462, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], Cell[CellGroupData[{ -Cell[16038, 471, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], +Cell[16095, 472, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ -Cell[17807, 521, 295, 7, 38, "Echo",ExpressionUUID->"5aca6835-d555-4962-9567-e3c5397521d2"], -Cell[18105, 530, 274, 7, 38, "Echo",ExpressionUUID->"93ced48d-dc4c-49ba-b38b-5f4b8785f3b8"] +Cell[17864, 522, 278, 7, 38, "Echo",ExpressionUUID->"e3081357-70e4-4b4e-afcb-1060b0eb7683"], +Cell[18145, 531, 286, 7, 38, "Echo",ExpressionUUID->"9ef66918-0e39-406d-b6bc-23b4ca68d567"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[18440, 544, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], +Cell[18492, 545, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], Cell[CellGroupData[{ -Cell[18689, 552, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], -Cell[19999, 589, 211, 6, 38, "Echo",ExpressionUUID->"4727ab0c-ccdd-4afc-a840-98a5dbd0062f"] +Cell[18741, 553, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], +Cell[20051, 590, 215, 6, 38, "Echo",ExpressionUUID->"17d3d6dc-6f36-435e-8e73-faa74dfd6a32"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[20259, 601, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], -Cell[20546, 609, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] +Cell[20315, 602, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], +Cell[20602, 610, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[22016, 658, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], +Cell[22072, 659, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], Cell[CellGroupData[{ -Cell[22196, 665, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], -Cell[22489, 674, 4777, 106, 194, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], +Cell[22252, 666, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], +Cell[22545, 675, 4827, 107, 194, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ -Cell[27291, 784, 4061, 103, 421, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], +Cell[27397, 786, 4299, 110, 421, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ -Cell[31377, 891, 225, 6, 38, "Echo",ExpressionUUID->"9ebefba2-96a8-4726-a84e-97d67d23c7d5"], -Cell[31605, 899, 200, 6, 38, "Echo",ExpressionUUID->"3e3921ac-00ac-4edb-8b2e-c0f6f9979c85"], -Cell[31808, 907, 230, 7, 38, "Echo",ExpressionUUID->"59b169d4-a98e-4b1d-8262-d44ae8a2f2ac"], -Cell[32041, 916, 202, 6, 38, "Echo",ExpressionUUID->"89ed0b6d-caf4-426b-a017-a3832aac19af"] +Cell[31721, 900, 228, 7, 38, "Echo",ExpressionUUID->"a2980cec-938c-4e9c-a1ac-2bb327818fb7"], +Cell[31952, 909, 238, 7, 38, "Echo",ExpressionUUID->"768ab9e6-6ad3-4b5f-b157-2bf161d2d395"], +Cell[32193, 918, 230, 7, 38, "Echo",ExpressionUUID->"22863c93-5e22-404d-a4b1-c66192081160"], +Cell[32426, 927, 234, 6, 38, "Echo",ExpressionUUID->"3bb1ba96-c9bf-461a-8beb-3a324d045c5d"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[32316, 930, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], -Cell[32523, 936, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], +Cell[32733, 941, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], +Cell[32940, 947, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], Cell[CellGroupData[{ -Cell[33116, 953, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], -Cell[33749, 970, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] +Cell[33533, 964, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], +Cell[34166, 981, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] }, Open ]], Cell[CellGroupData[{ -Cell[34470, 995, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], +Cell[34887, 1006, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], Cell[CellGroupData[{ -Cell[34763, 1003, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], +Cell[35180, 1014, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], Cell[CellGroupData[{ -Cell[35248, 1019, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], -Cell[46972, 1344, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], +Cell[35665, 1030, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], +Cell[47389, 1355, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], Cell[CellGroupData[{ -Cell[50521, 1426, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], -Cell[50826, 1435, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], -Cell[51132, 1445, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], -Cell[51520, 1456, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], -Cell[51764, 1464, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] +Cell[50938, 1437, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], +Cell[51243, 1446, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], +Cell[51549, 1456, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], +Cell[51937, 1467, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], +Cell[52181, 1475, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[54018, 1533, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], +Cell[54435, 1544, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], Cell[CellGroupData[{ -Cell[54214, 1540, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], +Cell[54631, 1551, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], Cell[CellGroupData[{ -Cell[54621, 1554, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], -Cell[62150, 1771, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], +Cell[55038, 1565, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], +Cell[62567, 1782, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], Cell[CellGroupData[{ -Cell[65728, 1853, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], -Cell[66032, 1862, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], -Cell[66336, 1872, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], -Cell[66730, 1884, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], -Cell[66971, 1892, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] +Cell[66145, 1864, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], +Cell[66449, 1873, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], +Cell[66753, 1883, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], +Cell[67147, 1895, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], +Cell[67388, 1903, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[69516, 1971, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], +Cell[69933, 1982, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], Cell[CellGroupData[{ -Cell[69705, 1978, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], +Cell[70122, 1989, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], Cell[CellGroupData[{ -Cell[69957, 1987, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], +Cell[70374, 1998, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], Cell[CellGroupData[{ -Cell[72127, 2048, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], -Cell[72436, 2058, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] +Cell[72544, 2059, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], +Cell[72853, 2069, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] }, Open ]] }, Open ]] }, Open ]] From a035d4fe48776306f368d4baacaeea7fca9bfe3a Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Tue, 5 Mar 2024 09:54:13 -0700 Subject: [PATCH 09/13] fee seems to work --- src/LogNormal/log_normal.nb | 622 ++++++++++++++++++++++++------------ 1 file changed, 414 insertions(+), 208 deletions(-) diff --git a/src/LogNormal/log_normal.nb b/src/LogNormal/log_normal.nb index a547811c..d4d71aaf 100644 --- a/src/LogNormal/log_normal.nb +++ b/src/LogNormal/log_normal.nb @@ -3,10 +3,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 0, 0] -NotebookDataLength[ 81748, 2255] -NotebookOptionsPosition[ 73215, 2083] -NotebookOutlinePosition[ 73772, 2102] -CellTagsIndexPosition[ 73729, 2099] +NotebookDataLength[ 92830, 2461] +NotebookOptionsPosition[ 83752, 2282] +NotebookOutlinePosition[ 84311, 2301] +CellTagsIndexPosition[ 84268, 2298] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -50,7 +50,7 @@ Cell[BoxData[ CellChangeTimes->{{3.91138727840687*^9, 3.911387281430051*^9}, { 3.911387543969853*^9, 3.911387555514419*^9}}, CellLabel-> - "In[1492]:=",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] + "In[3266]:=",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] }, Open ]], Cell[CellGroupData[{ @@ -79,7 +79,7 @@ Cell[BoxData[{ 3.917383102823773*^9}, {3.9173831552741337`*^9, 3.917383158507695*^9}, 3.917383532443891*^9}, CellLabel-> - "In[1493]:=",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] + "In[3833]:=",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] }, Open ]], Cell[CellGroupData[{ @@ -120,7 +120,7 @@ Cell[BoxData[{ 3.911383144055451*^9, 3.911383310823001*^9}, {3.9113851030677443`*^9, 3.91138511600043*^9}, 3.9185709112502613`*^9}, CellLabel-> - "In[1495]:=",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] + "In[3835]:=",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] }, Open ]], Cell[CellGroupData[{ @@ -203,7 +203,7 @@ Cell[BoxData[{ 3.911385324670476*^9, 3.911385325035862*^9}, {3.911409187909778*^9, 3.9114091880800257`*^9}, 3.9185709187863417`*^9}, CellLabel-> - "In[1497]:=",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] + "In[3837]:=",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] }, Open ]], Cell[CellGroupData[{ @@ -252,7 +252,7 @@ Cell[BoxData[{ CellChangeTimes->{{3.9113839769604807`*^9, 3.911384029460125*^9}, { 3.911385062781126*^9, 3.911385091502931*^9}, 3.91857093005863*^9}, CellLabel-> - "In[1501]:=",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] + "In[3841]:=",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] }, Open ]], Cell[CellGroupData[{ @@ -278,7 +278,7 @@ Cell[BoxData[ CellChangeTimes->{{3.911410806554799*^9, 3.911410882453505*^9}, { 3.9114109468550673`*^9, 3.9114109866059113`*^9}, 3.9185709352254477`*^9}, CellLabel-> - "In[1503]:=",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] + "In[3843]:=",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] }, Open ]] }, Open ]] }, Open ]], @@ -352,9 +352,14 @@ Cell[BoxData[{ 3.918582513467471*^9}, {3.918582809143463*^9, 3.918582809217847*^9}, { 3.918582876514236*^9, 3.918582923985523*^9}, {3.918583425222728*^9, 3.918583425376048*^9}, {3.918583546078206*^9, 3.918583546573629*^9}, { - 3.918584395359364*^9, 3.918584395834972*^9}}, + 3.918584395359364*^9, 3.918584395834972*^9}, {3.9185864064676332`*^9, + 3.918586406580247*^9}, {3.918587050341199*^9, 3.918587075189999*^9}, { + 3.918588451693397*^9, 3.918588451829137*^9}, {3.918630585921973*^9, + 3.918630585996049*^9}, {3.9186306784955587`*^9, 3.918630678602592*^9}, { + 3.918631219716024*^9, 3.918631219811838*^9}, {3.918631276745323*^9, + 3.9186312768635263`*^9}}, CellLabel-> - "In[2272]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], + "In[3844]:=",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ @@ -363,8 +368,8 @@ Cell[BoxData[ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(K\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.918584396247592*^9},ExpressionUUID->"aab1c81d-cfc5-4d2b-8007-\ -0279a6972b9e"], + 3.9186459576704597`*^9},ExpressionUUID->"63fa2685-ead2-42c3-8894-\ +aa3d0f759278"], Cell[BoxData[ RowBox[{ @@ -372,15 +377,16 @@ Cell[BoxData[ "EchoLabel"], " ", FractionBox["1", "4"]}]], "Echo", CellChangeTimes->{ - 3.9185843962811623`*^9},ExpressionUUID->"b16e722c-3d60-475c-8418-\ -e69117c417f6"], + 3.918645957703246*^9},ExpressionUUID->"ab767d72-08f9-45a3-8d7a-\ +62a93aac3a75"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(\[Gamma]\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "0.995`"}]], "Echo", CellChangeTimes->{ - 3.91858439629158*^9},ExpressionUUID->"cca42629-2992-4776-8d20-cfe72c5e9e33"] + 3.918645957713688*^9},ExpressionUUID->"865ae55a-ba52-403c-9134-\ +dd94b3a70090"] }, Open ]] }, Open ]] }, Open ]], @@ -407,7 +413,7 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1000000000", ",", " ", "1.25"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1000000000", ",", " ", "1"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -433,9 +439,17 @@ Cell[BoxData[{ 3.9185834291087303`*^9}, {3.918583548048421*^9, 3.918583551706524*^9}, { 3.918584158439363*^9, 3.918584158785482*^9}, {3.918584216906336*^9, 3.9185842170754147`*^9}, {3.918584354834117*^9, 3.918584355139624*^9}, { - 3.918584446835289*^9, 3.918584447252163*^9}}, + 3.918584446835289*^9, 3.918584447252163*^9}, {3.918585317499875*^9, + 3.918585320001732*^9}, {3.918585959285797*^9, 3.918585960380043*^9}, { + 3.918587011890151*^9, 3.9185870122509117`*^9}, {3.91858707864706*^9, + 3.918587079216874*^9}, {3.9186305834832478`*^9, 3.918630583772887*^9}, { + 3.918630681419763*^9, 3.918630681553543*^9}, {3.9186312811761227`*^9, + 3.9186312818709307`*^9}, 3.918631349127054*^9, {3.918631421837872*^9, + 3.918631422168438*^9}, {3.918631663100456*^9, 3.9186316633223667`*^9}, { + 3.918643343448288*^9, 3.918643343752068*^9}, {3.918646106269537*^9, + 3.918646106440174*^9}, {3.918646277573381*^9, 3.918646277908587*^9}}, CellLabel-> - "In[2295]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], + "In[4032]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ @@ -445,16 +459,16 @@ Cell[BoxData[ \\!\\(\\*SubscriptBox[\\(x\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1000000000"}]], "Echo", CellChangeTimes->{ - 3.9185844477146397`*^9},ExpressionUUID->"d7b66282-ccf5-4a61-b050-\ -e5369432ea02"], + 3.918646278194686*^9},ExpressionUUID->"9d2b3d97-b3e0-48ae-a043-\ +c2fe93fefab5"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(S\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1.25`"}]], "Echo", + "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.9185844477551947`*^9},ExpressionUUID->"340222fe-c633-43e4-bcba-\ -01526539e08e"] + 3.9186462782292747`*^9},ExpressionUUID->"325d0f09-c927-4e0e-819b-\ +0a3df79f6b2e"] }, Open ]] }, Open ]], @@ -516,7 +530,7 @@ Cell[BoxData[{ 3.918570990618823*^9, 3.918570994101475*^9}, {3.9185711059481163`*^9, 3.9185711082874823`*^9}}, CellLabel-> - "In[2297]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], + "In[4034]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ @@ -524,19 +538,19 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial liquidity is: \\!\\(\\*SubscriptBox[\\(L\\), \ \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "6.474999117447036`*^9"}]], "Echo", + "EchoLabel"], " ", "2.220930256899317255524578432`18.*^9"}]], "Echo", CellChangeTimes->{ - 3.918584449161414*^9},ExpressionUUID->"e3081357-70e4-4b4e-afcb-\ -1060b0eb7683"], + 3.918646279474539*^9},ExpressionUUID->"4674d060-49c9-4219-9efd-\ +fc644a8caf6f"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial Y-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(y\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "5.041627941250906`*^9"}]], "Echo", + "EchoLabel"], " ", "1.`18.*^9"}]], "Echo", CellChangeTimes->{ - 3.918584449197938*^9},ExpressionUUID->"9ef66918-0e39-406d-b6bc-\ -23b4ca68d567"] + 3.918646279509403*^9},ExpressionUUID->"08110232-f66b-4e27-8547-\ +3a897336da48"] }, Open ]] }, Open ]] }, Open ]], @@ -586,15 +600,15 @@ Cell[BoxData[{ 3.911912928324705*^9, {3.9185711812613907`*^9, 3.918571185390046*^9}, { 3.91857169317227*^9, 3.918571699558569*^9}}, CellLabel-> - "In[2299]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], + "In[4036]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial price is: P = \"\>", - "EchoLabel"], " ", "1.25`"}]], "Echo", + "EchoLabel"], " ", "1"}]], "Echo", CellChangeTimes->{ - 3.918584450921071*^9},ExpressionUUID->"17d3d6dc-6f36-435e-8e73-\ -faa74dfd6a32"] + 3.918646280600171*^9},ExpressionUUID->"d259291b-abcf-436d-86e9-\ +f78a15b5625f"] }, Open ]] }, Open ]], @@ -650,7 +664,7 @@ Cell[BoxData[{ 3.911409206365666*^9}, {3.918571188362344*^9, 3.918571190424653*^9}, { 3.9185717026957493`*^9, 3.918571706012089*^9}}, CellLabel-> - "In[2301]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] + "In[4038]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], @@ -673,6 +687,8 @@ reserve.\ 3.911388067027336*^9}},ExpressionUUID->"2f7348b3-443c-4a22-943e-\ 943b7962999e"], +Cell[CellGroupData[{ + Cell[BoxData[{ RowBox[{ RowBox[{ @@ -694,11 +710,13 @@ Cell[BoxData[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox["1", "2"], + FractionBox["L", + RowBox[{ + RowBox[{ + SubscriptBox["S", "0"], " ", "x"}], " ", "+", " ", "y"}]], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], - FractionBox["L", "y"]}]}], ")"}], + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], ")"}], RowBox[{"\[CapitalPhi]", "[", RowBox[{ RowBox[{"-", "\[Sigma]"}], " ", "-", " ", @@ -710,12 +728,14 @@ Cell[BoxData[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox["1", "2"], + FractionBox["L", + RowBox[{ + RowBox[{ + SubscriptBox["S", "0"], " ", "x"}], " ", "+", " ", "y"}]], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], - FractionBox["L", "y"]}]}], ")"}]}]], "]"}]}], "]"}]}], "-", - "x"}]}], "\n", + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], + ")"}]}]], "]"}]}], "]"}]}], "-", "x"}]}], "\n", RowBox[{ RowBox[{ SubscriptBox["\[CapitalDelta]", "Y"], "[", @@ -727,11 +747,15 @@ Cell[BoxData[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox["1", "2"], + FractionBox[ + RowBox[{ + SubscriptBox["S", "0"], "L"}], + RowBox[{ + RowBox[{ + SubscriptBox["S", "0"], " ", "x"}], " ", "+", " ", "y"}]], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], - FractionBox["L", "x"]}]}], ")"}], + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], ")"}], RowBox[{"\[CapitalPhi]", "[", RowBox[{ RowBox[{"-", "\[Sigma]"}], " ", "-", " ", @@ -741,12 +765,68 @@ Cell[BoxData[{ RowBox[{"x", "+", "\[CapitalDelta]"}], RowBox[{"L", "+", RowBox[{ - FractionBox["1", "2"], + FractionBox[ + RowBox[{ + SubscriptBox["S", "0"], "L"}], + RowBox[{ + RowBox[{ + SubscriptBox["S", "0"], " ", "x"}], " ", "+", " ", "y"}]], RowBox[{ SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], - FractionBox["L", "x"]}]}]], "]"}]}], "]"}]}], "-", "y"}]}]}], "Code",\ - + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}]], "]"}]}], + "]"}]}], "-", "y"}]}], "\n", + RowBox[{"\[CapitalPhi]", "[", + FractionBox[ + RowBox[{ + RowBox[{"Log", "[", + SubscriptBox["S", "0"], "]"}], "-", + RowBox[{"Log", "[", "\[Mu]", "]"}]}], "\[Sigma]"], "]"}], "\n", + RowBox[{ + FractionBox[ + SubscriptBox["L", "0"], + RowBox[{ + SubscriptBox["x", "0"], "+", + SubscriptBox["y", "0"]}]], + FractionBox[ + RowBox[{ + SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"\[CapitalDelta]", ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}], + SubscriptBox["y", "0"]], + SubscriptBox["L", "0"]}], "\n", + RowBox[{ + RowBox[{ + FractionBox["L", + RowBox[{"x", "+", "y"}]], + RowBox[{ + SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"\[CapitalDelta]", ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}]}], "\n", + RowBox[{"(*", " ", + RowBox[{ + "Should", " ", "use", " ", "the", " ", "insight", " ", "from", " ", "G3M", + " ", "that", " ", "the", " ", "weight", " ", "we", " ", "need", " ", "to", + " ", "add", " ", "is", " ", "by", " ", "value"}], "*)"}], "\n"}], "\n", + RowBox[{"N", "[", + FractionBox[ + RowBox[{"1", "-", + RowBox[{"\[CapitalPhi]", "[", + RowBox[{ + SubscriptBox["d", "1"], "[", + RowBox[{ + SubscriptBox["S", "0"], ",", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"]}], "]"}], "]"}]}], + RowBox[{ + SubscriptBox["\[Mu]", "0"], " "}]], "]"}], "\n", + RowBox[{"N", "[", + FractionBox[ + SubscriptBox["x", "0"], + RowBox[{ + RowBox[{ + SubscriptBox["S", "0"], " ", + SubscriptBox["x", "0"]}], " ", "+", " ", + SubscriptBox["y", "0"]}]], "]"}]}], "Code", CellChangeTimes->{{3.9113879019426517`*^9, 3.91138810608572*^9}, { 3.911388182414874*^9, 3.911388482660475*^9}, {3.911388787674255*^9, 3.911388979350903*^9}, {3.911389141187207*^9, 3.911389159323999*^9}, { @@ -778,9 +858,128 @@ Cell[BoxData[{ 3.918584019823391*^9, {3.918584115383397*^9, 3.918584125997015*^9}, { 3.918584188749694*^9, 3.918584207807349*^9}, {3.918584252596579*^9, 3.918584283333911*^9}, {3.9185843240947323`*^9, 3.9185843419430447`*^9}, { - 3.918584596408697*^9, 3.918584605431155*^9}}, + 3.918584596408697*^9, 3.918584605431155*^9}, {3.918584698005369*^9, + 3.9185847022659883`*^9}, {3.918584733166923*^9, 3.9185847359196243`*^9}, { + 3.918584835029223*^9, 3.918584914920583*^9}, {3.918585923120076*^9, + 3.918585949059307*^9}, {3.918585981929215*^9, 3.918586212982409*^9}, { + 3.9185862713877707`*^9, 3.918586283220223*^9}, {3.918586430146008*^9, + 3.918586438229198*^9}, {3.91858647808181*^9, 3.9185865516402187`*^9}, { + 3.9185869770915956`*^9, 3.918586998684773*^9}, {3.9185871705919724`*^9, + 3.918587233694872*^9}, {3.918587688250499*^9, 3.918587732617826*^9}, { + 3.918587822943163*^9, 3.918587895921957*^9}, {3.918630539218589*^9, + 3.9186305548276157`*^9}, {3.918630656016925*^9, 3.918630658939457*^9}, { + 3.918630702505906*^9, 3.918630723206217*^9}, {3.918630766067203*^9, + 3.9186307800116253`*^9}, {3.918630857798958*^9, 3.918630861330348*^9}, { + 3.918630944696974*^9, 3.9186309775688953`*^9}, {3.918631062524468*^9, + 3.918631190734248*^9}, {3.9186313271535597`*^9, 3.91863134257788*^9}, { + 3.918631387338098*^9, 3.918631390137829*^9}, {3.918631437297716*^9, + 3.918631438126658*^9}, {3.918631612143648*^9, 3.9186316513861513`*^9}, { + 3.918631686728327*^9, 3.918631830046607*^9}, {3.918631896508091*^9, + 3.9186320069107533`*^9}, {3.91863303862149*^9, 3.9186330635458193`*^9}, { + 3.91863310072386*^9, 3.918633119499754*^9}, {3.918633166361033*^9, + 3.918633196016712*^9}, {3.9186332409230433`*^9, 3.918633311599324*^9}, { + 3.918633342234268*^9, 3.918633383646895*^9}, {3.918633455651833*^9, + 3.9186334734597473`*^9}, {3.9186432538684263`*^9, 3.918643296703499*^9}, { + 3.9186433525370207`*^9, 3.918643372417371*^9}, 3.918643647132059*^9, { + 3.9186456605015583`*^9, 3.918645704439562*^9}, {3.918645736019648*^9, + 3.9186457417525*^9}, {3.9186458580141783`*^9, 3.9186458880641613`*^9}, { + 3.918646011039798*^9, 3.9186460131439123`*^9}, {3.918646045288979*^9, + 3.918646059600195*^9}, {3.91864617045295*^9, 3.918646267932062*^9}, { + 3.9186464192975893`*^9, 3.91864641960671*^9}}, + CellLabel-> + "In[4040]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], + +Cell[BoxData[ + RowBox[{ + FractionBox["1", "2"], " ", + RowBox[{"Erfc", "[", + FractionBox[ + RowBox[{"Log", "[", "\[Mu]", "]"}], + RowBox[{ + SqrtBox["2"], " ", "\[Sigma]"}]], "]"}]}]], "Output", + CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, + 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { + 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { + 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, + 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, + 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { + 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { + 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { + 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { + 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, + 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, + 3.918646175402173*^9, {3.918646212956064*^9, 3.918646283633354*^9}}, + CellLabel-> + "Out[4043]=",ExpressionUUID->"fc3bd635-bd3a-41aa-8d75-d5bfad05535d"], + +Cell[BoxData[ + RowBox[{"0.012331328015027175`", " ", "\[CapitalDelta]"}]], "Output", + CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, + 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { + 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { + 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, + 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, + 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { + 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { + 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { + 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { + 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, + 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, + 3.918646175402173*^9, {3.918646212956064*^9, 3.91864628363549*^9}}, + CellLabel-> + "Out[4044]=",ExpressionUUID->"ac92ebbe-829b-4210-b402-8480defe2306"], + +Cell[BoxData[ + FractionBox[ + RowBox[{"0.0050000000000000044`", " ", "L", " ", "\[CapitalDelta]"}], + RowBox[{"x", "+", "y"}]]], "Output", + CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, + 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { + 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { + 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, + 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, + 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { + 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { + 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { + 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { + 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, + 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, + 3.918646175402173*^9, {3.918646212956064*^9, 3.918646283637189*^9}}, + CellLabel-> + "Out[4045]=",ExpressionUUID->"a29da640-5b8f-4124-b44d-155bf4eef839"], + +Cell[BoxData["0.4502617751698872`"], "Output", + CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, + 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { + 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { + 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, + 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, + 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { + 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { + 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { + 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { + 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, + 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, + 3.918646175402173*^9, {3.918646212956064*^9, 3.918646283638835*^9}}, CellLabel-> - "In[2326]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], + "Out[4046]=",ExpressionUUID->"501bf9f3-5f47-4301-9f0a-cb2bc2d528fb"], + +Cell[BoxData["0.5`"], "Output", + CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, + 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { + 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { + 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, + 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, + 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { + 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { + 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { + 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { + 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, + 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, + 3.918646175402173*^9, {3.918646212956064*^9, 3.918646283640362*^9}}, + CellLabel-> + "Out[4047]=",ExpressionUUID->"bb40be7b-0e6a-4b5c-957f-8c7fd0b3e591"] +}, Open ]], Cell[CellGroupData[{ @@ -803,7 +1002,7 @@ Cell[BoxData[{ RowBox[{"Echo", "[", RowBox[{"XOut", ",", " ", "\"\\""}], "]"}], ";"}], " ", RowBox[{"(*", " ", - RowBox[{"Should", " ", "be", " ", "1.24375"}], " ", "*)"}]}], "\n", + RowBox[{"Should", " ", "be", " ", ".796"}], " ", "*)"}]}], "\n", RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ @@ -848,7 +1047,7 @@ Cell[BoxData[{ RowBox[{"Echo", "[", RowBox[{"YOut", ",", " ", "\"\\""}], "]"}], ";"}], " ", RowBox[{"(*", " ", - RowBox[{"Should", " ", "be", " ", ".796"}], " ", "*)"}]}], "\n", + RowBox[{"Should", " ", "be", " ", "1.24375"}], " ", "*)"}]}], "\n", RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ @@ -892,9 +1091,12 @@ Cell[BoxData[{ 3.918582688010583*^9, 3.9185826955344*^9}, {3.918582731539423*^9, 3.9185827367343893`*^9}, {3.918582864604357*^9, 3.918582868781686*^9}, { 3.918583482655109*^9, 3.918583500351995*^9}, 3.9185843702651167`*^9, { - 3.918584645054994*^9, - 3.9185846751565027`*^9}},ExpressionUUID->"2687c350-1150-4951-bcf0-\ -28364fa5bf73"], + 3.918584645054994*^9, 3.9185846751565027`*^9}, {3.918584720161016*^9, + 3.918584725365926*^9}, {3.918587956963675*^9, 3.918587962241294*^9}, + 3.918589138602861*^9, 3.9186320307912188`*^9, {3.9186331433380632`*^9, + 3.9186331543138247`*^9}}, + CellLabel-> + "In[4048]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ @@ -902,36 +1104,35 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"XOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "0.7975035905838013`"}]}]], "Echo", + RowBox[{"-", "0.9950002431869507`"}]}]], "Echo", CellChangeTimes->{ - 3.918584456007188*^9},ExpressionUUID->"a2980cec-938c-4e9c-a1ac-\ -2bb327818fb7"], + 3.9186462856096687`*^9},ExpressionUUID->"c75da2d5-2788-412b-977d-\ +0c7ca2507a18"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", - RowBox[{"-", "2.220446049250313`*^-16"}]}]], "Echo", + "EchoLabel"], " ", "0.`"}]], "Echo", CellChangeTimes->{ - 3.918584456041801*^9},ExpressionUUID->"768ab9e6-6ad3-4b5f-b157-\ -2bf161d2d395"], + 3.9186462856389914`*^9},ExpressionUUID->"9fa6eaed-366f-4aa9-9ba3-\ +c112eab9cd79"], Cell[BoxData[ RowBox[{ TagBox["\<\"YOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "1.2342700958251953`"}]}]], "Echo", + RowBox[{"-", "0.9950002431869507`"}]}]], "Echo", CellChangeTimes->{ - 3.9185844560501013`*^9},ExpressionUUID->"22863c93-5e22-404d-a4b1-\ -c66192081160"], + 3.918646285647941*^9},ExpressionUUID->"6b71ab51-db7d-4456-8eea-\ +04ea3ce733b6"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", - RowBox[{"-", "2.220446049250313`*^-16"}]}]], "Echo", + "EchoLabel"], " ", "0.`"}]], "Echo", CellChangeTimes->{ - 3.9185844560737*^9},ExpressionUUID->"3bb1ba96-c9bf-461a-8beb-3a324d045c5d"] + 3.9186462856694307`*^9},ExpressionUUID->"13deac56-91d7-452d-afff-\ +122d4396c6e2"] }, Open ]] }, Open ]] }, Open ]] @@ -999,7 +1200,7 @@ Cell[BoxData[{ 3.911408038142099*^9, 3.9114080663589067`*^9}, {3.9114081240293818`*^9, 3.91140812426967*^9}}, CellLabel-> - "In[616]:=",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] + "In[2448]:=",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] }, Open ]], Cell[CellGroupData[{ @@ -1031,7 +1232,7 @@ Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ - SubscriptBox["S", "ext"], " ", "=", " ", "1.8"}], ";", " ", + SubscriptBox["S", "ext"], " ", "=", " ", ".70"}], ";", " ", RowBox[{"Assert", "[", RowBox[{ SubscriptBox["S", "ext"], " ", "<", " ", @@ -1349,45 +1550,45 @@ Cell[BoxData[{ 3.91675072235946*^9, 3.916750736241868*^9}, {3.916750835562142*^9, 3.916750853604291*^9}, {3.916933983207768*^9, 3.916933985584363*^9}, { 3.916934589170532*^9, 3.916934742188787*^9}, {3.91738501952264*^9, - 3.917385025286654*^9}}, + 3.917385025286654*^9}, {3.918585613443736*^9, 3.918585616419739*^9}}, CellLabel-> - "In[618]:=",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], + "In[2450]:=",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], Cell[BoxData[ GraphicsBox[{{{}, {}, TagBox[ {RGBColor[0.368417, 0.506779, 0.709798], AbsoluteThickness[1.6], Opacity[ 1.], LineBox[CompressedData[" -1:eJwV0Gs0lAkAxvESOiI5mlxmdOHgoLK2mi5qPdJUW2or5JZby+5QCTXROq6t -SqEMM0ajUeZVZCUjxWjRNC69SsIJSQw1lcuYSC5F1n54zv/L8+ln/HuI0x8q -8+bN2z+3/yscELMaL/5sp8t3E+Z6a9odU1n2uISig5M6xzNXGvXbjRtEFl+l -rMKTZ8Y5n2hTdttyCy1iKDZgWkaLn9M00NNfG3CGYo9tHQWTlTRDiJJbVMIo -B5F/TzJdSrMEtbuj+STFD660lD13aVvwQt1LHEwJBb1ZdwFB2wNK736PFEkc -Ij4zvvZZeiJsXdY7NXkiOjgti+NC/LGClaRoCkmFIuKo2oqCIHwLOzpbKOWA -+2OTuYIeiiJLbYOsxkycC46yXeJ9Gm6qrbsMrQVIu8vhV9eHIytRX49SeRPd -B1+6R5hEYmLQRsu0SojYVXRd1o5ovPBzXRw1kAueTKYy6xwH9rqP7K6R2zCp -X1b1Z388QgXSMDVlPux9VxW3hP+NBsNCr3D9fzDcIxOrmp+HzpfZBiX1LqTj -j9Q9yy+g+a0vQ7TnHkzH+TOsE4loLz6fvLysGPp5wfM5BpexzZhd/uGhCOuH -bRrb8pLgzTcZcH5egqnlFyq63VPwVRLkvbPpPprfxd9fpLgCx9GNbZ0fS2FA -jt2LPpQKa+WdKJfvD6D/l5f5WQs2LvBbApymH4LOcpSrjrBx/bd4pzHdcmT4 -B4lPN6TBQiSPp+qLsTRba5LFTYeDTNltqlcBb1EP/6wXB4YGcdtbrR7hfbme -js8GLpg/auVqa/9FpKbEpm2Gi9MK9tUuRiWOOPUO/dSRAa07C5g8typQTtlO -JhXxQF26Oq7NrRp9XVdGIsMz8cXhRFPXxscY2qri4HjgGjitgtjU8sfQ++Au -LDLkI2qvcNfDTRLMBhZzKTI+pLVBOkUSCTbLkgRHyrKw00DrO9PhCS4KF43T -467DLCTs05fGJ9DzYKwZ8RDAXiAa335QijpP61cwy4ZQVENTeSnFXnqOFXso -G/4N/B0czxqoqvZSpTU34FvhmPzpTQ2U2qG+jN03UVFU3a4dWItJrrM/r/Qm -vC6p2+aN1IKp8a1kcGUOtmy1qJx/qg4BJi0zGgk5YI1o7bCeqcNluot75ucc -DMQ87zeKrceGkwuqPx8WIm/UJy/6Rz0c0wPT94qFkB4rZRYnPkVCCc2VYkaA -WvH+11saJBgTgTvzLxGYiValyjVJ9I31eAclEZBtNx001SYRPeoYbpVC4Dbp -n5KrS6JMoZZXmEpg/eu+ZoJGYnXA1EIRj8C+SZmncC0JnUOd9eJbBKI3vj1x -4xCJjwVpeCYh4Pdt+pceZxLxFvddk6UEGFVGS1a6zv3NyeD9tQQW7fISZXuS -2Gf8KqvpKYGMw2++CvxJ1PECJ1qbCBSxXsdcP0PiQQK7sOstAfbmqQNdESRc -zi2UCnoIsKYNjI0iSShjQ1/79BKwTXCXZsWQMPtuqt77nkB9evvCrIskeGGa -vvJBAgVuEx2dl0jQQ6zO3FYQuELTL6Amk2gZQhJTScCFcN3HTyWhFbi7rH+U -wCZm+PLONBL5ctvGgrE5v9UZw4ZcEvb+pu+Oj8/5DT+o9uCRkPupTK2ZnPMr -eZV67RqJsz7t2sNTBP4DDMpfbg== +1:eJwV0Ws01AkABXDklayUKWOijaOTOB5bK1ZxPUqiFCrPQliPEqMhMV7/VVGE +Etswq8Wiklc1ixAG46+EVDImJBKSsKi8Vh/uud/uh99VPhVg6yUiJCR0aCU/ +Onu0gtF6+Rej4nC9wE9X1Gr8RDbUllFkobFYnz4z0mw0Sw0rSaJsgZKozYz4 +oS6jPbmFapEUHaRJUHOTPgwb9Y00egZTjLE/PnzermfOqDThhQidcgQalprb +OG0SoPW+6ThLccMVdXHD4V55PBd3qfCnBOI5a4q33L0NlHeHHBProiEYvqkd +90of9B0Z78WG4qD0VJceG2SKzYyr420ByZDo8mK7u1jgO919uZCbit/9C/kC +njWKtstQM1r/BL+Jt/Wuuy3sRTvNFbTYMMps+PAw6xgy4uQ3Uqpvgyqtuk6m +zQFzYzrSqjXZeFFrc0yX54znbsd/Yo7mor1SKnt++SRSdgynCCbzMLxgIUoV +dkcgm0sXmyhA9IjhGcewU2hRKHQJkb8HXmioA0vOE7LTyy0TtPu4qM6yqU/x +Qsdb172lB4oxGincdkvbG10lFxOU/i2B/xZaTGiTD/Yop5R/4JTCeVDB+KSJ +H06wVEbtnpVBzsr1j3uC05ip8z2xr+0Btr+82gkXf1hN7XrNH36IgeXF/J75 +s9CauMM8Ov8InlXJDnqWgbjEeuFpu8DBVqk0jypJOjKtY2z/W18Oje01Okpd +dKiVDsXQ5CvA7HaMnUkPgmn/RK/qxkq46lgHDR09BwVqtEmn+mNccvBSmVRm +wHupcUhMswoD6744+Lxj4Nx4SpJgbzWyMtk2+SXBkL6zyjvdvgZTrTmDhswQ +0OQ0ol/bPwEzWWlJzuA8pk3PtAl21cJJtbJbVzIUqZ3sqOTyWjAPtOx2bg4F +0zLbnKNXB+0NO/Vfxl4At9FXtqiuDkplNbNuNmHYR5We9zath09/9W4x2XBs +DaB/nG6th3B/n+libziM2aWzJke4eBYY3K54m4ns0oZNIu1cGBR4fA04EQGP +FpZZqlMDPpUwBmrUI+FaaZXwsacBI5bfbC+MRqKy6EmXjE8jtDm3L9pVRsEl +Xtwgf7IRyx5H7lDMovHbbrVq4aAmXNKVsrPKjgZjUtpMa7EJdQGv3h5eHbPy +67MRxSgebgTxNVi+McifOpkfscRDRfOa/ZLNMeD6PfQuiWtG1GVrs7NaBGiV +gxb/rCbRL/NUZCmRwGKEKG1oDYkpJkuQl0Sg30R1TFWGxOoxX45zCoE80iMx +dz2JzTxJvwepBHZ2D3TkbCJxOsq8wzaDwMGv/U7ZmiTGJuqyHhcQiNj19kyW +DYn59vI9XlwCbt8XDPvsVvYQt/FjA4G9NYprfz5OQvK+/RdOEwEpc5fSv5xI +aMbP5ki2EEg71jPD9iARYvLrmsJ2AkWM7sjMYBJCZcXd4r0EUvS/HRacJ0HZ +EvXg7z4CjAWqsmIYCZVr1omn3hEwiHXgZkSS2O83blw+SIB3o0si4zIJQkWj +wHmMwF37uTf8eBJJyd9jRMcJXNskf5eWQIK9RDpXfCZwNOf4QVYyicd8n7Vz +kwT0vEOU+NdJvLbQHymeXvHTSPuscJPEe44E129mxe/zoyeO6SQWVbsyV82t ++JW9Sr51i8TS9byQqq8E/gd1j1xk "]]}, - Annotation[#, "Charting`Private`Tag$57056#1"]& ]}, {}}, + Annotation[#, "Charting`Private`Tag$18998#1"]& ]}, {}}, AspectRatio->NCache[GoldenRatio^(-1), 0.6180339887498948], Axes->{True, True}, AxesLabel->{None, None}, @@ -1419,7 +1620,7 @@ eZV67RqJsz7t2sNTBP4DDMpfbg== Part[#, 1]], (Identity[#]& )[ Part[#, 2]]}& )}}, - PlotRange->{{0, 0.2}, {0., 0.03901618891876252}}, + PlotRange->{{0, 0.2}, {-2.8571428571428568`*^-9, 0.009263489123279008}}, PlotRangeClipping->True, PlotRangePadding->{{ Scaled[0.02], @@ -1429,9 +1630,9 @@ eZV67RqJsz7t2sNTBP4DDMpfbg== Ticks->{Automatic, Automatic}]], "Output", CellChangeTimes->{ 3.917383563255979*^9, 3.917384872931774*^9, {3.9173849757089787`*^9, - 3.9173850261946993`*^9}, 3.917385114645734*^9}, + 3.9173850261946993`*^9}, 3.917385114645734*^9, 3.918585617114811*^9}, CellLabel-> - "Out[620]=",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], + "Out[2452]=",ExpressionUUID->"ff2c3a54-a3b1-4be6-afbb-32094a16572f"], Cell[CellGroupData[{ @@ -1439,20 +1640,20 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The optimal amount of X to tender is: \\!\\(\\*SubscriptBox[\\(\ \[CapitalDelta]\\), \\(X\\)]\\) = \"\>", - "EchoLabel"], " ", "202.20119150794815`"}]], "Echo", + "EchoLabel"], " ", "6.230446865679352`*^7"}]], "Echo", CellChangeTimes->{ - 3.917385114735537*^9},ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-\ -8b9eefc03ffb"], + 3.918585617388137*^9},ExpressionUUID->"6c3d9d24-049c-4137-b7e3-\ +6cf83d94b59c"], Cell[BoxData[ RowBox[{ TagBox["\<\"The amount out is: \\!\\(\\*SubscriptBox[\\(\[CapitalDelta]\\), \ \\(Y\\)]\\) = \"\>", "EchoLabel"], " ", - RowBox[{"-", "383.25524969204025`"}]}]], "Echo", + RowBox[{"-", "4.51112226444927`*^7"}]}]], "Echo", CellChangeTimes->{ - 3.9173851147430677`*^9},ExpressionUUID->"62407cb0-a174-480a-8d16-\ -3a55f4b36678"], + 3.918585617396303*^9},ExpressionUUID->"255c6473-c036-4f07-8655-\ +af783da13368"], Cell[BoxData[ RowBox[{ @@ -1460,18 +1661,19 @@ Cell[BoxData[ \\(1\\)]\\),\\!\\(\\*SubscriptBox[\\(y\\), \\(1\\)]\\)) = \"\>", "EchoLabel"], " ", RowBox[{"{", - RowBox[{"1202.2011915079481`", ",", "1616.74475030796`"}], "}"}]}]], "Echo",\ - + RowBox[{"1.0623044686567935`*^9", ",", "7.409463578271984`*^7"}], + "}"}]}]], "Echo", CellChangeTimes->{ - 3.91738511476458*^9},ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], + 3.9185856174259367`*^9},ExpressionUUID->"a6e336c8-67e3-4548-aec6-\ +53634d7b4e40"], Cell[BoxData[ RowBox[{ TagBox["\<\"The final price of the pool is: P = \"\>", - "EchoLabel"], " ", "1.8049533724284241`"}]], "Echo", + "EchoLabel"], " ", "0.7033820512261256`"}]], "Echo", CellChangeTimes->{ - 3.9173851147720413`*^9},ExpressionUUID->"a954a63c-1072-4dd1-a3b7-\ -6fea2ecdbf38"], + 3.918585617433468*^9},ExpressionUUID->"5f8a3663-d1c0-4227-93e2-\ +6e4110936aef"], Cell[BoxData[ RowBox[{ @@ -1485,21 +1687,19 @@ Cell[BoxData[ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", - FractionBox[ - RowBox[{ - SuperscriptBox["\[Sigma]", "2"], " ", "\[Tau]"}], "2"]}], - "+", - RowBox[{ - SqrtBox["2"], " ", "\[Sigma]", " ", - SqrtBox["\[Tau]"], " ", - RowBox[{"InverseErfc", "[", - FractionBox[ - RowBox[{"2", " ", - RowBox[{"(", + FractionBox["1", "2"]}], " ", "\[Sigma]", " ", + RowBox[{"(", + RowBox[{"\[Sigma]", "-", + RowBox[{"2", " ", + SqrtBox["2"], " ", + RowBox[{"InverseErfc", "[", + FractionBox[ + RowBox[{"2", " ", + RowBox[{"(", RowBox[{"v", "+", "x"}], ")"}]}], - RowBox[{"L", "+", "v", "-", - RowBox[{"v", " ", "\[Gamma]"}]}]], "]"}]}]}]], " ", "K", - " ", + RowBox[{"L", "+", "v", "-", + RowBox[{"v", " ", "\[Gamma]"}]}]], "]"}]}]}], ")"}]}]], + " ", "K", " ", RowBox[{"(", RowBox[{"L", "+", RowBox[{"x", " ", @@ -1516,9 +1716,7 @@ Cell[BoxData[ RowBox[{"-", "1"}], "+", "\[Gamma]"}], ")"}], " ", RowBox[{"Erfc", "[", RowBox[{ - FractionBox[ - RowBox[{"\[Sigma]", " ", - SqrtBox["\[Tau]"]}], + FractionBox["\[Sigma]", SqrtBox["2"]], "-", RowBox[{"InverseErfc", "[", FractionBox[ @@ -1534,7 +1732,8 @@ Cell[BoxData[ RowBox[{"v", " ", "\[Gamma]"}]}]], "\[LessEqual]", "1"}]}, "ConditionalExpression"]}]], "Echo", CellChangeTimes->{ - 3.91738511509683*^9},ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] + 3.918585617718585*^9},ExpressionUUID->"8b3d5769-45e4-45af-b1b7-\ +284acb1d88ab"] }, Open ]] }, Open ]] }, Open ]] @@ -2081,8 +2280,8 @@ f3028622cb8d"] }, Open ]] }, Open ]] }, -WindowSize->{1651, 2083}, -WindowMargins->{{Automatic, 11}, {Automatic, -819}}, +WindowSize->{2125, 2083}, +WindowMargins->{{Automatic, 1157}, {Automatic, -819}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, FrontEndVersion->"13.2 for Mac OS X ARM (64-bit) (January 31, 2023)", @@ -2102,149 +2301,156 @@ CellTagsIndex->{} (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ -Cell[422, 15, 185, 3, 146, "Title",ExpressionUUID->"2003d08a-fff7-4f74-8623-7a0823c9cafa"], +Cell[422, 15, 185, 3, 194, "Title",ExpressionUUID->"2003d08a-fff7-4f74-8623-7a0823c9cafa"], Cell[CellGroupData[{ -Cell[632, 22, 221, 5, 101, "Section",ExpressionUUID->"514be430-48c5-4dc6-92af-6b1c3a5b8586"], +Cell[632, 22, 221, 5, 134, "Section",ExpressionUUID->"514be430-48c5-4dc6-92af-6b1c3a5b8586"], Cell[CellGroupData[{ -Cell[878, 31, 222, 5, 81, "Subsection",ExpressionUUID->"f16f1652-ed41-4414-8c9b-6b6d5d8061ac"], -Cell[1103, 38, 579, 14, 54, "Code",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] +Cell[878, 31, 222, 5, 107, "Subsection",ExpressionUUID->"f16f1652-ed41-4414-8c9b-6b6d5d8061ac"], +Cell[1103, 38, 579, 14, 69, "Code",ExpressionUUID->"8255c47c-fa0b-4fdd-8638-752453aca613"] }, Open ]], Cell[CellGroupData[{ -Cell[1719, 57, 202, 3, 81, "Subsection",ExpressionUUID->"b3dd161e-0b53-4183-b30c-be7844f26477"], -Cell[1924, 62, 809, 19, 86, "Code",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] +Cell[1719, 57, 202, 3, 107, "Subsection",ExpressionUUID->"b3dd161e-0b53-4183-b30c-be7844f26477"], +Cell[1924, 62, 809, 19, 111, "Code",ExpressionUUID->"25d6c1c4-f902-41e0-8746-c63f6b03d94e"] }, Open ]], Cell[CellGroupData[{ -Cell[2770, 86, 307, 7, 81, "Subsection",ExpressionUUID->"f601d02f-f91e-4780-a166-a78097a54f48"], -Cell[3080, 95, 978, 27, 165, "Code",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] +Cell[2770, 86, 307, 7, 107, "Subsection",ExpressionUUID->"f601d02f-f91e-4780-a166-a78097a54f48"], +Cell[3080, 95, 978, 27, 205, "Code",ExpressionUUID->"d5d16a82-3e60-44ff-affc-b50eb9144304"] }, Open ]], Cell[CellGroupData[{ -Cell[4095, 127, 296, 7, 81, "Subsection",ExpressionUUID->"009a24ad-ebe5-4d73-bdda-a7839592332a"], +Cell[4095, 127, 296, 7, 107, "Subsection",ExpressionUUID->"009a24ad-ebe5-4d73-bdda-a7839592332a"], Cell[CellGroupData[{ -Cell[4416, 138, 244, 6, 67, "Subsubsection",ExpressionUUID->"3b15f5e3-f420-4095-899a-506c7286cc40"], -Cell[4663, 146, 2208, 59, 192, "Code",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] +Cell[4416, 138, 244, 6, 89, "Subsubsection",ExpressionUUID->"3b15f5e3-f420-4095-899a-506c7286cc40"], +Cell[4663, 146, 2208, 59, 244, "Code",ExpressionUUID->"3950a1e9-9c32-45c4-b5ef-404c37d6ef65"] }, Open ]], Cell[CellGroupData[{ -Cell[6908, 210, 253, 6, 67, "Subsubsection",ExpressionUUID->"6228385e-cfd2-4bd0-97f4-58c98a5a994e"], -Cell[7164, 218, 1228, 36, 127, "Code",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] +Cell[6908, 210, 253, 6, 89, "Subsubsection",ExpressionUUID->"6228385e-cfd2-4bd0-97f4-58c98a5a994e"], +Cell[7164, 218, 1228, 36, 159, "Code",ExpressionUUID->"cdbca2c9-2426-4adf-8516-6c22e3b352b1"] }, Open ]], Cell[CellGroupData[{ -Cell[8429, 259, 186, 3, 67, "Subsubsection",ExpressionUUID->"18015876-38da-4fa9-82b7-a417d745ef90"], -Cell[8618, 264, 649, 16, 72, "Code",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] +Cell[8429, 259, 186, 3, 89, "Subsubsection",ExpressionUUID->"18015876-38da-4fa9-82b7-a417d745ef90"], +Cell[8618, 264, 649, 16, 90, "Code",ExpressionUUID->"a65cb5ec-cdac-40e0-bb49-f3d8157592d9"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[9328, 287, 285, 7, 101, "Section",ExpressionUUID->"da815218-0c74-4720-a5c9-76f45781c5e2"], +Cell[9328, 287, 285, 7, 134, "Section",ExpressionUUID->"da815218-0c74-4720-a5c9-76f45781c5e2"], Cell[CellGroupData[{ -Cell[9638, 298, 305, 7, 81, "Subsection",ExpressionUUID->"d461a415-44ca-4804-8248-6137a0f9449f"], +Cell[9638, 298, 305, 7, 107, "Subsection",ExpressionUUID->"d461a415-44ca-4804-8248-6137a0f9449f"], Cell[CellGroupData[{ -Cell[9968, 309, 2329, 47, 105, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], +Cell[9968, 309, 2677, 52, 134, "Code",ExpressionUUID->"8d262a91-37a1-41fb-b1b3-ae8191b1ccda"], Cell[CellGroupData[{ -Cell[12322, 360, 230, 6, 38, "Echo",ExpressionUUID->"aab1c81d-cfc5-4d2b-8007-0279a6972b9e"], -Cell[12555, 368, 260, 7, 53, "Echo",ExpressionUUID->"b16e722c-3d60-475c-8418-e69117c417f6"], -Cell[12818, 377, 239, 5, 38, "Echo",ExpressionUUID->"cca42629-2992-4776-8d20-cfe72c5e9e33"] +Cell[12670, 365, 232, 6, 50, "Echo",ExpressionUUID->"63fa2685-ead2-42c3-8894-aa3d0f759278"], +Cell[12905, 373, 258, 7, 68, "Echo",ExpressionUUID->"ab767d72-08f9-45a3-8d7a-62a93aac3a75"], +Cell[13166, 382, 242, 6, 50, "Echo",ExpressionUUID->"865ae55a-ba52-403c-9134-dd94b3a70090"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[13118, 389, 307, 7, 81, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], +Cell[13469, 395, 307, 7, 107, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], Cell[CellGroupData[{ -Cell[13450, 400, 1779, 37, 86, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], +Cell[13801, 406, 2391, 45, 111, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ -Cell[15254, 441, 277, 7, 38, "Echo",ExpressionUUID->"d7b66282-ccf5-4a61-b050-e5369432ea02"], -Cell[15534, 450, 236, 6, 38, "Echo",ExpressionUUID->"340222fe-c633-43e4-bcba-01526539e08e"] +Cell[16217, 455, 275, 7, 50, "Echo",ExpressionUUID->"9d2b3d97-b3e0-48ae-a043-c2fe93fefab5"], +Cell[16495, 464, 232, 6, 50, "Echo",ExpressionUUID->"325d0f09-c927-4e0e-819b-0a3df79f6b2e"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[15819, 462, 251, 6, 67, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], +Cell[16776, 476, 251, 6, 89, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], Cell[CellGroupData[{ -Cell[16095, 472, 1744, 46, 86, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], +Cell[17052, 486, 1744, 46, 111, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ -Cell[17864, 522, 278, 7, 38, "Echo",ExpressionUUID->"e3081357-70e4-4b4e-afcb-1060b0eb7683"], -Cell[18145, 531, 286, 7, 38, "Echo",ExpressionUUID->"9ef66918-0e39-406d-b6bc-23b4ca68d567"] +Cell[18821, 536, 293, 7, 50, "Echo",ExpressionUUID->"4674d060-49c9-4219-9efd-fc644a8caf6f"], +Cell[19117, 545, 274, 7, 50, "Echo",ExpressionUUID->"08110232-f66b-4e27-8547-3a897336da48"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[18492, 545, 224, 4, 67, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], +Cell[19452, 559, 224, 4, 89, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], Cell[CellGroupData[{ -Cell[18741, 553, 1307, 35, 86, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], -Cell[20051, 590, 215, 6, 38, "Echo",ExpressionUUID->"17d3d6dc-6f36-435e-8e73-faa74dfd6a32"] +Cell[19701, 567, 1307, 35, 111, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], +Cell[21011, 604, 211, 6, 50, "Echo",ExpressionUUID->"d259291b-abcf-436d-86e9-f78a15b5625f"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[20315, 602, 284, 6, 67, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], -Cell[20602, 610, 1409, 42, 98, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] +Cell[21271, 616, 284, 6, 89, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], +Cell[21558, 624, 1409, 42, 128, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[22072, 659, 155, 3, 101, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], +Cell[23028, 673, 155, 3, 134, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], Cell[CellGroupData[{ -Cell[22252, 666, 290, 7, 81, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], -Cell[22545, 675, 4827, 107, 194, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], +Cell[23208, 680, 290, 7, 107, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], +Cell[CellGroupData[{ +Cell[23523, 691, 8847, 198, 700, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], +Cell[32373, 891, 1174, 21, 102, "Output",ExpressionUUID->"fc3bd635-bd3a-41aa-8d75-d5bfad05535d"], +Cell[33550, 914, 1050, 15, 73, "Output",ExpressionUUID->"ac92ebbe-829b-4210-b402-8480defe2306"], +Cell[34603, 931, 1106, 17, 99, "Output",ExpressionUUID->"a29da640-5b8f-4124-b44d-155bf4eef839"], +Cell[35712, 950, 1013, 14, 73, "Output",ExpressionUUID->"501bf9f3-5f47-4301-9f0a-cb2bc2d528fb"], +Cell[36728, 966, 998, 14, 73, "Output",ExpressionUUID->"bb40be7b-0e6a-4b5c-957f-8c7fd0b3e591"] +}, Open ]], Cell[CellGroupData[{ -Cell[27397, 786, 4299, 110, 421, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], +Cell[37763, 985, 4522, 113, 542, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ -Cell[31721, 900, 228, 7, 38, "Echo",ExpressionUUID->"a2980cec-938c-4e9c-a1ac-2bb327818fb7"], -Cell[31952, 909, 238, 7, 38, "Echo",ExpressionUUID->"768ab9e6-6ad3-4b5f-b157-2bf161d2d395"], -Cell[32193, 918, 230, 7, 38, "Echo",ExpressionUUID->"22863c93-5e22-404d-a4b1-c66192081160"], -Cell[32426, 927, 234, 6, 38, "Echo",ExpressionUUID->"3bb1ba96-c9bf-461a-8beb-3a324d045c5d"] +Cell[42310, 1102, 230, 7, 50, "Echo",ExpressionUUID->"c75da2d5-2788-412b-977d-0c7ca2507a18"], +Cell[42543, 1111, 202, 6, 50, "Echo",ExpressionUUID->"9fa6eaed-366f-4aa9-9ba3-c112eab9cd79"], +Cell[42748, 1119, 228, 7, 50, "Echo",ExpressionUUID->"6b71ab51-db7d-4456-8eea-04ea3ce733b6"], +Cell[42979, 1128, 202, 6, 50, "Echo",ExpressionUUID->"13deac56-91d7-452d-afff-122d4396c6e2"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[32733, 941, 204, 4, 101, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], -Cell[32940, 947, 568, 13, 81, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], +Cell[43254, 1142, 204, 4, 134, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], +Cell[43461, 1148, 568, 13, 107, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], Cell[CellGroupData[{ -Cell[33533, 964, 630, 15, 68, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], -Cell[34166, 981, 684, 20, 107, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] +Cell[44054, 1165, 630, 15, 89, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], +Cell[44687, 1182, 685, 20, 137, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] }, Open ]], Cell[CellGroupData[{ -Cell[34887, 1006, 268, 4, 81, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], +Cell[45409, 1207, 268, 4, 107, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], Cell[CellGroupData[{ -Cell[35180, 1014, 460, 12, 68, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], +Cell[45702, 1215, 460, 12, 89, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], Cell[CellGroupData[{ -Cell[35665, 1030, 11721, 323, 698, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], -Cell[47389, 1355, 3524, 78, 342, "Output",ExpressionUUID->"88457644-f8dc-4649-adb3-9b54c9fd1c06"], +Cell[46187, 1231, 11768, 323, 907, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], +Cell[57958, 1556, 3570, 78, 471, "Output",ExpressionUUID->"ff2c3a54-a3b1-4be6-afbb-32094a16572f"], Cell[CellGroupData[{ -Cell[50938, 1437, 302, 7, 38, "Echo",ExpressionUUID->"d1f17eb9-1e3f-45fe-8a49-8b9eefc03ffb"], -Cell[51243, 1446, 303, 8, 38, "Echo",ExpressionUUID->"62407cb0-a174-480a-8d16-3a55f4b36678"], -Cell[51549, 1456, 385, 9, 38, "Echo",ExpressionUUID->"d6ae3e9d-138a-4eac-9161-a39196238226"], -Cell[51937, 1467, 241, 6, 38, "Echo",ExpressionUUID->"a954a63c-1072-4dd1-a3b7-6fea2ecdbf38"], -Cell[52181, 1475, 2181, 61, 132, "Echo",ExpressionUUID->"fca08186-95ea-4887-8401-ad9d766f2ded"] +Cell[61553, 1638, 304, 7, 50, "Echo",ExpressionUUID->"6c3d9d24-049c-4137-b7e3-6cf83d94b59c"], +Cell[61860, 1647, 302, 8, 50, "Echo",ExpressionUUID->"255c6473-c036-4f07-8655-af783da13368"], +Cell[62165, 1657, 399, 10, 52, "Echo",ExpressionUUID->"a6e336c8-67e3-4548-aec6-53634d7b4e40"], +Cell[62567, 1669, 239, 6, 50, "Echo",ExpressionUUID->"5f8a3663-d1c0-4227-93e2-6e4110936aef"], +Cell[62809, 1677, 2090, 58, 241, "Echo",ExpressionUUID->"8b3d5769-45e4-45af-b1b7-284acb1d88ab"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[54435, 1544, 171, 3, 81, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], +Cell[64972, 1743, 171, 3, 107, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], Cell[CellGroupData[{ -Cell[54631, 1551, 382, 10, 68, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], +Cell[65168, 1750, 382, 10, 89, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], Cell[CellGroupData[{ -Cell[55038, 1565, 7526, 215, 417, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], -Cell[62567, 1782, 3553, 78, 338, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], +Cell[65575, 1764, 7526, 215, 540, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], +Cell[73104, 1981, 3553, 78, 450, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], Cell[CellGroupData[{ -Cell[66145, 1864, 301, 7, 38, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], -Cell[66449, 1873, 301, 8, 38, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], -Cell[66753, 1883, 391, 10, 38, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], -Cell[67147, 1895, 238, 6, 38, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], -Cell[67388, 1903, 2460, 70, 130, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] +Cell[76682, 2063, 301, 7, 50, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], +Cell[76986, 2072, 301, 8, 50, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], +Cell[77290, 2082, 391, 10, 50, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], +Cell[77684, 2094, 238, 6, 50, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], +Cell[77925, 2102, 2460, 70, 173, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[69933, 1982, 164, 3, 101, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], +Cell[80470, 2181, 164, 3, 134, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], Cell[CellGroupData[{ -Cell[70122, 1989, 227, 5, 81, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], +Cell[80659, 2188, 227, 5, 108, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], Cell[CellGroupData[{ -Cell[70374, 1998, 2145, 57, 168, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], +Cell[80911, 2197, 2145, 57, 224, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], Cell[CellGroupData[{ -Cell[72544, 2059, 306, 8, 38, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], -Cell[72853, 2069, 298, 7, 38, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] +Cell[83081, 2258, 306, 8, 50, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], +Cell[83390, 2268, 298, 7, 50, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] }, Open ]] }, Open ]] }, Open ]] From 26f84656d6a0d96624a7dc31576f37928c0925ec Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Tue, 5 Mar 2024 10:08:26 -0700 Subject: [PATCH 10/13] Update log_normal.nb --- src/LogNormal/log_normal.nb | 450 +++++++++++++----------------------- 1 file changed, 161 insertions(+), 289 deletions(-) diff --git a/src/LogNormal/log_normal.nb b/src/LogNormal/log_normal.nb index d4d71aaf..329ffa88 100644 --- a/src/LogNormal/log_normal.nb +++ b/src/LogNormal/log_normal.nb @@ -3,10 +3,10 @@ NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 0, 0] -NotebookDataLength[ 92830, 2461] -NotebookOptionsPosition[ 83752, 2282] -NotebookOutlinePosition[ 84311, 2301] -CellTagsIndexPosition[ 84268, 2298] +NotebookDataLength[ 86695, 2333] +NotebookOptionsPosition[ 78138, 2161] +NotebookOutlinePosition[ 78697, 2180] +CellTagsIndexPosition[ 78654, 2177] WindowFrame->Normal*) (* Beginning of Notebook Content *) @@ -413,7 +413,7 @@ Cell[BoxData[{ SubscriptBox["x", "0"], ",", SubscriptBox["S", "0"]}], "}"}], " ", "=", " ", RowBox[{"{", - RowBox[{"1000000000", ",", " ", "1"}], "}"}]}], ";"}], " "}], "\n", + RowBox[{"1000000000", ",", " ", "0.75"}], "}"}]}], ";"}], " "}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -447,9 +447,10 @@ Cell[BoxData[{ 3.9186312818709307`*^9}, 3.918631349127054*^9, {3.918631421837872*^9, 3.918631422168438*^9}, {3.918631663100456*^9, 3.9186316633223667`*^9}, { 3.918643343448288*^9, 3.918643343752068*^9}, {3.918646106269537*^9, - 3.918646106440174*^9}, {3.918646277573381*^9, 3.918646277908587*^9}}, - CellLabel-> - "In[4032]:=",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], + 3.918646106440174*^9}, {3.918646277573381*^9, 3.918646277908587*^9}, { + 3.9186465675649567`*^9, 3.918646568407236*^9}, {3.918647114579299*^9, + 3.9186471322198763`*^9}},ExpressionUUID->"085ca656-cc94-43cf-a8c6-\ +c116e23e4910"], Cell[CellGroupData[{ @@ -459,16 +460,16 @@ Cell[BoxData[ \\!\\(\\*SubscriptBox[\\(x\\), \\(0\\)]\\) = \"\>", "EchoLabel"], " ", "1000000000"}]], "Echo", CellChangeTimes->{ - 3.918646278194686*^9},ExpressionUUID->"9d2b3d97-b3e0-48ae-a043-\ -c2fe93fefab5"], + 3.918646568794178*^9},ExpressionUUID->"d46f0b65-6c97-4fd7-a377-\ +fd814b863b4a"], Cell[BoxData[ RowBox[{ TagBox["\<\"\\!\\(\\*SubscriptBox[\\(S\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1"}]], "Echo", + "EchoLabel"], " ", "0.75`"}]], "Echo", CellChangeTimes->{ - 3.9186462782292747`*^9},ExpressionUUID->"325d0f09-c927-4e0e-819b-\ -0a3df79f6b2e"] + 3.918646568829261*^9},ExpressionUUID->"d830d4bf-eeeb-4bb6-a004-\ +32188869cd46"] }, Open ]] }, Open ]], @@ -530,7 +531,7 @@ Cell[BoxData[{ 3.918570990618823*^9, 3.918570994101475*^9}, {3.9185711059481163`*^9, 3.9185711082874823`*^9}}, CellLabel-> - "In[4034]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], + "In[4060]:=",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ @@ -538,19 +539,19 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"The initial liquidity is: \\!\\(\\*SubscriptBox[\\(L\\), \ \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "2.220930256899317255524578432`18.*^9"}]], "Echo", + "EchoLabel"], " ", "1.1799546999753058`*^9"}]], "Echo", CellChangeTimes->{ - 3.918646279474539*^9},ExpressionUUID->"4674d060-49c9-4219-9efd-\ -fc644a8caf6f"], + 3.918646570423168*^9},ExpressionUUID->"d45d2202-bcd3-4d72-9040-\ +061ec9d3b3fd"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial Y-reserve balance is: \ \\!\\(\\*SubscriptBox[\\(y\\), \\(0\\)]\\) = \"\>", - "EchoLabel"], " ", "1.`18.*^9"}]], "Echo", + "EchoLabel"], " ", "1.1920585842721254`*^8"}]], "Echo", CellChangeTimes->{ - 3.918646279509403*^9},ExpressionUUID->"08110232-f66b-4e27-8547-\ -3a897336da48"] + 3.918646570454266*^9},ExpressionUUID->"7f4698d3-1c35-46e4-b14b-\ +549da3ca9c05"] }, Open ]] }, Open ]] }, Open ]], @@ -600,15 +601,15 @@ Cell[BoxData[{ 3.911912928324705*^9, {3.9185711812613907`*^9, 3.918571185390046*^9}, { 3.91857169317227*^9, 3.918571699558569*^9}}, CellLabel-> - "In[4036]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], + "In[4062]:=",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], Cell[BoxData[ RowBox[{ TagBox["\<\"The initial price is: P = \"\>", - "EchoLabel"], " ", "1"}]], "Echo", + "EchoLabel"], " ", "0.75`"}]], "Echo", CellChangeTimes->{ - 3.918646280600171*^9},ExpressionUUID->"d259291b-abcf-436d-86e9-\ -f78a15b5625f"] + 3.9186465723885307`*^9},ExpressionUUID->"2780423d-6264-4b5d-a5a5-\ +68bad0b82ef8"] }, Open ]] }, Open ]], @@ -664,7 +665,7 @@ Cell[BoxData[{ 3.911409206365666*^9}, {3.918571188362344*^9, 3.918571190424653*^9}, { 3.9185717026957493`*^9, 3.918571706012089*^9}}, CellLabel-> - "In[4038]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] + "In[4064]:=",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], @@ -687,18 +688,51 @@ reserve.\ 3.911388067027336*^9}},ExpressionUUID->"2f7348b3-443c-4a22-943e-\ 943b7962999e"], -Cell[CellGroupData[{ - Cell[BoxData[{ RowBox[{ RowBox[{ - RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", + RowBox[{"fees", "[", RowBox[{"\[CapitalDelta]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", RowBox[{ RowBox[{"(", RowBox[{"1", "-", "\[Gamma]"}], ")"}], "\[CapitalDelta]"}]}], " "}], "\n", + RowBox[{ + RowBox[{ + SubscriptBox["\[Delta]", "LiqX"], "[", + RowBox[{ + "\[CapitalDelta]_", ",", "x_", ",", "y_", ",", "L_", ",", "\[Mu]_", ",", + "\[Sigma]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", + RowBox[{ + RowBox[{ + SubscriptBox["P", "X"], "[", + RowBox[{"x", ",", "L", ",", "\[Mu]", ",", "\[Sigma]"}], "]"}], " ", "L", + " ", + FractionBox[ + RowBox[{"fees", "[", + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], + RowBox[{ + RowBox[{ + RowBox[{ + SubscriptBox["P", "X"], "[", + RowBox[{"x", ",", "L", ",", "\[Mu]", ",", "\[Sigma]"}], "]"}], " ", + "x"}], " ", "+", " ", "y"}]]}]}], "\n", + RowBox[{ + RowBox[{ + SubscriptBox["\[Delta]", "LiqY"], "[", + RowBox[{ + "\[CapitalDelta]_", ",", "x_", ",", "y_", ",", "L_", ",", "\[Mu]_", ",", + "\[Sigma]_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", + RowBox[{"L", " ", + FractionBox[ + RowBox[{"fees", "[", + RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}], + RowBox[{ + RowBox[{ + RowBox[{ + SubscriptBox["P", "Y"], "[", + RowBox[{"y", ",", "L", ",", "\[Mu]", ",", "\[Sigma]"}], "]"}], " ", + "x"}], " ", "+", " ", "y"}]]}]}], "\n", RowBox[{ RowBox[{ SubscriptBox["\[CapitalDelta]", "X"], "[", @@ -710,13 +744,10 @@ Cell[BoxData[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox["L", - RowBox[{ - RowBox[{ - SubscriptBox["S", "0"], " ", "x"}], " ", "+", " ", "y"}]], + SubscriptBox["\[Delta]", "LiqY"], "[", RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], ")"}], + "\[CapitalDelta]", ",", "x", ",", "y", ",", "L", ",", "\[Mu]", ",", + "\[Sigma]", ",", "\[Gamma]"}], "]"}]}], ")"}], RowBox[{"\[CapitalPhi]", "[", RowBox[{ RowBox[{"-", "\[Sigma]"}], " ", "-", " ", @@ -728,14 +759,11 @@ Cell[BoxData[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox["L", - RowBox[{ - RowBox[{ - SubscriptBox["S", "0"], " ", "x"}], " ", "+", " ", "y"}]], + SubscriptBox["\[Delta]", "LiqY"], "[", RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], - ")"}]}]], "]"}]}], "]"}]}], "-", "x"}]}], "\n", + "\[CapitalDelta]", ",", "x", ",", "y", ",", "L", ",", "\[Mu]", + ",", "\[Sigma]", ",", "\[Gamma]"}], "]"}]}], ")"}]}]], "]"}]}], + "]"}]}], "-", "x"}]}], "\n", RowBox[{ RowBox[{ SubscriptBox["\[CapitalDelta]", "Y"], "[", @@ -747,15 +775,10 @@ Cell[BoxData[{ RowBox[{"(", RowBox[{"L", "+", RowBox[{ - FractionBox[ - RowBox[{ - SubscriptBox["S", "0"], "L"}], - RowBox[{ - RowBox[{ - SubscriptBox["S", "0"], " ", "x"}], " ", "+", " ", "y"}]], + SubscriptBox["\[Delta]", "LiqX"], "[", RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}], ")"}], + "\[CapitalDelta]", ",", "x", ",", "y", ",", "L", ",", "\[Mu]", ",", + "\[Sigma]", ",", "\[Gamma]"}], "]"}]}], ")"}], RowBox[{"\[CapitalPhi]", "[", RowBox[{ RowBox[{"-", "\[Sigma]"}], " ", "-", " ", @@ -765,68 +788,11 @@ Cell[BoxData[{ RowBox[{"x", "+", "\[CapitalDelta]"}], RowBox[{"L", "+", RowBox[{ - FractionBox[ - RowBox[{ - SubscriptBox["S", "0"], "L"}], - RowBox[{ - RowBox[{ - SubscriptBox["S", "0"], " ", "x"}], " ", "+", " ", "y"}]], + SubscriptBox["\[Delta]", "LiqX"], "[", RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", "\[Gamma]"}], "]"}]}]}]], "]"}]}], - "]"}]}], "-", "y"}]}], "\n", - RowBox[{"\[CapitalPhi]", "[", - FractionBox[ - RowBox[{ - RowBox[{"Log", "[", - SubscriptBox["S", "0"], "]"}], "-", - RowBox[{"Log", "[", "\[Mu]", "]"}]}], "\[Sigma]"], "]"}], "\n", - RowBox[{ - FractionBox[ - SubscriptBox["L", "0"], - RowBox[{ - SubscriptBox["x", "0"], "+", - SubscriptBox["y", "0"]}]], - FractionBox[ - RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}], - SubscriptBox["y", "0"]], - SubscriptBox["L", "0"]}], "\n", - RowBox[{ - RowBox[{ - FractionBox["L", - RowBox[{"x", "+", "y"}]], - RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"\[CapitalDelta]", ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}]}], "\n", - RowBox[{"(*", " ", - RowBox[{ - "Should", " ", "use", " ", "the", " ", "insight", " ", "from", " ", "G3M", - " ", "that", " ", "the", " ", "weight", " ", "we", " ", "need", " ", "to", - " ", "add", " ", "is", " ", "by", " ", "value"}], "*)"}], "\n"}], "\n", - RowBox[{"N", "[", - FractionBox[ - RowBox[{"1", "-", - RowBox[{"\[CapitalPhi]", "[", - RowBox[{ - SubscriptBox["d", "1"], "[", - RowBox[{ - SubscriptBox["S", "0"], ",", - SubscriptBox["\[Mu]", "0"], ",", - SubscriptBox["\[Sigma]", "0"]}], "]"}], "]"}]}], - RowBox[{ - SubscriptBox["\[Mu]", "0"], " "}]], "]"}], "\n", - RowBox[{"N", "[", - FractionBox[ - SubscriptBox["x", "0"], - RowBox[{ - RowBox[{ - SubscriptBox["S", "0"], " ", - SubscriptBox["x", "0"]}], " ", "+", " ", - SubscriptBox["y", "0"]}]], "]"}]}], "Code", + "\[CapitalDelta]", ",", "x", ",", "y", ",", "L", ",", "\[Mu]", ",", + "\[Sigma]", ",", "\[Gamma]"}], "]"}]}]], "]"}]}], "]"}]}], "-", + "y"}]}]}], "Code", CellChangeTimes->{{3.9113879019426517`*^9, 3.91138810608572*^9}, { 3.911388182414874*^9, 3.911388482660475*^9}, {3.911388787674255*^9, 3.911388979350903*^9}, {3.911389141187207*^9, 3.911389159323999*^9}, { @@ -885,101 +851,12 @@ Cell[BoxData[{ 3.9186457417525*^9}, {3.9186458580141783`*^9, 3.9186458880641613`*^9}, { 3.918646011039798*^9, 3.9186460131439123`*^9}, {3.918646045288979*^9, 3.918646059600195*^9}, {3.91864617045295*^9, 3.918646267932062*^9}, { - 3.9186464192975893`*^9, 3.91864641960671*^9}}, - CellLabel-> - "In[4040]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], - -Cell[BoxData[ - RowBox[{ - FractionBox["1", "2"], " ", - RowBox[{"Erfc", "[", - FractionBox[ - RowBox[{"Log", "[", "\[Mu]", "]"}], - RowBox[{ - SqrtBox["2"], " ", "\[Sigma]"}]], "]"}]}]], "Output", - CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, - 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { - 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { - 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, - 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, - 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { - 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { - 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { - 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { - 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, - 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, - 3.918646175402173*^9, {3.918646212956064*^9, 3.918646283633354*^9}}, + 3.9186464192975893`*^9, 3.91864641960671*^9}, {3.918646608483427*^9, + 3.91864684851731*^9}, {3.9186469185057583`*^9, 3.918647050242887*^9}, { + 3.918647093303738*^9, 3.918647093440069*^9}, {3.918647162357498*^9, + 3.9186471626747093`*^9}}, CellLabel-> - "Out[4043]=",ExpressionUUID->"fc3bd635-bd3a-41aa-8d75-d5bfad05535d"], - -Cell[BoxData[ - RowBox[{"0.012331328015027175`", " ", "\[CapitalDelta]"}]], "Output", - CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, - 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { - 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { - 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, - 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, - 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { - 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { - 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { - 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { - 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, - 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, - 3.918646175402173*^9, {3.918646212956064*^9, 3.91864628363549*^9}}, - CellLabel-> - "Out[4044]=",ExpressionUUID->"ac92ebbe-829b-4210-b402-8480defe2306"], - -Cell[BoxData[ - FractionBox[ - RowBox[{"0.0050000000000000044`", " ", "L", " ", "\[CapitalDelta]"}], - RowBox[{"x", "+", "y"}]]], "Output", - CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, - 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { - 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { - 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, - 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, - 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { - 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { - 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { - 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { - 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, - 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, - 3.918646175402173*^9, {3.918646212956064*^9, 3.918646283637189*^9}}, - CellLabel-> - "Out[4045]=",ExpressionUUID->"a29da640-5b8f-4124-b44d-155bf4eef839"], - -Cell[BoxData["0.4502617751698872`"], "Output", - CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, - 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { - 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { - 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, - 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, - 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { - 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { - 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { - 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { - 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, - 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, - 3.918646175402173*^9, {3.918646212956064*^9, 3.918646283638835*^9}}, - CellLabel-> - "Out[4046]=",ExpressionUUID->"501bf9f3-5f47-4301-9f0a-cb2bc2d528fb"], - -Cell[BoxData["0.5`"], "Output", - CellChangeTimes->{{3.91863165298916*^9, 3.918631714893094*^9}, - 3.918631766681827*^9, {3.9186318040237703`*^9, 3.918631830361062*^9}, { - 3.918631905078206*^9, 3.9186319462472897`*^9}, 3.91863200851618*^9, { - 3.918633011616115*^9, 3.918633064169323*^9}, {3.9186331020450478`*^9, - 3.918633120024514*^9}, {3.918633171973171*^9, 3.918633196407531*^9}, - 3.918633245352887*^9, {3.9186332944068747`*^9, 3.918633312054541*^9}, { - 3.9186333496044807`*^9, 3.918633384203433*^9}, 3.9186432975153837`*^9, { - 3.9186433484011374`*^9, 3.918643372840115*^9}, 3.9186436478527203`*^9, { - 3.918645690984017*^9, 3.918645705684268*^9}, 3.9186457422763653`*^9, { - 3.9186458697458773`*^9, 3.91864588906533*^9}, {3.9186459859507236`*^9, - 3.9186460136075583`*^9}, {3.918646055165572*^9, 3.918646060075061*^9}, - 3.918646175402173*^9, {3.918646212956064*^9, 3.918646283640362*^9}}, - CellLabel-> - "Out[4047]=",ExpressionUUID->"bb40be7b-0e6a-4b5c-957f-8c7fd0b3e591"] -}, Open ]], + "In[4174]:=",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ @@ -1006,14 +883,14 @@ Cell[BoxData[{ RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ - FractionBox["1", "2"], - RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"YIn", ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}], - FractionBox[ - SubscriptBox["L", "0"], - SubscriptBox["y", "0"]]}]}], ";"}], "\n", + SubscriptBox["\[Delta]", "LiqY"], "[", + RowBox[{"YIn", ",", + SubscriptBox["x", "0"], ",", + SubscriptBox["y", "0"], ",", + SubscriptBox["L", "0"], ",", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"], ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"Echo", "[", @@ -1051,14 +928,14 @@ Cell[BoxData[{ RowBox[{ RowBox[{"DeltaL", " ", "=", " ", RowBox[{ - FractionBox["1", "2"], - RowBox[{ - SubscriptBox["\[Delta]", "in"], "[", - RowBox[{"XIn", ",", - SubscriptBox["\[Gamma]", "0"]}], "]"}], - FractionBox[ - SubscriptBox["L", "0"], - SubscriptBox["x", "0"]]}]}], ";"}], "\n", + SubscriptBox["\[Delta]", "LiqX"], "[", + RowBox[{"XIn", ",", + SubscriptBox["x", "0"], ",", + SubscriptBox["y", "0"], ",", + SubscriptBox["L", "0"], ",", + SubscriptBox["\[Mu]", "0"], ",", + SubscriptBox["\[Sigma]", "0"], ",", + SubscriptBox["\[Gamma]", "0"]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"Echo", "[", RowBox[{ @@ -1094,9 +971,11 @@ Cell[BoxData[{ 3.918584645054994*^9, 3.9185846751565027`*^9}, {3.918584720161016*^9, 3.918584725365926*^9}, {3.918587956963675*^9, 3.918587962241294*^9}, 3.918589138602861*^9, 3.9186320307912188`*^9, {3.9186331433380632`*^9, - 3.9186331543138247`*^9}}, + 3.9186331543138247`*^9}, {3.9186468606918497`*^9, + 3.9186469067855988`*^9}, {3.918647072837221*^9, 3.918647073727294*^9}, { + 3.918647266809247*^9, 3.918647298407833*^9}}, CellLabel-> - "In[4048]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], + "In[4199]:=",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ @@ -1104,35 +983,35 @@ Cell[BoxData[ RowBox[{ TagBox["\<\"XOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "0.9950002431869507`"}]}]], "Echo", + RowBox[{"-", "1.3266667127609253`"}]}]], "Echo", CellChangeTimes->{ - 3.9186462856096687`*^9},ExpressionUUID->"c75da2d5-2788-412b-977d-\ -0c7ca2507a18"], + 3.9186472988237343`*^9},ExpressionUUID->"27baf199-5392-4622-872b-\ +c04b2522ee2d"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", "0.`"}]], "Echo", + "EchoLabel"], " ", + RowBox[{"-", "2.220446049250313`*^-16"}]}]], "Echo", CellChangeTimes->{ - 3.9186462856389914`*^9},ExpressionUUID->"9fa6eaed-366f-4aa9-9ba3-\ -c112eab9cd79"], + 3.91864729885005*^9},ExpressionUUID->"eecd11fc-1f1d-4de9-9e4a-07d53c8e0fbb"], Cell[BoxData[ RowBox[{ TagBox["\<\"YOut = \"\>", "EchoLabel"], " ", - RowBox[{"-", "0.9950002431869507`"}]}]], "Echo", + RowBox[{"-", "0.7462499886751175`"}]}]], "Echo", CellChangeTimes->{ - 3.918646285647941*^9},ExpressionUUID->"6b71ab51-db7d-4456-8eea-\ -04ea3ce733b6"], + 3.91864729885777*^9},ExpressionUUID->"292d880d-854e-49ac-80b7-b67aa90a72e5"], Cell[BoxData[ RowBox[{ TagBox["\<\"Validation = \"\>", - "EchoLabel"], " ", "0.`"}]], "Echo", + "EchoLabel"], " ", + RowBox[{"-", "2.220446049250313`*^-16"}]}]], "Echo", CellChangeTimes->{ - 3.9186462856694307`*^9},ExpressionUUID->"13deac56-91d7-452d-afff-\ -122d4396c6e2"] + 3.9186472988780203`*^9},ExpressionUUID->"38d83234-0ac4-4733-b57c-\ +347036548a09"] }, Open ]] }, Open ]] }, Open ]] @@ -2348,109 +2227,102 @@ Cell[13166, 382, 242, 6, 50, "Echo",ExpressionUUID->"865ae55a-ba52-403c-9134-dd9 Cell[CellGroupData[{ Cell[13469, 395, 307, 7, 107, "Subsection",ExpressionUUID->"a6874bc0-590c-4cb3-9d20-f010a014a154"], Cell[CellGroupData[{ -Cell[13801, 406, 2391, 45, 111, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], +Cell[13801, 406, 2471, 46, 111, "Code",ExpressionUUID->"085ca656-cc94-43cf-a8c6-c116e23e4910"], Cell[CellGroupData[{ -Cell[16217, 455, 275, 7, 50, "Echo",ExpressionUUID->"9d2b3d97-b3e0-48ae-a043-c2fe93fefab5"], -Cell[16495, 464, 232, 6, 50, "Echo",ExpressionUUID->"325d0f09-c927-4e0e-819b-0a3df79f6b2e"] +Cell[16297, 456, 275, 7, 50, "Echo",ExpressionUUID->"d46f0b65-6c97-4fd7-a377-fd814b863b4a"], +Cell[16575, 465, 234, 6, 50, "Echo",ExpressionUUID->"d830d4bf-eeeb-4bb6-a004-32188869cd46"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[16776, 476, 251, 6, 89, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], +Cell[16858, 477, 251, 6, 89, "Subsubsection",ExpressionUUID->"d0f44536-b00f-4974-8c75-dd65dd319645"], Cell[CellGroupData[{ -Cell[17052, 486, 1744, 46, 111, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], +Cell[17134, 487, 1744, 46, 111, "Code",ExpressionUUID->"57112165-db6f-447c-9713-f9c85c6d4828"], Cell[CellGroupData[{ -Cell[18821, 536, 293, 7, 50, "Echo",ExpressionUUID->"4674d060-49c9-4219-9efd-fc644a8caf6f"], -Cell[19117, 545, 274, 7, 50, "Echo",ExpressionUUID->"08110232-f66b-4e27-8547-3a897336da48"] +Cell[18903, 537, 279, 7, 50, "Echo",ExpressionUUID->"d45d2202-bcd3-4d72-9040-061ec9d3b3fd"], +Cell[19185, 546, 287, 7, 50, "Echo",ExpressionUUID->"7f4698d3-1c35-46e4-b14b-549da3ca9c05"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[19452, 559, 224, 4, 89, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], +Cell[19533, 560, 224, 4, 89, "Subsubsection",ExpressionUUID->"0dabba71-0908-48dd-b11c-9fc06ac2d79b"], Cell[CellGroupData[{ -Cell[19701, 567, 1307, 35, 111, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], -Cell[21011, 604, 211, 6, 50, "Echo",ExpressionUUID->"d259291b-abcf-436d-86e9-f78a15b5625f"] +Cell[19782, 568, 1307, 35, 111, "Code",ExpressionUUID->"05df5500-1e66-49a9-afd7-256365f8b6dc"], +Cell[21092, 605, 217, 6, 50, "Echo",ExpressionUUID->"2780423d-6264-4b5d-a5a5-68bad0b82ef8"] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[21271, 616, 284, 6, 89, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], -Cell[21558, 624, 1409, 42, 128, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] +Cell[21358, 617, 284, 6, 89, "Subsubsection",ExpressionUUID->"6c78f375-83c5-40c5-a26f-9dfafb83427b"], +Cell[21645, 625, 1409, 42, 128, "Code",ExpressionUUID->"05cdeb1a-e1b0-40a7-af51-51ab9b75cc2e"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[23028, 673, 155, 3, 134, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], -Cell[CellGroupData[{ -Cell[23208, 680, 290, 7, 107, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], +Cell[23115, 674, 155, 3, 134, "Section",ExpressionUUID->"e0558e89-2c12-471a-af64-7b6a1457eb4d"], Cell[CellGroupData[{ -Cell[23523, 691, 8847, 198, 700, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], -Cell[32373, 891, 1174, 21, 102, "Output",ExpressionUUID->"fc3bd635-bd3a-41aa-8d75-d5bfad05535d"], -Cell[33550, 914, 1050, 15, 73, "Output",ExpressionUUID->"ac92ebbe-829b-4210-b402-8480defe2306"], -Cell[34603, 931, 1106, 17, 99, "Output",ExpressionUUID->"a29da640-5b8f-4124-b44d-155bf4eef839"], -Cell[35712, 950, 1013, 14, 73, "Output",ExpressionUUID->"501bf9f3-5f47-4301-9f0a-cb2bc2d528fb"], -Cell[36728, 966, 998, 14, 73, "Output",ExpressionUUID->"bb40be7b-0e6a-4b5c-957f-8c7fd0b3e591"] -}, Open ]], +Cell[23295, 681, 290, 7, 107, "Subsection",ExpressionUUID->"2f7348b3-443c-4a22-943e-943b7962999e"], +Cell[23588, 690, 8190, 168, 362, "Code",ExpressionUUID->"0716117c-5381-46be-8b57-f2cefa727879"], Cell[CellGroupData[{ -Cell[37763, 985, 4522, 113, 542, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], +Cell[31803, 862, 4800, 115, 486, "Code",ExpressionUUID->"2687c350-1150-4951-bcf0-28364fa5bf73"], Cell[CellGroupData[{ -Cell[42310, 1102, 230, 7, 50, "Echo",ExpressionUUID->"c75da2d5-2788-412b-977d-0c7ca2507a18"], -Cell[42543, 1111, 202, 6, 50, "Echo",ExpressionUUID->"9fa6eaed-366f-4aa9-9ba3-c112eab9cd79"], -Cell[42748, 1119, 228, 7, 50, "Echo",ExpressionUUID->"6b71ab51-db7d-4456-8eea-04ea3ce733b6"], -Cell[42979, 1128, 202, 6, 50, "Echo",ExpressionUUID->"13deac56-91d7-452d-afff-122d4396c6e2"] +Cell[36628, 981, 230, 7, 50, "Echo",ExpressionUUID->"27baf199-5392-4622-872b-c04b2522ee2d"], +Cell[36861, 990, 235, 6, 50, "Echo",ExpressionUUID->"eecd11fc-1f1d-4de9-9e4a-07d53c8e0fbb"], +Cell[37099, 998, 225, 6, 50, "Echo",ExpressionUUID->"292d880d-854e-49ac-80b7-b67aa90a72e5"], +Cell[37327, 1006, 240, 7, 50, "Echo",ExpressionUUID->"38d83234-0ac4-4733-b57c-347036548a09"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[43254, 1142, 204, 4, 134, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], -Cell[43461, 1148, 568, 13, 107, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], +Cell[37640, 1021, 204, 4, 134, "Section",ExpressionUUID->"65d2b88d-22b2-481a-935c-71bdce9f21f1"], +Cell[37847, 1027, 568, 13, 107, "Text",ExpressionUUID->"f20cba79-bbb2-4d1b-9349-a349e8b0b7a4"], Cell[CellGroupData[{ -Cell[44054, 1165, 630, 15, 89, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], -Cell[44687, 1182, 685, 20, 137, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] +Cell[38440, 1044, 630, 15, 89, "Subsubsection",ExpressionUUID->"d7131855-64d1-451f-98f3-152b4aa9f3a5"], +Cell[39073, 1061, 685, 20, 137, "Code",ExpressionUUID->"fadd5b7c-a968-401d-9e42-d6ca30b3a2a6"] }, Open ]], Cell[CellGroupData[{ -Cell[45409, 1207, 268, 4, 107, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], +Cell[39795, 1086, 268, 4, 107, "Subsection",ExpressionUUID->"eed8b815-af5d-458f-8082-a956f0fb88b9"], Cell[CellGroupData[{ -Cell[45702, 1215, 460, 12, 89, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], +Cell[40088, 1094, 460, 12, 89, "Subsubsection",ExpressionUUID->"b20dcf41-6dfe-404c-8167-50b070efca5f"], Cell[CellGroupData[{ -Cell[46187, 1231, 11768, 323, 907, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], -Cell[57958, 1556, 3570, 78, 471, "Output",ExpressionUUID->"ff2c3a54-a3b1-4be6-afbb-32094a16572f"], +Cell[40573, 1110, 11768, 323, 907, "Code",ExpressionUUID->"6bec84e7-f813-4bb5-9a1e-8a3d86e897da"], +Cell[52344, 1435, 3570, 78, 471, "Output",ExpressionUUID->"ff2c3a54-a3b1-4be6-afbb-32094a16572f"], Cell[CellGroupData[{ -Cell[61553, 1638, 304, 7, 50, "Echo",ExpressionUUID->"6c3d9d24-049c-4137-b7e3-6cf83d94b59c"], -Cell[61860, 1647, 302, 8, 50, "Echo",ExpressionUUID->"255c6473-c036-4f07-8655-af783da13368"], -Cell[62165, 1657, 399, 10, 52, "Echo",ExpressionUUID->"a6e336c8-67e3-4548-aec6-53634d7b4e40"], -Cell[62567, 1669, 239, 6, 50, "Echo",ExpressionUUID->"5f8a3663-d1c0-4227-93e2-6e4110936aef"], -Cell[62809, 1677, 2090, 58, 241, "Echo",ExpressionUUID->"8b3d5769-45e4-45af-b1b7-284acb1d88ab"] +Cell[55939, 1517, 304, 7, 50, "Echo",ExpressionUUID->"6c3d9d24-049c-4137-b7e3-6cf83d94b59c"], +Cell[56246, 1526, 302, 8, 50, "Echo",ExpressionUUID->"255c6473-c036-4f07-8655-af783da13368"], +Cell[56551, 1536, 399, 10, 52, "Echo",ExpressionUUID->"a6e336c8-67e3-4548-aec6-53634d7b4e40"], +Cell[56953, 1548, 239, 6, 50, "Echo",ExpressionUUID->"5f8a3663-d1c0-4227-93e2-6e4110936aef"], +Cell[57195, 1556, 2090, 58, 241, "Echo",ExpressionUUID->"8b3d5769-45e4-45af-b1b7-284acb1d88ab"] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[64972, 1743, 171, 3, 107, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], +Cell[59358, 1622, 171, 3, 107, "Subsection",ExpressionUUID->"d44a8cc6-b4f0-4204-b250-e68ad4e19d99"], Cell[CellGroupData[{ -Cell[65168, 1750, 382, 10, 89, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], +Cell[59554, 1629, 382, 10, 89, "Subsubsection",ExpressionUUID->"800e047e-b69c-4509-bda4-30799fa9a63e"], Cell[CellGroupData[{ -Cell[65575, 1764, 7526, 215, 540, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], -Cell[73104, 1981, 3553, 78, 450, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], +Cell[59961, 1643, 7526, 215, 540, "Code",ExpressionUUID->"7ca95c98-841f-4a4d-8646-7ee5087c0cbe"], +Cell[67490, 1860, 3553, 78, 450, "Output",ExpressionUUID->"1f3d487e-7d60-4563-a2b3-f3aa65c1d146"], Cell[CellGroupData[{ -Cell[76682, 2063, 301, 7, 50, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], -Cell[76986, 2072, 301, 8, 50, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], -Cell[77290, 2082, 391, 10, 50, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], -Cell[77684, 2094, 238, 6, 50, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], -Cell[77925, 2102, 2460, 70, 173, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] +Cell[71068, 1942, 301, 7, 50, "Echo",ExpressionUUID->"20a8471e-d48d-4dc1-8a0f-2b45a51698ee"], +Cell[71372, 1951, 301, 8, 50, "Echo",ExpressionUUID->"5cd69ac1-3ee9-4f3c-b5cf-95d07eb0ff1c"], +Cell[71676, 1961, 391, 10, 50, "Echo",ExpressionUUID->"0834851c-ee77-4202-aa72-ad7a0f04c869"], +Cell[72070, 1973, 238, 6, 50, "Echo",ExpressionUUID->"e88a31f0-9ce3-43a8-a4fe-062f673969b4"], +Cell[72311, 1981, 2460, 70, 173, "Echo",ExpressionUUID->"24b12cbb-7a22-45fd-bb9e-d5824114ff9b"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ -Cell[80470, 2181, 164, 3, 134, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], +Cell[74856, 2060, 164, 3, 134, "Section",ExpressionUUID->"b9760121-93f2-4105-bc65-e6b3dbe04aec"], Cell[CellGroupData[{ -Cell[80659, 2188, 227, 5, 108, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], +Cell[75045, 2067, 227, 5, 108, "Subsection",ExpressionUUID->"bf3ecf5a-6ea2-4f9a-a236-2d3956e9c134"], Cell[CellGroupData[{ -Cell[80911, 2197, 2145, 57, 224, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], +Cell[75297, 2076, 2145, 57, 224, "Code",ExpressionUUID->"88153533-d3ba-42e3-8671-5c87d6eba466"], Cell[CellGroupData[{ -Cell[83081, 2258, 306, 8, 50, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], -Cell[83390, 2268, 298, 7, 50, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] +Cell[77467, 2137, 306, 8, 50, "Echo",ExpressionUUID->"9c86a598-6ad7-4cdc-b7d3-f17754fbb4f8"], +Cell[77776, 2147, 298, 7, 50, "Echo",ExpressionUUID->"edb1d49d-7246-436e-85d1-f3028622cb8d"] }, Open ]] }, Open ]] }, Open ]] From 4197a6e3971ec9e0c3677afcd18926b00aa3cc9b Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 11 Mar 2024 16:32:50 -0600 Subject: [PATCH 11/13] n-token nb and README --- src/GeometricMean/README.md | 96 ++--- src/GeometricMean/n_token_geometric_mean.nb | 406 ++++++++++++++++++++ 2 files changed, 446 insertions(+), 56 deletions(-) create mode 100644 src/GeometricMean/n_token_geometric_mean.nb diff --git a/src/GeometricMean/README.md b/src/GeometricMean/README.md index 538b682c..9f50d9d3 100644 --- a/src/GeometricMean/README.md +++ b/src/GeometricMean/README.md @@ -6,114 +6,97 @@ The `GeometricMean` DFMM gives the LP a portfolio that consists of a value-weigh If we pick the weight of the $X$-token to be $0.80$ and $0.20$ for the $Y$-token, then the LP will have a portfolio that is 80% in $X$ and 20% $Y$ by value. ## Core -We mark reserves as: -- $x \equiv \mathtt{rX}$ -- $y \equiv \mathtt{rY}$ +We mark the vector reserves as: +- $\boldsymbol{r} \in \R^n_+ \equiv \mathtt{reserves}$ -`GeometricMean` has two variable parameters: -- $w_X \equiv \mathtt{wX}$ -- $w_Y \equiv \mathtt{wY}$ +`GeometricMean` also assigns weights to each of the reserves: +- $\boldsymbol{w} \in [0,1]^n \equiv \mathtt{weights}$ - These parameters must satisfy $$ -w_x, w_y \geq 0 \\ -w_x+w_y=1 +\sum_{i=0}^{n-1} w_i = 1 $$ The **trading function** is: $$ -\boxed{\varphi(x,y;w_X,w_Y) = \left(\frac{x}{L}\right)^{w_X} \left(\frac{y}{L}\right)^{w_Y} -1} +\boxed{\varphi(\mathbf{r}, L;\mathbf{w}) = \prod_{i=0}^{n-1}\left(\frac{r_i}{L}\right)^{w_i} -1} $$ where $L$ is the **liquidity** of the pool. ## Price -The reported price of the pool given the reseres is: +The reported price of Token $i$ with respect to Token $j$is: $$ \begin{equation} -\boxed{P = \frac{w_X}{w_Y}\frac{y}{x}} +\boxed{P_{ij} = \frac{w_i}{w_j}\frac{r_j}{r_i}} +\end{equation} +$$ +Note $P_{ij} \neq P_{ji}$ in general. +Furthermore, assuming that token $n-1$ is the numeraire, then we can just write the price of Token $i$ as: +$$ +\begin{equation} +P_i = \frac{w_i}{w_{n-1}}\frac{r_{n-1}}{r_i} \end{equation} $$ -## Pool initialization -We need to initalize a pool from a given price $S_0$ and an amount of a token $x_0$ or $y_0$. +## Pool initialization +To initalize a pool, we must first specify the initial reserves and the weights. +Equivalently, and often more conveniently, we can specify the initial prices, the weights, and an amount of the numeraire token (Token $n-1$). -### Given $x$ and price -Using the price formula above in Eq. (1), we can solve for $y_0$: +### Given Reserves and Weights +If we are given the reserves and the weights, then we can solve for the liquidity by: $$ -\boxed{y_0 = \frac{w_Y}{w_X}S_0 x_0} -$$ -From here, we get: -$$ -\boxed{L_0 = x_0^{w_X}y_0^{w_Y}} +L = \prod_{i=0}^{n-1} r_i^{w_i}. $$ -### Given $y$ and price -Again, using Eq. (1), we get: -$$ -\boxed{x_0 = \frac{w_X}{w_Y}\frac{1}{S_0}y_0} +### Given Prices and Weights +If we have $P_i$ for all $i$ (noting that $P_{n-1} = 1$ by definition), then we can solve for the amount of reserve $r_i$ by: $$ -And again: -$$ -\boxed{L_0 = x_0^{w_X}y_0^{w_Y}} +r_i = \frac{w_i}{w_{n-1}}\frac{r_{n-1}}{P_i}, $$ +since the user will also have to specify the amount of the numeraire token. +We then compute $L$ as before. ## Swap We require that the trading function remain invariant when a swap is applied, that is: $$ -\left(\frac{x+\Delta_X}{L + \Delta_L}\right)^{w_X} \left(\frac{y+\Delta_Y}{L + \Delta_L}\right)^{w_Y}-1 = 0 +\boxed{\varphi(\mathbf{r} + \mathbf{\Delta_r}, L + \Delta_L;\mathbf{w}) = \prod_{i=0}^{n-1}\left(\frac{r_i + \Delta_{r_i}}{L + \Delta_L}\right)^{w_i} -1}. $$ -where either $\Delta_X$ or $\Delta_Y$ is given by user input and the $\Delta_L$ comes from fees. +In our case, we will deal with only single token input and single token output swaps. +Also, the $\Delta_L \geq 0$ and, in particular, is greater than zero when there is a nonzero swap fee. -In general, with a fee parameter $\gamma$, we have: +In general, with a fee parameter $\gamma$, we have a change in $L$ when tendering $r_i$ given by: $$ -\Delta_L = \frac{1}{2}(1-\gamma) L \frac{\Delta_R}{R} +\Delta_L = w_i(1-\gamma) L \frac{\Delta_{r_i}}{r_i}. $$ -where $R$ represents either token $X$ or $Y$. -### Trade in $\Delta_X$ for $\Delta_Y$ -If we want to trade in $\Delta_X$ for $\Delta_Y$, -we use our invariant equation and solve for $\Delta_Y$ in terms of $\Delta_X$ to get: -$$ -\boxed{\Delta_Y = \left(\frac{L + \Delta_L}{(x+\Delta_X)^{w_X}} \right)^{\frac{1}{w_Y}} - y} -$$ -### Trade in $\Delta_Y$ for $\Delta_X$ +### Trade in $\Delta_{r_i}$ for $\Delta_{r_j}$ If we want to trade in $\Delta_X$ for $\Delta_Y$, we use our invariant equation and solve for $\Delta_Y$ in terms of $\Delta_X$ to get: $$ -\boxed{\Delta_X = \left(\frac{L + \Delta_L}{(y+\Delta_Y)^{w_Y}} \right)^{\frac{1}{w_X}} - y} +\boxed{\Delta_{r_j} = \left(\frac{L + \Delta_L}{\displaystyle{\prod_{k \in \{0,\dots, n-1\} \setminus j}^{n-1} r_k^{w_k}}} \right)^{\frac{1}{w_X}} - r_j} $$ +This amount will be negative and the equation should be negated if you want a positive amount out. ## Allocations and Deallocations -**Input $\delta_X$:** If a user wants to allocate a specific amount of $\delta_X$, then it must be that: +**Input $\Delta_{r_i}$:** If a user wants to allocate a specific amount of Token $r_i$, then it must be that: $$ -\frac{x}{L} = \frac{x+\Delta_X}{L+\Delta_L} +\frac{r_i}{L} = \frac{r_i+\Delta_{r_i}}{L+\Delta_L} $$ which yields: $$ \Delta_L = L \frac{\Delta_X}{x} $$ -Then it must be that since the ratio of reserves cannot change. +Then it must be that since the ratio of reserves cannot change, so the amount that the other reserves change by is: $$ -\Delta_Y = y\frac{\Delta_X}{x} +\Delta_{r_j} = r_j\frac{\Delta_{r_i}}{r_i} $$ -**Input $\Delta_Y$:** To allocate a specific amount of $\Delta_Y$, then it must be that: -$$ -\frac{y}{\mu L} = \frac{y+\Delta_Y}{\mu(L+\Delta_L)} -$$ -which yields: -$$ -\Delta_L = L \frac{\Delta_Y}{y} -$$ -and we likewise get -$$ -\Delta_X = x\frac{\Delta_Y}{y} -$$ ## Value Function via $L$ and $S$ +To look at a value function, we will consider a pool with just a token $X$ and a numeraire $Y$. Given that we treat $Y$ as the numeraire, we know that the portfolio value of a pool when $X$ is at price $S$ is: $$ V = Sx(S) + y(S) @@ -129,3 +112,4 @@ $$ \boxed{V(L,S)=LS^{w_X}\left(\left( \frac{w_X}{w_Y}\right)^{w_Y}+\left( \frac{w_Y}{w_X}\right)^{w_X}\right)} $$ +For pools with $n$-tokens, the value function for any pair $r_i$ and the numeraire $r_{n-1}$ is given as above. \ No newline at end of file diff --git a/src/GeometricMean/n_token_geometric_mean.nb b/src/GeometricMean/n_token_geometric_mean.nb new file mode 100644 index 00000000..473aabf7 --- /dev/null +++ b/src/GeometricMean/n_token_geometric_mean.nb @@ -0,0 +1,406 @@ +(* Content-type: application/vnd.wolfram.mathematica *) + +(*** Wolfram Notebook File ***) +(* http://www.wolfram.com/nb *) + +(* CreatedBy='WolframDesktop 13.2' *) + +(*CacheID: 234*) +(* Internal cache information: +NotebookFileLineBreakTest +NotebookFileLineBreakTest +NotebookDataPosition[ 161, 7] +NotebookDataLength[ 13161, 396] +NotebookOptionsPosition[ 11523, 360] +NotebookOutlinePosition[ 12026, 377] +CellTagsIndexPosition[ 11983, 374] +WindowFrame->Normal*) + +(* Beginning of Notebook Content *) +Notebook[{ + +Cell[CellGroupData[{ +Cell["n-Token Geometric Mean Trading Function", "Title", + CellChangeTimes->{{3.918751578310741*^9, + 3.9187516237186537`*^9}},ExpressionUUID->"b9153d6d-addd-49dc-914c-\ +671e23f8f6c5"], + +Cell[BoxData[ + RowBox[{ + RowBox[{"On", "[", "Assert", "]"}], ";"}]], "Code", + CellLabel-> + "In[4437]:=",ExpressionUUID->"abb15b31-0a39-46c6-bf1d-00038da522b3"], + +Cell[BoxData[{ + RowBox[{ + RowBox[{ + RowBox[{"{", + RowBox[{ + SubscriptBox["w", "0"], ",", + SubscriptBox["w", "1"], ",", + SubscriptBox["w", "2"], ",", + SubscriptBox["\[Gamma]", "i"]}], "}"}], " ", "=", " ", + RowBox[{"{", + RowBox[{ + FractionBox["1", "4"], ",", + FractionBox["1", "2"], ",", + FractionBox["1", "4"], ",", "0.995"}], "}"}]}], ";"}], "\n", + RowBox[{ + RowBox[{ + RowBox[{"{", + RowBox[{ + SubscriptBox["r", "0"], ",", + SubscriptBox["r", "1"], ",", + SubscriptBox["r", "2"]}], "}"}], " ", "=", " ", + RowBox[{"{", + RowBox[{"2", ",", "1", ",", "4"}], "}"}]}], ";"}], "\n", + RowBox[{ + RowBox[{"Assert", "[", + RowBox[{ + SubscriptBox["w", "0"], ">=", "0"}], "]"}], ";", " ", + RowBox[{"Assert", "[", + RowBox[{ + SubscriptBox["w", "1"], ">=", "0"}], "]"}], ";", " ", + RowBox[{"Assert", "[", + RowBox[{ + SubscriptBox["w", "2"], ">=", "0"}], "]"}], ";"}], "\n", + RowBox[{ + RowBox[{"Assert", "[", + RowBox[{ + RowBox[{ + SubscriptBox["w", "0"], "+", + SubscriptBox["w", "1"], "+", + SubscriptBox["w", "2"]}], "==", "1"}], "]"}], ";"}]}], "Code", + CellChangeTimes->{{3.918751691232606*^9, 3.918751736459319*^9}, { + 3.918751784392592*^9, 3.918751817471953*^9}, {3.918751851607045*^9, + 3.91875188728032*^9}, {3.918752891330223*^9, 3.918752911941004*^9}, { + 3.918833722601438*^9, 3.918833724616372*^9}, {3.9188338684873323`*^9, + 3.918833887396367*^9}, {3.918833942167193*^9, 3.918833946922741*^9}}, + CellLabel-> + "In[4541]:=",ExpressionUUID->"a0e84500-0eec-4695-80c6-06f05dc58a45"], + +Cell[CellGroupData[{ + +Cell[BoxData[{ + RowBox[{ + RowBox[{ + RowBox[{"L", "[", + RowBox[{ + "r0_", ",", "r1_", ",", "r2_", ",", "w0_", ",", "w1_", ",", "w2_"}], + "]"}], " ", ":=", " ", + RowBox[{ + SuperscriptBox["r0", "w0"], + SuperscriptBox["r1", "w1"], + SuperscriptBox["r2", "w2"]}]}], ";"}], "\n", + RowBox[{ + RowBox[{ + RowBox[{"\[CurlyPhi]", "[", + RowBox[{ + "r0_", ",", "r1_", ",", "r2_", ",", "w0_", ",", "w1_", ",", "w2_", ",", + "L_"}], "]"}], " ", ":=", " ", + RowBox[{ + RowBox[{ + SuperscriptBox[ + RowBox[{"(", + FractionBox["r0", "L"], ")"}], "w0"], + SuperscriptBox[ + RowBox[{"(", + FractionBox["r1", "L"], ")"}], "w1"], + SuperscriptBox[ + RowBox[{"(", + FractionBox["r2", "L"], ")"}], "w2"]}], "-", "1"}]}], ";"}], "\n", + RowBox[{ + RowBox[{ + SubscriptBox["L", "i"], " ", ":=", " ", + RowBox[{"L", "[", + RowBox[{ + SubscriptBox["r", "0"], ",", + SubscriptBox["r", "1"], ",", + SubscriptBox["r", "2"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["w", "1"], ",", + SubscriptBox["w", "2"]}], "]"}]}], ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", + RowBox[{ + RowBox[{"N", "[", + SubscriptBox["L", "i"], "]"}], ",", " ", + "\"\\""}], + "]"}], ";"}], "\n", + RowBox[{"Assert", "[", + RowBox[{ + RowBox[{"\[CurlyPhi]", "[", + RowBox[{ + SubscriptBox["r", "0"], ",", + SubscriptBox["r", "1"], ",", + SubscriptBox["r", "2"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["w", "1"], ",", + SubscriptBox["w", "2"], ",", + SubscriptBox["L", "i"]}], "]"}], " ", "==", " ", "0"}], "]"}], "\n", + RowBox[{ + RowBox[{ + RowBox[{"P", "[", + RowBox[{"rj_", ",", "wj_"}], "]"}], " ", ":=", " ", + RowBox[{ + FractionBox["wj", + SubscriptBox["w", "2"]], + FractionBox[ + SubscriptBox["r", "2"], "rj"]}]}], ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", + RowBox[{ + RowBox[{"P", "[", + RowBox[{ + SubscriptBox["r", "0"], ",", + SubscriptBox["w", "0"]}], "]"}], ",", " ", + "\"\\""}], "]"}], ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", + RowBox[{ + RowBox[{"P", "[", + RowBox[{ + SubscriptBox["r", "1"], ",", + SubscriptBox["w", "0"]}], "]"}], ",", " ", + "\"\\""}], "]"}], ";"}]}], "Code", + CellChangeTimes->{{3.9187521241864777`*^9, 3.918752206468246*^9}, { + 3.918752408371162*^9, 3.9187525015264397`*^9}, {3.918752778204928*^9, + 3.9187527934165163`*^9}, {3.918752864976017*^9, 3.918752879664754*^9}, { + 3.918752910813592*^9, 3.9187529311666317`*^9}, 3.918810807339789*^9, + 3.9188187264364147`*^9, {3.918830706855132*^9, 3.918830811295597*^9}, { + 3.918833155720422*^9, 3.9188331576473083`*^9}, 3.918833261083931*^9, { + 3.918833415294015*^9, 3.918833528124111*^9}}, + CellLabel-> + "In[4545]:=",ExpressionUUID->"0e356c65-8dbf-4f2f-bf8a-bba723f830ef"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + TagBox["\<\"The initial \\!\\(\\*SubscriptBox[\\(L\\), \\(\\(i\\)\\(\\\\ \ +\\)\\)]\\)= \"\>", + "EchoLabel"], " ", "1.681792830507429`"}]], "Echo", + CellChangeTimes->{ + 3.918833950315713*^9},ExpressionUUID->"45bd1a35-2daf-486c-be7e-\ +ac9cf769f4bf"], + +Cell[BoxData[ + RowBox[{ + TagBox["\<\"Price of Token0 in terms of Token2 is: \ +\\!\\(\\*SubscriptBox[\\(P\\), \\(0\\)]\\) = \"\>", + "EchoLabel"], " ", "2"}]], "Echo", + CellChangeTimes->{ + 3.918833950343854*^9},ExpressionUUID->"153b6381-03f3-4cc5-b89e-\ +8a58c370c70d"], + +Cell[BoxData[ + RowBox[{ + TagBox["\<\"Price of Token0 in terms of Token2 is : \ +\\!\\(\\*SubscriptBox[\\(P\\), \\(1\\)]\\) = \"\>", + "EchoLabel"], " ", "4"}]], "Echo", + CellChangeTimes->{ + 3.9188339503546124`*^9},ExpressionUUID->"86ca229b-d3d3-4392-b475-\ +5c5b2a8c4703"] +}, Open ]] +}, Open ]], + +Cell[BoxData[{ + RowBox[{ + RowBox[{ + RowBox[{ + SubscriptBox["\[Delta]", "Liq"], "[", + RowBox[{ + "d0_", ",", "d1_", ",", "d2_", ",", "r0_", ",", "r1_", ",", "r2_", ",", + "w0_", ",", "w1_", ",", "w2_", ",", "L_", ",", "\[Gamma]_"}], "]"}], " ", + ":=", " ", + RowBox[{"L", " ", + RowBox[{"(", + RowBox[{"1", "-", "\[Gamma]"}], ")"}], + RowBox[{"(", " ", + RowBox[{ + RowBox[{"w0", " ", + FractionBox["d0", "r0"]}], " ", "+", " ", + RowBox[{"w1", " ", + FractionBox["d1", "r1"]}], " ", "+", " ", + RowBox[{"w2", " ", + FractionBox["d2", "r2"]}]}], ")"}]}]}], ";"}], "\n", + RowBox[{ + RowBox[{ + RowBox[{ + SubscriptBox["\[CapitalDelta]", "0"], "[", + RowBox[{ + "d1_", ",", "d2_", ",", "r0_", ",", "r1_", ",", "r2_", ",", "w0_", ",", + "w1_", ",", "w2_", ",", "L_", ",", "\[Gamma]_"}], "]"}], " ", ":=", " ", + + RowBox[{ + SuperscriptBox[ + RowBox[{"(", + FractionBox[ + RowBox[{"L", "+", + RowBox[{ + SubscriptBox["\[Delta]", "Liq"], "[", + RowBox[{ + "0", ",", "d1", ",", "d2", ",", "r0", ",", "r1", ",", "r2", ",", + "w0", ",", "w1", ",", "w2", ",", "L", ",", "\[Gamma]"}], "]"}]}], + RowBox[{ + SuperscriptBox[ + RowBox[{"(", + RowBox[{"r1", "+", "d1"}], ")"}], "w1"], + SuperscriptBox[ + RowBox[{"(", + RowBox[{"r2", "+", "d2"}], ")"}], "w2"]}]], ")"}], + FractionBox["1", "w0"]], "-", "r0"}]}], ";"}]}], "Code", + CellChangeTimes->{{3.918831190664383*^9, 3.918831375407617*^9}, + 3.918831755178097*^9, {3.918832333868799*^9, 3.918832358812463*^9}, { + 3.9188324005431747`*^9, 3.918832455177681*^9}, {3.918832495802816*^9, + 3.9188325358730917`*^9}}, + CellLabel-> + "In[4553]:=",ExpressionUUID->"23d32e68-bd22-4680-9cad-6dfbeb7a10f9"], + +Cell[CellGroupData[{ + +Cell[BoxData[{ + RowBox[{ + RowBox[{"d1In", " ", "=", " ", "1"}], ";"}], "\n", + RowBox[{ + RowBox[{"d0Out", " ", "=", " ", + RowBox[{ + SubscriptBox["\[CapitalDelta]", "0"], "[", + RowBox[{"d1In", ",", "0", ",", + SubscriptBox["r", "0"], ",", + SubscriptBox["r", "1"], ",", + SubscriptBox["r", "2"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["w", "1"], ",", + SubscriptBox["w", "2"], ",", + SubscriptBox["L", "i"], ",", + SubscriptBox["\[Gamma]", "i"]}], "]"}]}], ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", + RowBox[{ + "d0Out", ",", " ", + "\"\\""}], "]"}], ";"}], "\n", + RowBox[{ + RowBox[{"deltaL", " ", "=", " ", + RowBox[{ + SubscriptBox["\[Delta]", "Liq"], "[", + RowBox[{"0", ",", "d1In", ",", "0", ",", + SubscriptBox["r", "0"], ",", + SubscriptBox["r", "1"], ",", + SubscriptBox["r", "2"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["w", "1"], ",", + SubscriptBox["w", "2"], ",", + SubscriptBox["L", "i"], ",", + SubscriptBox["\[Gamma]", "i"]}], "]"}]}], ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", + RowBox[{ + "deltaL", ",", " ", + "\"\\""}], "]"}], ";"}], "\n", + RowBox[{ + RowBox[{"Echo", "[", + RowBox[{ + RowBox[{"\[CurlyPhi]", "[", + RowBox[{ + RowBox[{ + SubscriptBox["r", "0"], "+", "d0Out"}], ",", " ", + RowBox[{ + SubscriptBox["r", "1"], "+", "d1In"}], ",", + SubscriptBox["r", "2"], ",", + SubscriptBox["w", "0"], ",", + SubscriptBox["w", "1"], ",", + SubscriptBox["w", "2"], ",", + RowBox[{ + SubscriptBox["L", "i"], "+", "deltaL"}]}], "]"}], ",", " ", + "\"\\""}], "]"}], ";"}]}], "Code", + CellChangeTimes->{{3.918832548072268*^9, 3.918832558704307*^9}, { + 3.918832654073709*^9, 3.918832696307899*^9}, {3.918832748510351*^9, + 3.9188328562801743`*^9}, {3.918832937076887*^9, 3.918833022245729*^9}, { + 3.918833176995616*^9, 3.918833183177202*^9}, {3.918833845045725*^9, + 3.9188338531292753`*^9}, {3.918833895356765*^9, 3.918833895763596*^9}}, + CellLabel-> + "In[4555]:=",ExpressionUUID->"10e2bdf9-b3e1-49bd-a8b0-90a96f87bb2a"], + +Cell[CellGroupData[{ + +Cell[BoxData[ + RowBox[{ + TagBox["\<\"Amount out: \\!\\(\\*SubscriptBox[\\(\[CapitalDelta]\\), \ +\\(0\\)]\\) = \"\>", + "EchoLabel"], " ", + RowBox[{"-", "1.494981218730469`"}]}]], "Echo", + CellChangeTimes->{ + 3.918833952576915*^9},ExpressionUUID->"4493edf0-f1b4-4406-b26f-\ +093804d19521"], + +Cell[BoxData[ + RowBox[{ + TagBox["\<\"Liquidity change: \\!\\(\\*SubscriptBox[\\(\[CapitalDelta]\\), \ +\\(L\\)]\\) = \"\>", + "EchoLabel"], " ", "0.004204482076268576`"}]], "Echo", + CellChangeTimes->{ + 3.918833952606021*^9},ExpressionUUID->"2e895919-575c-4e22-a635-\ +66cffb839ef4"], + +Cell[BoxData[ + RowBox[{ + TagBox["\<\"Validation = \"\>", + "EchoLabel"], " ", "0.`"}]], "Echo", + CellChangeTimes->{ + 3.9188339526178627`*^9},ExpressionUUID->"b5051048-024e-4982-abd4-\ +ad63864fd797"] +}, Open ]] +}, Open ]] +}, Open ]] +}, +WindowSize->{3161, 2083}, +WindowMargins->{{Automatic, 12}, {Automatic, -819}}, +FrontEndVersion->"13.2 for Mac OS X ARM (64-bit) (January 31, 2023)", +StyleDefinitions->FrontEnd`FileName[{$RootDirectory, "Users", "colin", + "Documents"}, "DarkMode.nb", CharacterEncoding -> "UTF-8"], +ExpressionUUID->"49e64aa8-68d4-4425-b2a2-bba672c9d2ed" +] +(* End of Notebook Content *) + +(* Internal cache information *) +(*CellTagsOutline +CellTagsIndex->{} +*) +(*CellTagsIndex +CellTagsIndex->{} +*) +(*NotebookFileOutline +Notebook[{ +Cell[CellGroupData[{ +Cell[583, 22, 184, 3, 194, "Title",ExpressionUUID->"b9153d6d-addd-49dc-914c-671e23f8f6c5"], +Cell[770, 27, 161, 4, 69, "Code",ExpressionUUID->"abb15b31-0a39-46c6-bf1d-00038da522b3"], +Cell[934, 33, 1592, 46, 216, "Code",ExpressionUUID->"a0e84500-0eec-4695-80c6-06f05dc58a45"], +Cell[CellGroupData[{ +Cell[2551, 83, 3096, 92, 421, "Code",ExpressionUUID->"0e356c65-8dbf-4f2f-bf8a-bba723f830ef"], +Cell[CellGroupData[{ +Cell[5672, 179, 277, 7, 50, "Echo",ExpressionUUID->"45bd1a35-2daf-486c-be7e-ac9cf769f4bf"], +Cell[5952, 188, 271, 7, 50, "Echo",ExpressionUUID->"153b6381-03f3-4cc5-b89e-8a58c370c70d"], +Cell[6226, 197, 274, 7, 50, "Echo",ExpressionUUID->"86ca229b-d3d3-4392-b475-5c5b2a8c4703"] +}, Open ]] +}, Open ]], +Cell[6527, 208, 1833, 51, 184, "Code",ExpressionUUID->"23d32e68-bd22-4680-9cad-6dfbeb7a10f9"], +Cell[CellGroupData[{ +Cell[8385, 263, 2288, 63, 278, "Code",ExpressionUUID->"10e2bdf9-b3e1-49bd-a8b0-90a96f87bb2a"], +Cell[CellGroupData[{ +Cell[10698, 330, 293, 8, 50, "Echo",ExpressionUUID->"4493edf0-f1b4-4406-b26f-093804d19521"], +Cell[10994, 340, 284, 7, 50, "Echo",ExpressionUUID->"2e895919-575c-4e22-a635-66cffb839ef4"], +Cell[11281, 349, 202, 6, 50, "Echo",ExpressionUUID->"b5051048-024e-4982-abd4-ad63864fd797"] +}, Open ]] +}, Open ]] +}, Open ]] +} +] +*) + +(* End of internal cache information *) + From d9ba55599fb4383da5c924f8df2481da46635f37 Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 11 Mar 2024 16:36:16 -0600 Subject: [PATCH 12/13] update `ConstantSum` README --- src/ConstantSum/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ConstantSum/README.md b/src/ConstantSum/README.md index 0bd2d04d..fed9605c 100644 --- a/src/ConstantSum/README.md +++ b/src/ConstantSum/README.md @@ -15,7 +15,7 @@ We mark reserves as: The **trading function** is: $$ -\boxed{\varphi(x,y,L;P) = \frac{x}{L} + \frac{y}{LP} -1} +\boxed{\varphi(x,y,L;P) =P \frac{x}{L} + \frac{y}{L} -1} $$ where $L$ is the **liquidity** of the pool. @@ -26,13 +26,13 @@ The reported price of the pool given the reseres is $P$. The `ConstantSum` pool can be initialized with any given price and any given value of reserves. A user may supply $(x_0,y_0,P)$, then we find that: $$ -L_0 = x_0 + \frac{y_0}{P} +L_0 = Px_0 + y_0 $$ ## Swap We require that the trading function remain invariant when a swap is applied, that is: $$ -\frac{x+\Delta_X}{L + \Delta_L} + \frac{y+\Delta_Y}{P(L + \Delta_L)}-1 = 0 +P\frac{x+\Delta_X}{L + \Delta_L} + \frac{y+\Delta_Y}{L + \Delta_L}-1 = 0 $$ where either $\Delta_X$ or $\Delta_Y$ is given by user input and the $\Delta_L$ comes from fees. @@ -63,7 +63,7 @@ Allocations and deallocations should not change the price of a pool and since th We need only compute the new $L$. Specifically: $$ -\Delta_L = \Delta_X + \frac{\Delta_Y}{P} +\Delta_L = P\Delta_X + \Delta_Y $$ From ea99efc97b29b65d0cd2f1e9a079ae2487e4eaff Mon Sep 17 00:00:00 2001 From: Colin Roberts Date: Mon, 11 Mar 2024 16:47:18 -0600 Subject: [PATCH 13/13] update `LogNormal` README --- src/LogNormal/README.md | 85 +++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/src/LogNormal/README.md b/src/LogNormal/README.md index 6ecfadc6..1d7b7077 100644 --- a/src/LogNormal/README.md +++ b/src/LogNormal/README.md @@ -2,9 +2,11 @@ This will be all the background needed to understand the `LogNormal` DFMM. ## Conceptual Overview -The `LogNormal` DFMM provides the LP with a a log-normal shaped liquidity distribution centered around a price $K$ with a width given by $\sigma$. -This strategy can be made time-dependent by an additional $\tau$ parameter that is the time til the pool will "expire". -In this case, the LN trading function provides the LP with a payoff that is equivalent to a Black-Scholes covered call option with strike $K$, implied volatility $\sigma$, and time to expiration $\tau$. The parameters $K$ and $\sigma$ can also be made time dependent. +The `LogNormal` DFMM provides the LP with a a log-normal shaped liquidity distribution centered around a price $\mu$ with a width given by $\sigma$. + +Note that this strategy can be made time-dependent by an additional $\tau$ parameter that is the time til the pool will "expire". +In this case, the LN trading function provides the LP with a payoff that is equivalent to a Black-Scholes covered call option with strike $K = \mu$, implied volatility $\sigma$, and time to expiration $\tau$. +We do not cover this explicitly here. ## Core We mark reserves as: @@ -40,7 +42,7 @@ d_1(S;\mu,\sigma) = \frac{\ln\frac{S}{\mu}+\frac{1}{2}\sigma^2 }{\sigma} $$ $$ \begin{equation} -d_2(S;\mu,\sigma) = \frac{\ln\frac{S}{K}-\frac{1}{2}\sigma^2 }{\sigma} +d_2(S;\mu,\sigma) = \frac{\ln\frac{S}{\mu}-\frac{1}{2}\sigma^2 }{\sigma} \end{equation} $$ @@ -86,7 +88,7 @@ $$ $$ From this, we can get the amount $y_0$ $$ -\boxed{y_0 = \mu L_0 \Phi(d_2(S;K,\sigma, \tau))} +\boxed{y_0 = \mu L_0 \Phi(d_2(S;\mu,\sigma, \tau))} $$ @@ -104,6 +106,35 @@ $$ \boxed{x_0 = L_0 \left(1-\Phi\left(d_1(S;\mu,\sigma)\right)\right)} $$ +## Allocations and Deallocations +Allocations and deallocations should not change the price of a pool, and hence the ratio of reserves cannot change while increasing liquidity the correct amount. + +**Input $\Delta_X$:** If a user wants to allocate a specific amount of $\Delta_X$, then it must be that: +$$ +\frac{x}{L} = \frac{x+\Delta_X}{L+\Delta_L} +$$ +which yields: +$$ +\boxed{\Delta_L = L \frac{\Delta_X}{x}} +$$ +Then it must be that +$$ +\boxed{\Delta_Y = y\frac{\Delta_X}{x}} +$$ + +**Input $\Delta_Y$:** To allocate a specific amount of $\Delta_Y$, then it must be that: +$$ +\frac{y}{\mu L} = \frac{y+\Delta_Y}{\mu(L+\Delta_L)} +$$ +which yields: +$$ +\boxed{\Delta_L = L \frac{\Delta_Y}{y}} +$$ +and we likewise get +$$ +\boxed{\Delta_X = x\frac{\Delta_Y}{y}} +$$ + ## Swaps We require that the trading function remain invariant when a swap is applied, that is: $$ @@ -115,8 +146,13 @@ where either $\Delta_X$ or $\Delta_Y$ is given by user input and the $\Delta_L$ If we want to trade in $\Delta_X$ for $\Delta_Y$, we first accumulate fees by taking $$ -\Delta_L = (1-\gamma) \Delta_X. +\textrm{Fees} = (1-\gamma) \Delta_X. $$ +Then, we treat these fees as an allocation, therefore: +$$ +\boxed{\Delta_L = \frac{P}{Px +y}L\frac{(1-\gamma)\Delta_X}{x}} +$$ +where $P$ is the price of token $X$ quoted by the pool itself (i.e., using $P_X$ or $P_Y$ in Eq. (4) or (5) above). Then we can use our invariant equation and solve for $\Delta_Y$ in terms of $\Delta_X$ to get: $$ \boxed{\Delta_Y = \mu (L+\Delta_L)\cdot\Phi\left(-\sigma-\Phi^{-1}\left(\frac{x+\Delta_X}{L+\Delta_L}\right)\right)-y} @@ -126,41 +162,14 @@ $$ If we want to trade in $\Delta_X$ for $\Delta_Y$, we first accumulate fees by taking $$ -\Delta_L = \frac{1-\gamma}{\mu} \Delta_Y. +\boxed{\Delta_L = L\frac{(1-\gamma)\Delta_X}{Px +y}} $$ Then we can use our invariant equation and solve for $\Delta_X$ in terms of $\Delta_Y$ to get: $$ -\boxed{\Delta_X = (L+\delta_L)\cdot\Phi\left(-\sigma-\Phi^{-1}\left(\frac{y+\Delta_Y}{K(L+\Delta_L)}\right)\right)-x} +\boxed{\Delta_X = (L+\Delta_L)\cdot\Phi\left(-\sigma-\Phi^{-1}\left(\frac{y+\Delta_Y}{\mu(L+\Delta_L)}\right)\right)-x} $$ -## Allocations and Deallocations -Allocations and deallocations should not change the price of a pool, and hence the ratio of reserves cannot change while increasing liquidity the correct amount. - -**Input $\delta_X$:** If a user wants to allocate a specific amount of $\delta_X$, then it must be that: -$$ -\frac{x}{L} = \frac{x+\Delta_X}{L+\Delta_L} -$$ -which yields: -$$ -\Delta_L = L \frac{\Delta_X}{x} -$$ -Then it must be that -$$ -\Delta_Y = y\frac{\Delta_X}{x} -$$ -**Input $\Delta_Y$:** To allocate a specific amount of $\Delta_Y$, then it must be that: -$$ -\frac{y}{\mu L} = \frac{y+\Delta_Y}{\mu(L+\Delta_L)} -$$ -which yields: -$$ -\Delta_L = L \frac{\Delta_Y}{y} -$$ -and we likewise get -$$ -\Delta_X = x\frac{\Delta_Y}{y} -$$ ## Value Function on $L(S)$ @@ -172,12 +181,12 @@ V = Sx + y $$ We can get the following from the trading function: $$ -x = LS\cdot\left(1-\Phi\left(\frac{\ln\frac{S}{K}+\frac{1}{2}\sigma^2}{\sigma}\right)\right)\\ -y = K\cdot L\cdot \Phi\left(\frac{\ln\frac{S}{K}-\frac{1}{2}\sigma^2}{\sigma}\right) +x = LS\cdot\left(1-\Phi\left(\frac{\ln\frac{S}{\mu}+\frac{1}{2}\sigma^2}{\sigma}\right)\right)\\ +y = \mu\cdot L\cdot \Phi\left(\frac{\ln\frac{S}{\mu}-\frac{1}{2}\sigma^2}{\sigma}\right) $$ Therefore: $$ -\boxed{V(L,S) = L\left( S\cdot\left(1-\Phi\left(\frac{\ln\frac{S}{K}+\frac{1}{2}\sigma^2}{\sigma}\right)\right) + K\cdot \Phi\left(\frac{\ln\frac{S}{K}-\frac{1}{2}\sigma^2}{\sigma}\right)\right)} +\boxed{V(L,S) = L\left( S\cdot\left(1-\Phi\left(\frac{\ln\frac{S}{\mu}+\frac{1}{2}\sigma^2}{\sigma}\right)\right) + \mu\cdot \Phi\left(\frac{\ln\frac{S}{\mu}-\frac{1}{2}\sigma^2}{\sigma}\right)\right)} $$ ### Time Dependence