(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 6459, 186] NotebookOptionsPosition[ 5887, 164] NotebookOutlinePosition[ 6395, 183] CellTagsIndexPosition[ 6352, 180] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["The D-Table Column Selector", "Section"], Cell["\<\ In order to use this tool, you will need a copy of Mathematica 6.0 or \ newer.Note that version 6.0 or newer is absolutely necessary.This file will \ not work on older versions of Mathematica. Ensure that MeetingThreeOut.xml is in the same directory as this file, and \ ensure you are connected to the internet as this tool uses current stock \ market prices. From the \"Edit\" menu, choose \"Select All.\" Then from the \"Evaluation\" \ menu, choose \"Evaluate Cells.\" MeetingFourIn.xml is displayed below and created in the same directory as \ this file.\ \>", "Text", CellChangeTimes->{{3.3931749791065283`*^9, 3.3931750006305285`*^9}, { 3.3931750307195287`*^9, 3.3931752368115287`*^9}, 3.3931754404235287`*^9, { 3.393175793624529*^9, 3.3931757939695287`*^9}}], Cell["", "SectionFirst", CellChangeTimes->{{3.393175442742529*^9, 3.3931754517185287`*^9}, 3.3931755241885285`*^9}], Cell[BoxData[{ RowBox[{ RowBox[{"M3O", "=", RowBox[{"Import", "[", RowBox[{ RowBox[{"NotebookDirectory", "[", "]"}], "<>", "\"\\""}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"n", "=", RowBox[{"Length", "[", RowBox[{"StringCases", "[", RowBox[{"M3O", ",", "\"\\""}], "]"}], "]"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Stocks", "=", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"BinarySeed", "=", RowBox[{"Mod", "[", RowBox[{ RowBox[{"IntegerPart", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{"FinancialData", "[", "#", "]"}], "&"}], "/@", "Stocks"}], "]"}], "*", "100"}], "]"}], ",", "2"}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"CA", "=", RowBox[{"CellularAutomaton", "[", RowBox[{"30", ",", "BinarySeed", ",", RowBox[{"(", RowBox[{"n", "+", RowBox[{"Length", "[", "BinarySeed", "]"}]}], ")"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Sides", "=", RowBox[{"Take", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"CA", "[", RowBox[{"[", RowBox[{"All", ",", RowBox[{"{", "1", "}"}]}], "]"}], "]"}], "]"}], ",", RowBox[{"-", "n"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Sides", "=", RowBox[{"ReplacePart", "[", RowBox[{"Sides", ",", " ", "\"\\>\"", ",", RowBox[{"Position", "[", RowBox[{"Sides", ",", "0"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Sides", "=", RowBox[{"ReplacePart", "[", RowBox[{"Sides", ",", " ", "\"\\>\"", ",", RowBox[{"Position", "[", RowBox[{"Sides", ",", "1"}], "]"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Do", "[", RowBox[{ RowBox[{"M3O", "=", RowBox[{"StringReplace", "[", RowBox[{"M3O", ",", RowBox[{ RowBox[{"Shortest", "[", RowBox[{"\"\\"", "~~", "__", "~~", "\"\\>\""}], "]"}], "\[Rule]", RowBox[{"Sides", "[", RowBox[{"[", "i", "]"}], "]"}]}], ",", "1", ",", RowBox[{"IgnoreCase", "\[Rule]", "True"}]}], "]"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"M3O", "=", RowBox[{"StringReplace", "[", RowBox[{"M3O", ",", RowBox[{ RowBox[{"Shortest", "[", RowBox[{"\"\<\>\"", "~~", "__", "~~", "\"\<\>\""}], "]"}], "\[Rule]", "\"\<\>\""}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Export", "[", RowBox[{ RowBox[{ RowBox[{"NotebookDirectory", "[", "]"}], "<>", "\"\\""}], ",", "M3O", ",", "\"\\""}], "]"}], ";"}]}], "Input", CellChangeTimes->{{3.392749501532*^9, 3.3927495385889997`*^9}, { 3.392749584822*^9, 3.392749592597*^9}, 3.3927497018450003`*^9, { 3.392749745245*^9, 3.392749750639*^9}, {3.3928242699094*^9, 3.3928242714094*^9}, {3.3928243336984*^9, 3.3928243365404*^9}, { 3.3928244517444*^9, 3.3928244639174*^9}, {3.3928246400324*^9, 3.3928247230134*^9}, {3.3928250813244*^9, 3.3928250848434*^9}, { 3.3928300839224*^9, 3.3928300912594*^9}, {3.3928303449653997`*^9, 3.3928303452194*^9}}, CellLabel->"In[1]:="] }, Open ]] }, WindowSize->{1264, 717}, WindowMargins->{{-1, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, CellLabelAutoDelete->False, FrontEndVersion->"6.0 for Microsoft Windows (32-bit) (April 20, 2007)", StyleDefinitions->FrontEnd`FileName[{"Creative"}, "PastelColor.nb", CharacterEncoding -> "WindowsANSI"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[590, 23, 46, 0, 75, "Section"], Cell[639, 25, 784, 17, 137, "Text"], Cell[1426, 44, 120, 2, 23, "SectionFirst"], Cell[1549, 48, 4322, 113, 302, "Input"] }, Open ]] } ] *) (* End of internal cache information *)