diff --git a/nb/SEC-13F-parse.ipynb b/nb/SEC-13F-parse.ipynb
index e0a9d2b..6699900 100644
--- a/nb/SEC-13F-parse.ipynb
+++ b/nb/SEC-13F-parse.ipynb
@@ -4,17 +4,37 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "# SEC 13F form\n",
+ "# Parsing SEC 13F forms\n",
"\n",
- "We examine 13F filings which are quarterly reports filed per SEC regulations by institutional investment managers containing all equity assets under management of at least \\$100 million in value. **Form 13F is required to be filed within 45 days of the end of a calendar quarter** (*which should be considered as significant information latency*).\n",
+ "We examine 13F filings which are quarterly reports filed per SEC regulations\n",
+ "by institutional investment managers containing all equity assets under management\n",
+ "of at least \\$ 100 million in value. **Form 13F is required to be filed\n",
+ "within 45 days of the end of a calendar quarter**\n",
+ "(*which should be considered as significant information latency*).\n",
"\n",
- "Form 13F *only reports long* positions. Short positions are not required to be disclosed and are not reported. Section 13(f) securities generally include equity securities that trade on an exchange (including Nasdaq), certain equity options and warrants, shares of closed-end investment companies, and certain convertible debt securities. The shares of open-end investment companies (i.e. mutual funds) are not Section 13(f) securities. See [Official List of Section 13(f) Securities](http://www.sec.gov/divisions/investment/13flists.htm) and our caveats section below.\n",
+ "Form 13F *only reports long* positions.\n",
+ "Short positions are not required to be disclosed and are not reported.\n",
+ "Section 13(f) securities generally include equity securities\n",
+ "that trade on an exchange (including Nasdaq), certain equity options and warrants,\n",
+ "shares of closed-end investment companies, and certain convertible debt securities.\n",
+ "The shares of open-end investment companies\n",
+ "(i.e. mutual funds) are not Section 13(f) securities.\n",
+ "See [Official List of Section 13(f) Securities](http://www.sec.gov/divisions/investment/13flists.htm) and our caveats section below.\n",
"\n",
- "Form 13F does not include neither total portfolio value nor percentage allocation of each stock listed. We remedy that, and also parse the report for easy reading. Our notebook will then develop into a module *yi_secform* which will do all the work via one function.\n",
+ "Form 13F surprisingly excludes total portfolio value and percentage allocation\n",
+ "of each stock listed. We remedy that, and also parse the report for easy reading.\n",
+ "Our notebook then develops into a module **yi_secform** which will do\n",
+ "all the work via one function.\n",
"\n",
- "As specific example, we focus on Druckenmiller and Paulson as asset managers who have significant positions in GLD, a gold ETF.\n",
+ "As specific example, we follow Druckenmiller and Paulson as asset managers\n",
+ "who have significant positions in GLD, a gold ETF.\n",
+ "We show the Druckenmiller's sudden accumulation,\n",
+ "and Paulson's dramatic liquidation.\n",
"\n",
- "Top holdings are easily analyzed by a single Python module: **yi_secform**"
+ "*Top holdings are easily analyzed by a single Python module:* **yi_secform**\n",
+ "Caveats are disclosed in the first section.\n",
+ "\n",
+ "Shortcut to this notebook: https://git.io/13F"
]
},
{
@@ -23,19 +43,42 @@
"source": [
"*Dependencies:*\n",
"\n",
- " - Linux, bash [not crucial, cross-platform prefered]\n",
- " - Python: matplotlib, pandas [recommend Anaconda distribution]\n",
- " - Modules: numpy, lxml, html5lib, yi_secform\n",
+ "- Repository: https://github.com/rsvp/fecon235 -- Module: yi_secform\n",
+ "- Python: pandas, numpy, lxml, bs4, html5lib\n",
" \n",
"*CHANGE LOG*\n",
"\n",
+ " 2016-02-22 Fix issue #2 by v4 and p6 updates.\n",
+ " Replace .sort(columns=...) with .sort_values(by=...)\n",
+ " since pandas 0.17.1 gives us future deprecation warning.\n",
+ " Paulson liquidates 37.6% of his GLD inventory.\n",
" 2015-11-16 Update in Appendix for Druckenmiller and Paulson.\n",
" 2015-08-28 First version."
]
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "from fecon235.fecon235 import *\n",
+ "\n",
+ "# pandas will give best results\n",
+ "# if it can call the Python package: lxml,\n",
+ "# and as a fallback: bs4 and html5lib.\n",
+ "# They parse (non-strict) XML and HTML pages.\n",
+ "# Be sure those three packages are pre-installed.\n",
+ "\n",
+ "from fecon235.lib import yi_secform\n",
+ "# We are going to derive this module in this notebook."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
"metadata": {
"collapsed": false
},
@@ -44,72 +87,52 @@
"name": "stdout",
"output_type": "stream",
"text": [
- "\n",
- " :: TIMESTAMP of last notebook execution:\n",
- "Mon Nov 16 18:13:39 PST 2015\n",
- " :: IPython version:\n",
- "3.2.1\n",
- " :: pandas version:\n",
- "0.16.2\n",
- " :: Working directory (set as $workd):\n",
- "/home/yaya/Dropbox/ipy/fecon235/nb\n",
- "\n"
+ " :: Python 2.7.11\n",
+ " :: IPython 4.0.0\n",
+ " :: jupyter 1.0.0\n",
+ " :: notebook 4.0.6\n",
+ " :: matplotlib 1.4.3\n",
+ " :: numpy 1.10.1\n",
+ " :: pandas 0.17.1\n",
+ " :: pandas_datareader 0.2.0\n",
+ " :: Repository: fecon235 v4.16.0221 develop\n",
+ " :: Timestamp: 2016-02-23, 19:11:16 UTC\n",
+ " :: $pwd: /media/yaya/virt15h/virt/dbx/Dropbox/ipy/fecon235/nb\n"
]
}
],
"source": [
- "# NOTEBOOK v4 settings and system details: [00-tpl v4.15.0812]\n",
- "\n",
- "# Assume that the backend is LINUX (e.g. Ubuntu running bash shell):\n",
- "print '\\n :: TIMESTAMP of last notebook execution:'\n",
- "!date\n",
- "print ' :: IPython version:'\n",
- "!ipython --version\n",
- "\n",
- "# Automatically RELOAD modified modules:\n",
+ "# PREAMBLE-p6.15.1223 :: Settings and system details\n",
+ "from __future__ import absolute_import, print_function\n",
+ "system.specs()\n",
+ "pwd = system.getpwd() # present working directory as variable.\n",
+ "print(\" :: $pwd:\", pwd)\n",
+ "# If a module is modified, automatically reload it:\n",
"%load_ext autoreload\n",
"%autoreload 2\n",
- "# 0 disables autoreload.\n",
+ "# Use 0 to disable this feature.\n",
"\n",
- "# DISPLAY options\n",
+ "# Notebook DISPLAY options:\n",
+ "# Represent pandas DataFrames as text; not HTML representation:\n",
+ "import pandas as pd\n",
+ "pd.set_option( 'display.notebook_repr_html', False )\n",
+ "# Beware, for MATH display, use %%latex, NOT the following:\n",
+ "# from IPython.display import Math\n",
+ "# from IPython.display import Latex\n",
+ "from IPython.display import HTML # useful for snippets\n",
+ "# e.g. HTML('')\n",
"from IPython.display import Image \n",
"# e.g. Image(filename='holt-winters-equations.png', embed=True) # url= also works\n",
"from IPython.display import YouTubeVideo\n",
"# e.g. YouTubeVideo('1j_HxD4iLn8', start='43', width=600, height=400)\n",
- "from IPython.display import HTML # useful for snippets\n",
- "# e.g. HTML('')\n",
"from IPython.core import page\n",
"get_ipython().set_hook('show_in_pager', page.as_hook(page.display_page), 0)\n",
"# Or equivalently in config file: \"InteractiveShell.display_page = True\", \n",
"# which will display results in secondary notebook pager frame in a cell.\n",
"\n",
- "# MATH display, use %%latex, rather than the following:\n",
- "# from IPython.display import Math\n",
- "# from IPython.display import Latex\n",
- "# Generate PLOTS inside notebook:\n",
- "%matplotlib inline\n",
- "\n",
- "import pandas as pd\n",
- "print ' :: pandas version:'\n",
- "print pd.__version__\n",
- "# pandas DataFrames are represented as text by default; enable HTML representation:\n",
- "# [Deprecated: pd.core.format.set_printoptions( notebook_repr_html=True ) ]\n",
- "pd.set_option( 'display.notebook_repr_html', False )\n",
- "\n",
- "print ' :: Working directory (set as $workd):'\n",
- "workd, = !pwd\n",
- "print workd + '\\n'"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": 5,
- "metadata": {
- "collapsed": true
- },
- "outputs": [],
- "source": [
- "import numpy as np"
+ "# Generate PLOTS inside notebook, \"inline\" generates static png:\n",
+ "%matplotlib inline \n",
+ "# \"notebook\" argument allows interactive zoom and resize."
]
},
{
@@ -122,7 +145,7 @@
"\n",
"- Yet performance results for the [clones](http://blog.alphaclone.com/alphaclone/2011/01/clone-vs-fund-2010.html) are somewhat in line with the actual performance of the fund. E.g. Paulson & Co (John Paulson)\n",
"\n",
- "- Track managers that normally run net long. Tracking global macro funds (Bridgewater, Tudor) or credit funds (Fortress, Cerberus) is misguided because the vast majority of their positions are in asset classes that they don't have to disclose (futures, commodities, bonds, currencies, etc). And while quant funds (RenTec, AQR) often disclose stocks, following them is a folly because you have absolutely no idea why their algorithms bought in the first place. \n",
+ "- Clones track managers that normally run net long. Tracking global macro funds (Bridgewater, Tudor) or credit funds (Fortress, Cerberus) is misguided because the vast majority of their positions are in asset classes that they don't have to disclose (futures, commodities, bonds, currencies, etc). And while quant funds (RenTec, AQR) often disclose stocks, following them is a folly because you have absolutely no idea why their algorithms bought in the first place (statistical arbitrage may entail positions in foreign countries). \n",
"\n",
"- 13F does not reveal international holdings (except for ADR's).\n",
"\n",
@@ -130,7 +153,7 @@
"\n",
"- Money managers allocate the most capital to their best ideas. Pay attention to \"new positions\" in their disclosures as these are their most recent ideas. \n",
"\n",
- "- Always remember that the 13F is not their whole portfolio and that it's a past snapshot.\n",
+ "- Always remember that the **13F is not their whole portfolio and that it's a past snapshot.**\n",
"\n",
"- Monitor all SEC filings, not just 13F's: 13G filings, 13D filings, as well as various Form 3 and Form 4's are filed on a more timely basis and provide a more current look at what managers are buying or selling. They are required to file when they've purchased 5% or more of a company. \n",
"\n",
@@ -151,7 +174,7 @@
"You can search for and retrieve Form 13F filings using the [SEC's EDGAR database](http://www.sec.gov/edgar/searchedgar/companysearch.html). To find the filings of a particular money manager, enter the money manager's name in the Company Name field. To see all recently filed 13Fs, use the [\"Latest Filings\"](http://www.sec.gov/cgi-bin/browse-edgar?action=getcurrent) search function and enter \"13F\" in the Form Type box.\n",
"\n",
"\n",
- "### Druckenmiller, 14 August 2015 filing\n",
+ "### Example: Druckenmiller, 14 August 2015 filing\n",
"\n",
"Stanley Druckenmiller closed his Duquesne Capital Management hedge fund in 2010 but he still discloses the holdings of his family office (search: [“Duquesne Family Office”](http://www.sec.gov/cgi-bin/browse-edgar?company=Duquesne+Family+Office&owner=exclude&action=getcompany) picking the Information Table in html).\n",
"\n",
@@ -160,7 +183,7 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": 3,
"metadata": {
"collapsed": false
},
@@ -174,12 +197,18 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## Generalized parsing of reports"
+ "## HOWTO parse 13F reports: deriving our module\n",
+ "\n",
+ "If bugs appear because of format changes at the SEC\n",
+ "this section will useful for interactive debugging.\n",
+ "\n",
+ "Take note that: **lxml** *cannot read https, so use http\n",
+ "when specifying URL.*"
]
},
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": 4,
"metadata": {
"collapsed": false
},
@@ -191,7 +220,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": 5,
"metadata": {
"collapsed": false
},
@@ -205,7 +234,7 @@
""
]
},
- "execution_count": 8,
+ "execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -217,7 +246,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": 6,
"metadata": {
"collapsed": false
},
@@ -234,7 +263,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": 7,
"metadata": {
"collapsed": false
},
@@ -247,7 +276,7 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": 8,
"metadata": {
"collapsed": false
},
@@ -258,7 +287,7 @@
"4"
]
},
- "execution_count": 11,
+ "execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
@@ -270,7 +299,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": 9,
"metadata": {
"collapsed": false
},
@@ -283,7 +312,7 @@
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": 10,
"metadata": {
"collapsed": true
},
@@ -295,7 +324,7 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": 11,
"metadata": {
"collapsed": false
},
@@ -366,7 +395,7 @@
"28 SH NaN DFND NaN 716950 0 0 "
]
},
- "execution_count": 14,
+ "execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -382,7 +411,7 @@
},
{
"cell_type": "code",
- "execution_count": 15,
+ "execution_count": 12,
"metadata": {
"collapsed": false
},
@@ -396,7 +425,7 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": 13,
"metadata": {
"collapsed": false
},
@@ -407,12 +436,12 @@
"# Gotcha: int as type will fail for NaN\n",
"\n",
"# Type change allows proper sort:\n",
- "dfusd = dflite.sort( ['usd'], ascending=[False] )"
+ "dfusd = dflite.sort_values( by=['usd'], ascending=[False] )"
]
},
{
"cell_type": "code",
- "execution_count": 17,
+ "execution_count": 14,
"metadata": {
"collapsed": false
},
@@ -423,7 +452,7 @@
"1484044.0"
]
},
- "execution_count": 17,
+ "execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
@@ -436,7 +465,7 @@
},
{
"cell_type": "code",
- "execution_count": 18,
+ "execution_count": 15,
"metadata": {
"collapsed": false
},
@@ -448,7 +477,7 @@
},
{
"cell_type": "code",
- "execution_count": 19,
+ "execution_count": 16,
"metadata": {
"collapsed": false
},
@@ -479,7 +508,7 @@
"28 SunTrust Banks Inc 867914103 19664 NaN 1.33"
]
},
- "execution_count": 19,
+ "execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@@ -502,7 +531,64 @@
},
{
"cell_type": "code",
- "execution_count": 20,
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "\u001b[1;31mSignature: \u001b[0m\u001b[0myi_secform\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mpcent13f\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0murl\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'http://www.sec.gov/Archives/edgar/data/1536411/000153641115000006/xslForm13F_X01/form13f_20150630.xml'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mtop\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m7654321\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
+ "\u001b[1;31mSource:\u001b[0m\n",
+ "def pcent13f( url=druck150814, top=7654321 ):\n",
+ " '''Prune, then sort SEC 13F by percentage allocation, showing top N.\n",
+ " >>> pcent13f( top= 7 )\n",
+ " stock cusip usd putcall pcent\n",
+ " 27 SPDR Gold Trust 78463V907 323626 NaN 21.81\n",
+ " 15 Facebook Inc 30303M102 160612 NaN 10.82\n",
+ " 29 Wells Fargo & Co 949746101 94449 NaN 6.36\n",
+ " 31 LyondellBasell Ind's NV N53745100 74219 NaN 5.00\n",
+ " 18 Halliburton Co 406216101 66629 NaN 4.49\n",
+ " 16 Freeport-McMoRan Inc 35671D857 66045 NaN 4.45\n",
+ " 8 Citigroup Inc 172967424 64907 NaN 4.37\n",
+ " '''\n",
+ " df = parse13f( url )\n",
+ " # Drop irrevelant COLUMNS:\n",
+ " df.drop( df.columns[[1, 4, 5, 7, 8, 9, 10, 11]], axis=1, inplace=True )\n",
+ " # inplace=True available after pandas 0.13\n",
+ " #\n",
+ " # Convert usd to float type since it was read as string:\n",
+ " df[['usd']] = df[['usd']].astype( float )\n",
+ " # Gotcha: int as type will fail for NaN !\n",
+ " # Also we need float anyways for Python2 division later.\n",
+ " #\n",
+ " # Sort holdings by dollar value:\n",
+ " dfusd = df.sort_values( by=['usd'], ascending=[False] )\n",
+ " # .sort(columns=...) to be deprecated per pandas 0.17.1\n",
+ " # Sum total portfolio in USD:\n",
+ " usdsum = sum( dfusd.usd )\n",
+ " #\n",
+ " # NEW COLUMN 'pcent' for percentage of total portfolio:\n",
+ " dfusd['pcent'] = np.round(( dfusd.usd / usdsum ) * 100, 2)\n",
+ " #\n",
+ " # Selects top N positions from the portfolio:\n",
+ " return dfusd.head( top )\n",
+ "\u001b[1;31mFile: \u001b[0m~/Dropbox/ipy/fecon235/lib/yi_secform.py\n",
+ "\u001b[1;31mType: \u001b[0mfunction"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "yi_secform.pcent13f??"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
"metadata": {
"collapsed": false
},
@@ -533,13 +619,12 @@
"28 SunTrust Banks Inc 867914103 19664 NaN 1.33"
]
},
- "execution_count": 20,
+ "execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
- "import yi_secform\n",
"yi_secform.pcent13f( druck150814, 20 )\n",
"\n",
"# Simply enter the Information Table html URL for a 13F filing, \n",
@@ -557,7 +642,7 @@
},
{
"cell_type": "code",
- "execution_count": 21,
+ "execution_count": 19,
"metadata": {
"collapsed": true
},
@@ -569,7 +654,7 @@
},
{
"cell_type": "code",
- "execution_count": 22,
+ "execution_count": 20,
"metadata": {
"collapsed": false
},
@@ -600,7 +685,7 @@
"16 COMPUTER SCIENCES CORP 205363104 278642 NaN 1.28"
]
},
- "execution_count": 22,
+ "execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
@@ -626,6 +711,32 @@
"Remember that we viewing past snapshots of positions dated 30 June 2015. Such positions could have been entirely liquidated during July and August when the gold market declined severely. On the other hand, gold rallied considerably days after the market received Druckenmiller's vote of bold confidence via his 13F filed on August 14th. "
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Appendix: Getting quotes\n",
+ "\n",
+ "GLD, the ETF for gold, is designed to track spot gold prices,\n",
+ "less their management fees.\n",
+ "Within fecon235, one can easily retrieve stock or ETF quotes,\n",
+ "for example, by this syntax: get('s4gld'),\n",
+ "noting the string 's4' concatenated with the symbol\n",
+ "in lower case.\n",
+ "\n",
+ "Notice that the SEC 13F requires unique CUSIP identifiers,\n",
+ "rather than ticker symbols for their 13F forms.\n",
+ "\n",
+ "For gold, we prefer to use equivalent measures used in the spot market.\n",
+ "For example, quotes here are given in USD per troy ounce,\n",
+ "and the London PM fix (rather than nearby futures) is\n",
+ "accepted as a benchmark.\n",
+ "GLD valuation can be converted into such spot terms.\n",
+ "Within fecon235: get(d4xau)\n",
+ "will retrieve the appropriate dataframe for you.\n",
+ "See https://git.io/gold for more details."
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
@@ -635,7 +746,7 @@
},
{
"cell_type": "code",
- "execution_count": 23,
+ "execution_count": 21,
"metadata": {
"collapsed": true
},
@@ -647,7 +758,7 @@
},
{
"cell_type": "code",
- "execution_count": 24,
+ "execution_count": 22,
"metadata": {
"collapsed": false
},
@@ -677,7 +788,7 @@
"6 Dow Chemical Co 260543103 9998 NaN 0.85"
]
},
- "execution_count": 24,
+ "execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
@@ -689,7 +800,7 @@
},
{
"cell_type": "code",
- "execution_count": 25,
+ "execution_count": 23,
"metadata": {
"collapsed": false
},
@@ -720,7 +831,7 @@
"48 PRECISION CASTPARTS CORP 740189105 229710 NaN 1.19"
]
},
- "execution_count": 25,
+ "execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
@@ -734,7 +845,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "[Spot gold on 2015-09-30, end of second calendar quarter, was fixed \n",
+ "[Spot gold on 2015-09-30, end of third calendar quarter, was fixed \n",
"at $1114 in London, -4.9% from previous quarter.]\n",
"\n",
"2015-11-16: GLD is no longer Druckenmiller's top holding (replaced by Facebook): \n",
@@ -750,6 +861,130 @@
"indicates *no change in position* since the GLD valuation \n",
"mirrors the decrease in the spot gold market."
]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Appendix: February 2016 update"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": true
+ },
+ "outputs": [],
+ "source": [
+ "druck160216='http://www.sec.gov/Archives/edgar/data/1536411/000153641116000010/xslForm13F_X01/form13f_20151231.xml'\n",
+ "paulson160216='http://www.sec.gov/Archives/edgar/data/1035674/000114036116053318/xslForm13F_X01/form13fInfoTable.xml'"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ " stock cusip usd putcall pcent\n",
+ "13 SPDR Gold Trust 78463V907 292205 Call 29.90\n",
+ "7 Facebook Inc. 30303M102 264842 NaN 27.10\n",
+ "4 Amazon.com Inc. 023135106 128419 NaN 13.14\n",
+ "9 Microsoft Corp 594918104 64634 NaN 6.61\n",
+ "12 Raytheon Co 755111507 52029 NaN 5.32\n",
+ "6 Ctrip.com Int'l Ltd. 22943F100 35781 NaN 3.66\n",
+ "8 HDFC Bank Ltd. 40415F101 30252 NaN 3.10\n",
+ "10 Northrop Grumman Corp 666807102 25603 NaN 2.62\n",
+ "3 Alphabet Inc. 02079K305 25519 NaN 2.61\n",
+ "11 Pure Storage Inc. 74624M102 24912 NaN 2.55\n",
+ "14 Syncrony Fin'l 87165B103 14402 NaN 1.47\n",
+ "5 Chipotle Mex Grill Inc. 169656105 9693 NaN 0.99\n",
+ "15 Tempur Sealy Int'l Inc. 88023U101 8843 NaN 0.90"
+ ]
+ },
+ "execution_count": 25,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# Druckenmiller 13F for 2016-02-16:\n",
+ "yi_secform.pcent13f( druck160216, 20 )"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ " stock cusip usd putcall pcent\n",
+ "6 ALLERGAN PLC G0177J108 1728938 NaN 10.33\n",
+ "65 SHIRE PLC 82481R106 1403184 NaN 8.39\n",
+ "75 VALEANT PHARMACEUTICALS INTL 91911K102 1348479 NaN 8.06\n",
+ "71 TEVA PHARMACEUTICAL INDS LTD 881624209 1339666 NaN 8.01\n",
+ "47 MYLAN N V N59465109 1232475 NaN 7.37\n",
+ "73 TIME WARNER CABLE INC 88732J207 1089246 NaN 6.51\n",
+ "67 STARWOOD HOTELS&RESORTS WRLD 85590A401 803882 NaN 4.81\n",
+ "74 T-MOBILE US INC 872590104 773747 NaN 4.63\n",
+ "8 AMERICAN INTL GROUP INC 026874784 719050 NaN 4.30\n",
+ "29 EXTENDED STAY AMER INC 30224P200 678319 NaN 4.05\n",
+ "42 MALLINCKRODT PUB LTD CO G5785G107 643586 NaN 3.85\n",
+ "66 SPDR GOLD TRUST 78463V107 585933 NaN 3.50\n",
+ "32 GRIFOLS S A 398438408 401700 NaN 2.40\n",
+ "38 LAM RESEARCH CORP 512807108 397100 NaN 2.37\n",
+ "54 PERRIGO CO PLC G97822103 385191 NaN 2.30\n",
+ "57 POST HLDGS INC 737446104 253266 NaN 1.51\n",
+ "18 COBALT INTL ENERGY INC 19075F106 214656 NaN 1.28\n",
+ "40 LIVANOVA PLC G5509L101 211451 NaN 1.26\n",
+ "45 MGIC INVT CORP WIS 552848AE3 207805 NaN 1.24\n",
+ "25 ENDO INTL PLC G30401106 202161 NaN 1.21"
+ ]
+ },
+ "execution_count": 26,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "# Paulson 13F for 2016-02-16:\n",
+ "yi_secform.pcent13f( paulson160216, 20 )"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "[Spot gold on 2015-12-31, end of fourth calendar quarter, was fixed at $1060 in London, -4.85% from previous quarter.]\n",
+ "\n",
+ "2016-02-21: GLD is back to Druckenmiller's top holding: change from last quarter \"307757 Call 26.17\" to \"292205 Call 29.90\". If the net position was unchanged (given price decrease in the spot market), we can attribute a loss of \\$ 626,000 due to decay in the call option valuation (cf. theta).\n",
+ "\n",
+ "#### 2015-Q4: Drama for Paulson\n",
+ "\n",
+ "As for Paulson: change from last quarter: \"986836 NaN 5.12\" to \"585933 NaN 3.50\" -- indicates HUGE change! Market movement alone would give 938974 valuation, so the\n",
+ "**realized displacement on GLD is \\$ 353,041,000, i.e. -353 million USD.** \n",
+ "\n",
+ "Paulson is usually the largest stakeholder in GLD also known as \"SPDR GOLD TRUST\".\n",
+ "The 13F parsed in August 2015 showed \\$ 1.037 billion worth which was equivalent to\n",
+ "about 886,183 troy ounces (27.6 metric tons).\n",
+ "The 13F currently shows \\$ 0.586 billion worth which is equivalent to\n",
+ "about 552,767 troy ounces -- a reduction of -37.6% in gold inventory.\n",
+ "\n",
+ "Thus we can estimate that *Paulson liquidated the equivalent of\n",
+ "about 333,416 troy ounces at a weighted average price of \\$ 1059*\n",
+ "(note: recorded low during 2016-Q4 for the London PM Gold fix was \\$ 1049).\n",
+ "From that weighted average and gold's price history,\n",
+ "we can discern that the liquidation took place largely in late December 2015."
+ ]
}
],
"metadata": {
@@ -768,7 +1003,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
- "version": "2.7.10"
+ "version": "2.7.11"
}
},
"nbformat": 4,