Investing with Noel Constant
Nothing here constitutes financial advise!!! If it wasn’t obvious.
Introduction
Noel Constant is a fictional character in Kurt Vonnegut’s The Sirens of Titan. In the book, Noel amassed his fortune through a rather peculiar investment strategy, the Gideon Bible. From the book (The Sirens of Titan, page 98), he started with $8200 and became one of the richest people on Earth. He did this by taking the Bible, took each sentence, capitalized the letters, put periods between each letter, and divid each sentence into pairs of letters. Using this, he would invest his money into the first company matching the pair of letters and sell it immediately once it doubled in price. In this post, we will look at what companies Noel would have invested in, if he would start at the time of writing (2015-05-15).
Data
The first sentence of the Gideon Bible, according to The Sirens of Titan (page 99) is: “In the beginning God created the heaven and the earth.” Now, Noel Constant using this system would make the sentence into: “I.N, T.H, E.B, ….”.
Bible Version
I have unfortunately not been able to obtain the Gideon version of the bible, but was able to locate the King James Version from Project Gutenberg available in plain text.
To do this, the tm package will be employed so that filtering of the data will be easily done. This will involve removing numbers and punctuation.
Unfortunately, there is quite a bit of header information that needs to be removed for parsing. If we take a look at the text file, we can see where the book starts and ends. For this file we are looking for the following two sentences: ‘START OF THIS PROJECT GUTENBERG EBOOK’ and ‘End of the Project Gutenberg EBook’.
Seems now that that new line spaces are being taken up the space. Removing these to try and get closer to the actual text.
Just about there. According to The Sirens of Titan, the title of the parts of the bible was not considered, eg “The First Book of Moses: Called Genesis”. All titles of the parts of the bible will need to be removed, fortunately they can be parsed easily due to the structure of verses and that we removed new lines earlier.
Now using the tm package, to start removing numbers, punctuation, and extra white space.
The last bit is now to separate the string into groups of two characters:
Now, the next step will be to take these ‘stock symbols’ and get their trading history.
Obtaining Stock Quotes
Using quantmod, the individual stocks can be queried and attempted to see how fruitful his investments would of been. Since, not sure where he is investing and when, the NASDAQ, NYSE, and AMEX stock markets will be used.
Now, we have both symbols from the Bible and stock symbols, we can reduce the symbols generated from the Bible.
Now if we would want to grab historical data for a stock, getSymbols function can be used such as:
getSymbols("AAPL", from=as.Date("1900-01-01"), to=Sys.Date())
Since the range of dates and truly investing from the future is much harder, this will not be done. Issues that come up are, choosing a starting date, removing stocks whos IPO maybe to new, and stocks that don’t double in price. For the purpose of this, we will just look at in a hypothetical perfect world what Noel would have invested in.
Invested Companies
Looking at the invested companies, a large data frame will be created with each company invested in symbol, IPO date, company name, last sale price, market cap, sector, industry, and the exchange it is listed under.
To take a look at what Noel would be investing in:
Number of Investments, if he worked all the way through the Bible:
Total number of unique companies invested in:
Look at first few investments:
symbol | Name | LastSale | MarketCap | IPOyear | Sector | Industry | Exchange |
---|---|---|---|---|---|---|---|
NI | Alcoa Inc. | 88.010 | NA | NA | Capital Goods | Metal Fabrications | AMEX |
NG | Altisource Asset Management Corp | 12.510 | $22.44M | NA | Finance | Real Estate | AMEX |
RE | Almaden Minerals, Ltd. | 1.120 | $87.58M | 2015 | Basic Industries | Precious Metals | AMEX |
AT | Aberdeen Emerging Markets Smaller Company Opportunities Fund I | 11.830 | $115.16M | NA | NA | NA | AMEX |
ED | Acme United Corporation. | 17.290 | $57.62M | 1988 | Capital Goods | Industrial Machinery/Components | AMEX |
EA | AeroCentury Corp. | 9.215 | $14.44M | NA | Technology | Diversified Commercial Services | AMEX |
The complete data frame can be downloaded here.
Other
For repeatability, my session info: