<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2740067176225782215</id><updated>2012-03-02T06:00:12.475-08:00</updated><category term='high-frequency trading'/><category term='finance'/><category term='data mining'/><category term='memory management'/><category term='news'/><category term='web'/><category term='trading'/><category term='C'/><category term='boost'/><category term='open source'/><category term='exchange-traded funds'/><category term='trading strategies'/><category term='automated trading'/><category term='stock market'/><category term='SML/NJ'/><category term='college tuition'/><category term='quantlib'/><category term='AI'/><category term='market performance'/><category term='haskell'/><category term='performance'/><category term='semantics'/><category term='sp500'/><category term='emini'/><category term='dividend'/><category term='bond'/><category term='C++11'/><category term='ML'/><category term='closures'/><category term='indicators'/><category term='quantitative finance'/><category term='higher education'/><category term='reading'/><category term='scala'/><category term='predictive analytics'/><category term='scalability'/><category term='crude oil'/><category term='Rails'/><category term='economy'/><category term='concurrency'/><category term='treasury'/><category term='statically typed'/><category term='social networks'/><category term='genetic programming'/><category term='software'/><category term='dollar'/><category term='market analysis'/><category term='OOP'/><category term='web browser'/><category term='statistics'/><category term='ADR'/><category term='Python'/><category term='technology'/><category term='gold'/><category term='benchmark'/><category term='template'/><category term='latency'/><category term='module system'/><category term='dynamically typed'/><category term='ghc'/><category term='C++'/><category term='share buyback'/><category term='hedging'/><category term='inner classes'/><category term='programming languages'/><category term='algorithmic finance'/><category term='microstructure'/><category term='futures market'/><category term='generic programming'/><category term='language design'/><category term='earnings'/><category term='nested classes'/><category term='research'/><category term='cloud computing'/><category term='corporate governance'/><category term='startup'/><category term='HFT'/><category term='arbitrage'/><category term='entrepreneurship'/><category term='web framework'/><category term='option strategies'/><category term='Java'/><category term='cloud infrastructure'/><category term='commodities'/><category term='API'/><category term='Standard ML'/><category term='signals'/><category term='options'/><category term='economics'/><category term='ETF'/><category term='quickfix'/><category term='Ruby'/><category term='functional programming'/><category term='investment'/><category term='modularity'/><category term='ocaml'/><category term='debt'/><category term='social media'/><category term='agent-based computational economics'/><title type='text'>substructural: Programming and the Markets</title><subtitle type='html'>Musings on software infrastructure, programming language type systems, investments, and markets</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>74</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1744662843697588303</id><published>2012-03-02T06:00:00.000-08:00</published><updated>2012-03-02T06:00:12.531-08:00</updated><title type='text'>Permanent Portfolio</title><content type='html'>&lt;p&gt;Amidst the past few years of turmoil, &lt;a href="http://harrybrowne.org/"&gt;Harry Browne&lt;/a&gt;&amp;#39;s Permanent Portfolio is an interesting case. Browne is an investment manager, author, and two-time Libertarian Presidential candidates (for some reason a whole lot of investment managers are Libertarian). The Permanent Portfolio is composed of four equally weighted components: stocks, bonds (long-dated Treasuries), cash (short-term Treasuries), and gold (bullion). The Permanent Portfolio is currently available to the public in two forms: Michael J. Cuggino&amp;#39;s Permanent Portfolio mutual fund (&lt;a href="http://www.permanentportfolio.com/"&gt;PRPFX&lt;/a&gt;) and Global X&amp;#39;s Permanent ETF (&lt;a href="http://globalxfunds.com/permanent/"&gt;PERM&lt;/a&gt;). Of course, one can certainly build one&amp;#39;s own permanent portfolio using individual securities and ETFs. As least from PRPFX&amp;#39;s perspective, the lost decade was hardly a lost decade. It returned a respectable 164% for the period 2002-2011. That isn&amp;#39;t to say that there wasn&amp;#39;t some volatility along the way. During the depths of the crisis from June 2008 to February 2009, the portfolio experienced the maximum drawdown of 19.6% (though max quarterly loss was only 6.86%). Cuggino&amp;#39;s execution emphasized Swiss sovereigns (in Swiss francs so there is some currency exposure) alongside US Treasuries. For the growth component, he overweights energy, miners, and REITs. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/03/permanent-portfolio.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1744662843697588303?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1744662843697588303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/03/permanent-portfolio.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1744662843697588303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1744662843697588303'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/03/permanent-portfolio.html' title='Permanent Portfolio'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-7187374629122330707</id><published>2012-03-01T06:00:00.000-08:00</published><updated>2012-03-01T06:00:16.200-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='ETF'/><title type='text'>Bid-Ask Spread</title><content type='html'>&lt;p&gt;One reason for preferring highly liquid versus illiquid products is the bid-ask spread. This is a cost built into a trade when the trade is a market order. This spread also happens to be the market maker's profit for providing liquidity, whether it be a traditional specialist or a high-frequency trader taking the other side of your trade. Though I usually trade using limit orders to cut down on the spread I pay, for illiquid issues, it is really difficult to get the spread down by much if I want any timely execution.  &lt;/p&gt;&lt;p&gt;One case I stumbled on is that of specialized ETFs. With so many specialized ETFs on the market, slicing, dicing, and grafting all different kinds of securities, some of them are bound to be too exotic to gain the trading volume of a typical S&amp;amp;P 500 stock. A case in point are the ETFs issued by brokers specifically for their own customers. Whereas SPDRS, Vanguard, and iShares ETFs trade millions of shares a day, some of these broker-tied ETFs only trade tens of thousands. These ETFs can be traded by anybody via any broker, but the customers of the issuing broker receive incentives such as commission-free trading. The price, however, is greatly reduced liquidity and large bid-ask spreads. I frequently see spreads of 0.5%+ for some of these products. For a large number of trades and a good amount (&amp;gt; $2000), paying the spread quickly becomes more expensive than paying a hefty commission. Large bid-ask spreads certainly aren't restricted to certain low volume equity-like products. Spreads in forex are quite lucrative for forex brokers, some of whom do not charge commission at all in favor of profiting for spreads. For currency-pairs such as the New Zealand Dollar (NZD), large spreads are quite common. In contrast, EUR-USD and JPY-USD usually maintain 1-2 pip spreads. However, during major events and announcements, even these high-volume instruments may see spreads widen considerably. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-7187374629122330707?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/7187374629122330707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/03/bid-ask-spread.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7187374629122330707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7187374629122330707'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/03/bid-ask-spread.html' title='Bid-Ask Spread'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-7159380524372307745</id><published>2012-02-28T06:00:00.000-08:00</published><updated>2012-02-28T08:53:36.651-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='market analysis'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><title type='text'>Market Manipulation, Part 1</title><content type='html'>&lt;p&gt;If the investment advice and forums are any indication, a lot of people consider the markets rigged and manipulated. But what is a good working definition of manipulation? There is price manipulation. That entails the defining what an "artificial" price is. Price manipulation is probably one of those things with a long, long history. One of the most famous cases is that of the Hunt brothers' attempted cornering of the silver market in the late 1970s and early 1980s. Market bubbles may also contribute to "artificial" prices, but bubbles are more of a natural psychological reaction of market participants, not some insidious conspiracy. This difficulty works both ways. Government and industry regulatory organizations cannot be too specific about what signals of fraudulent market activity they are scanning for lest the perpetrators simply work around those signals to escape detection. Besides straight price manipulation, regulatory agencies also consider order flow and spread manipulation. &lt;/p&gt;&lt;p&gt;Johan and Cumming did a study on Market Surveillance regimes around the world in a 2008 paper &lt;a href="http://ssrn.com/abstract=917625"&gt;Global Market Surveillance&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;Rosa Abrantes-Metz has written a number of papers on the subject including a 2007 paper &lt;a href="http://ssrn.com/abstract=1007348"&gt;Is the Market Being Fooled? An Error-Based Screen for Manipulation&lt;/a&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-7159380524372307745?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/7159380524372307745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/market-manipulation-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7159380524372307745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7159380524372307745'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/market-manipulation-part-1.html' title='Market Manipulation, Part 1'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-3379794989207055638</id><published>2012-02-15T06:00:00.000-08:00</published><updated>2012-02-28T08:44:40.077-08:00</updated><title type='text'>Flash Crash Research, Part 1</title><content type='html'>&lt;p&gt;Unsurprisingly, given the interest of regulators and trading firms, there is a growing literature on the May 6, 2010 Flash Crash and "mini-flash crashes" throughout recent history. Unofficial high-speed liquidity providers, free from any contractual obligations, can become high-speed liquidity takers. Filimonov and Sornette investigate prediction of endogenous-feedback loops in the research paper &lt;a href="http://ssrn.com/abstract=1998832"&gt;Quantifying reflexivity in financial markets: towards a prediction of flash crashes&lt;/a&gt;. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-3379794989207055638?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/3379794989207055638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/flash-crash-research.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3379794989207055638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3379794989207055638'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/flash-crash-research.html' title='Flash Crash Research, Part 1'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5560961991407551677</id><published>2012-02-14T06:00:00.000-08:00</published><updated>2012-02-16T08:26:35.735-08:00</updated><title type='text'>Behavioral Finance and Sentiment/Tone Mining</title><content type='html'>&lt;p&gt;There are two prominent claims about the stock market: one is that machines are driving the entire market these days. The other is that behavioral finance works and even sentiment-based trading can produce excess profits.&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/02/behavioral-finance-and-sentimenttone.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5560961991407551677?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5560961991407551677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/behavioral-finance-and-sentimenttone.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5560961991407551677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5560961991407551677'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/behavioral-finance-and-sentimenttone.html' title='Behavioral Finance and Sentiment/Tone Mining'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5488690155223021715</id><published>2012-02-10T06:00:00.000-08:00</published><updated>2012-02-10T08:15:48.200-08:00</updated><title type='text'>Dividends and Capital Gains Taxes</title><content type='html'>&lt;p&gt;It probably won't garner much fanfare this time through, but the Bush-era (Jobs and Growth Tax Relief Reconciliation Act of 2003) qualified dividend and long-term capital gains tax cuts are set to expire by the end of 2012. This would potentially more than double the tax on qualified dividends. For non-tax sheltered accounts, this could dramatically affect the net returns of dividend income-oriented portfolios especially if there ends up to be a discrepancy between qualified dividend and capital gains taxes. It will be interesting to see how this affects investment strategies. Tax-free muni-bonds have appreciated considerably during last year. The relative tax efficiency of different investment instruments may change in the decline of special treatment of qualified dividends and long-term capital gains.&lt;/p&gt;&lt;p&gt;&lt;a href="http://seekingalpha.com/article/189189-u-s-dividend-cap-gains-tax-rate-history-possible-relevance-to-future-taxation"&gt;Richard Shaw&lt;/a&gt; studied this issue a few years ago before Obama and Congress extended the tax cuts.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5488690155223021715?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5488690155223021715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/dividends-and-capital-gains-taxes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5488690155223021715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5488690155223021715'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/dividends-and-capital-gains-taxes.html' title='Dividends and Capital Gains Taxes'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2328400187601297411</id><published>2012-02-09T06:00:00.000-08:00</published><updated>2012-02-09T08:49:38.206-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Functional Languages and Call-By-Value, Part 1</title><content type='html'>&lt;p&gt;A whole lot of work goes into avoiding unnecessary copies in C++. Much of this responsibility lies in the programmer with manual optimizations such as passing large objects by pointer or by reference rather than by value. This concern is pervasive in the language, from the choice of increment/decrement operators to the implementation of constructors. Many compiler optimizations are also target copying such as the return value optimization (RVO) and, more recently, the move semantics in C++11. The reasoning behind the emphasis on copying seems intuitive enough: pass-by-value of any data larger than a primitive type (i.e., larger than a pointer) gets too expensive especially if the data in question is in a temporary which must be destroyed anyway. C++&amp;#39;s machinery to work-around this inefficiency isn&amp;#39;t representative of imperative and object-oriented languages. For example, Java makes references the default way for manipulating objects even though the primitive calling semantics is pass-by-value. However, in functional programming, copying is seldom the overriding emphasis. Why isn&amp;#39;t copy as big of a deal in functional languages? For the sake of argument, I will take ML as the canonical functional language. Lazy evaluation in languages such as Haskell adds another layer of complexity which I won&amp;#39;t address here. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/02/functional-languages-and-call-by-value.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2328400187601297411?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2328400187601297411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/functional-languages-and-call-by-value.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2328400187601297411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2328400187601297411'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/functional-languages-and-call-by-value.html' title='Functional Languages and Call-By-Value, Part 1'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-101280751896018130</id><published>2012-02-08T06:00:00.000-08:00</published><updated>2012-02-08T06:51:54.130-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='indicators'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><title type='text'>Indicators and Timeframes</title><content type='html'>&lt;p&gt;MarketSci has a &lt;a href="http://marketsci.wordpress.com/2010/01/17/what-sets-short-intermediate-and-long-term-indicators-apart/"&gt;short post on what they consider long, intermediate, and short term indicators and strategies&lt;/a&gt;. Most indicators can vary sampling periods in order to smooth them out to avoid false alarms. As indicated by MarketSci, the relevancy of different indicators does depend on the amount of data as well as the timeframe. However, with the advent of practical high-frequency data, it is no longer the case that smaller time frames necessarily implies sparser data. One could certainly be sampling weekly for a multi-year indicator and end up with less data than sampling ticks for a few minutes in high-frequency data. The guidelines seem to be that long-term is ruled by trend-following (e.g., moving averages), intermediate-term by mean reversion, and short-term by "noise" (their example is RSI).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-101280751896018130?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/101280751896018130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/indicators-and-timeframes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/101280751896018130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/101280751896018130'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/indicators-and-timeframes.html' title='Indicators and Timeframes'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-6692501292017541912</id><published>2012-02-06T06:00:00.000-08:00</published><updated>2012-02-06T06:00:06.008-08:00</updated><title type='text'>Quantitative Behavioral Finance</title><content type='html'>&lt;p&gt;Though Fama's Efficient Market Hypothesis (EMH) and variants thereof reigned unchallenged for several decades, during the 1980s and 1990s, behavioral finance gained significant credibility. Behavioral finance has since evolved and given rise to subfields such as Quantitative Behavioral Finance. The hypothesis remains the same: markets are not completely efficient because the human participants are not completely rational. Cognitive biases are the main culprit. Quantitative Behavioral Finance takes this idea a little further by rigorously modeling market prices given such biases (which manifest themselves in terms of underreaction and overreaction) exist by combining differential equations and statistical time series analysis. &lt;/p&gt;&lt;p&gt;Richard Thaler's &lt;a href="http://www.eui.eu/Personal/Guiso/Courses/Lecture5/ThalerEndBehaviour.pdf"&gt;article, "The End of Behavioral Finance"&lt;/a&gt;, is an excellent survey of the first decade. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-6692501292017541912?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/6692501292017541912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/quantitative-behavioral-finance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6692501292017541912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6692501292017541912'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/quantitative-behavioral-finance.html' title='Quantitative Behavioral Finance'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1963470452028089102</id><published>2012-02-03T06:00:00.000-08:00</published><updated>2012-02-03T11:58:12.393-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='hedging'/><category scheme='http://www.blogger.com/atom/ns#' term='college tuition'/><category scheme='http://www.blogger.com/atom/ns#' term='higher education'/><title type='text'>Saving Up for College Tuition and Hedging, Part 4</title><content type='html'>&lt;p&gt;Are prepaid tuition programs a great investment? One is right to be skeptical. The programs vary considerably from state to state. Bankrate.com has an &lt;a href="http://www.bankrate.com/finance/college-finance/some-state-prepaid-tuition-plans-flawed-1.aspx"&gt;article about some of the programs&lt;/a&gt;. It turns out that one can be paying anything from 41% to a slight discount to current tuition. Two states, Pennsylvania and Texas offer programs which do not ask for a premium as long as you use the tuition vouchers for state schools. In the Texas case, you receive fund performance if you elect to go to a non-state school. Virginia&amp;#39;s program appears to be offering tomorrow&amp;#39;s tuition at a slight discount even compared to today&amp;#39;s tuition rates if one goes to the most expensive state school. Otherwise, you would be paying a premium. For most of the state programs, tuition inflation will have to accelerate considerably for the programs to be worthwhile. Still, though purchasers of prepaid tuition vouchers pay a premium, the states are still on the hook if tuition inflation does get out of hand. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/02/saving-up-for-college-tuition-and_03.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1963470452028089102?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1963470452028089102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/saving-up-for-college-tuition-and_03.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1963470452028089102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1963470452028089102'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/saving-up-for-college-tuition-and_03.html' title='Saving Up for College Tuition and Hedging, Part 4'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5770016274408563588</id><published>2012-02-02T06:00:00.000-08:00</published><updated>2012-02-02T06:00:15.853-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='hedging'/><category scheme='http://www.blogger.com/atom/ns#' term='college tuition'/><category scheme='http://www.blogger.com/atom/ns#' term='higher education'/><title type='text'>Saving Up for College Tuition and Hedging, Part 3</title><content type='html'>&lt;p&gt;Ever since the government permitted it, many private colleges have been hopping onto the tuition prepayment plan bandwagon. Unlike the College Board&amp;#39;s IC 500 index, tuition prepayment often does not include room and board increases. Colleges including some of the Ivies (e.g., &lt;a href="http://www.dartmouth.edu/~control/student/tpp-fact-sheet.html"&gt;Dartmouth&lt;/a&gt;, &lt;a href="http://www.sfs.upenn.edu/paying/paying-tuition-prepayment-plan.htm"&gt;Penn&lt;/a&gt;, Princeton), MIT, Stanford, UChicago, and &lt;a href="http://fbs.usc.edu/depts/sfs/page/2108/prepayment/"&gt;USC&lt;/a&gt; tout the private college prepaid plan. For a complete list of the 270+ private schools using this plan, see the &lt;a href="https://www.privatecollege529.com"&gt;consortium&amp;#39;s website&lt;/a&gt; (managed by OppenheimerFunds, which also happens to manage many of the state 529 plans). States sponsor their own, but some are portable and can be used to fund tuition at out-of-state private schools or even select foreign ones. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/02/saving-up-for-college-tuition-and_02.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5770016274408563588?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5770016274408563588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/saving-up-for-college-tuition-and_02.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5770016274408563588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5770016274408563588'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/saving-up-for-college-tuition-and_02.html' title='Saving Up for College Tuition and Hedging, Part 3'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-4546360425268357458</id><published>2012-02-01T06:00:00.000-08:00</published><updated>2012-02-02T13:03:31.518-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='hedging'/><category scheme='http://www.blogger.com/atom/ns#' term='college tuition'/><category scheme='http://www.blogger.com/atom/ns#' term='higher education'/><title type='text'>Saving Up for College Tuition and Hedging, Part 2</title><content type='html'>&lt;p&gt;To answer the question of college tuition hedging, we need to determine the amount of tuition increases and the variability in that change. Generally, higher education revenues come from federal and state aid, alumni giving, endowment returns, and tuition. For research universities, a big chunk comes from research grants. Thus, changes in funding levels for each of these components must be compensated by the others. How have these factors evolved in the past few decades? Can we explain tuition inflation in terms of these other factors?&lt;/p&gt;&lt;p&gt;This is second in my on-going series of posts on college tuition and investment. See the &lt;a href="http://substructural.blogspot.com/2012/01/saving-up-for-college-tuition-and.html"&gt;first post&lt;/a&gt;.&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/02/saving-up-for-college-tuition-and.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-4546360425268357458?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/4546360425268357458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/02/saving-up-for-college-tuition-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4546360425268357458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4546360425268357458'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/02/saving-up-for-college-tuition-and.html' title='Saving Up for College Tuition and Hedging, Part 2'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-gQB2K5wWjKM/TyjZN9SlJiI/AAAAAAAABac/RBpHorjE8xY/s72-c/collegevstreasuries.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-4813717259118547981</id><published>2012-01-31T06:00:00.000-08:00</published><updated>2012-01-31T06:00:18.914-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='C++11'/><title type='text'>C++11 Compiler Support</title><content type='html'>&lt;p&gt;Compiler support for C++11 is quite uneven at this point. Both &lt;a href="http://blogs.msdn.com/b/vcblog/archive/2011/09/12/10209291.aspx"&gt;Visual C++&lt;/a&gt; and the &lt;a href="http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/"&gt;Intel compiler&lt;/a&gt; only support 31 of the features. &lt;a href="http://gcc.gnu.org/projects/cxx0x.html"&gt;GCC has significantly better support&lt;/a&gt; at this point (48 features). &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-4813717259118547981?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/4813717259118547981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/c11-compiler-support.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4813717259118547981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4813717259118547981'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/c11-compiler-support.html' title='C++11 Compiler Support'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-4460416335485227059</id><published>2012-01-30T06:00:00.000-08:00</published><updated>2012-01-30T12:27:04.788-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='HFT'/><category scheme='http://www.blogger.com/atom/ns#' term='high-frequency trading'/><title type='text'>Trade Frequencies, Part 2</title><content type='html'>&lt;p&gt;One of the main challenges in high-frequency finance is the irregular arrival of prices. Once you get down to the tick by tick prices, you can&amp;#39;t count on normal interval time series. There are autoregressive models which support irregular arrival of prices. Engle and Russell&amp;#39;s autoregressive conditional duration (ACD) model comes to mind (described in &lt;a href="http://faculty.chicagobooth.edu/jeffrey.russell/research/multi.pdf"&gt;Econometric Modeling of Multivariate Irregularly-Spaced High-Frequency Data&lt;/a&gt; which extends the Engle-Russell Autoregressive Conditional Duration (ACD) model for the multivariate case).&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/trade-frequencies-part-2.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-4460416335485227059?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/4460416335485227059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/trade-frequencies-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4460416335485227059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4460416335485227059'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/trade-frequencies-part-2.html' title='Trade Frequencies, Part 2'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-4305514650098570751</id><published>2012-01-27T06:00:00.000-08:00</published><updated>2012-02-01T20:31:42.843-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='ADR'/><category scheme='http://www.blogger.com/atom/ns#' term='arbitrage'/><title type='text'>Stock Price Limits and ADRs</title><content type='html'>&lt;p&gt;Some foreign stock markets have daily price limits. For example, in Taiwan, the daily price limit is 7%. How often do we hit these limits? The US ADR for Taiwan Semiconductor (TSM) exceeded the daily price limit ceiling 114 times and dropped below the daily price floor 47 times during a 3597 trading day period from 1997 to yesterday (using Yahoo&amp;#39;s adjusted prices). There turns out to be a few papers on price limits and international markets. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/stock-price-limits-and-adrs.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-4305514650098570751?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/4305514650098570751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/stock-price-limits-and-adrs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4305514650098570751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4305514650098570751'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/stock-price-limits-and-adrs.html' title='Stock Price Limits and ADRs'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2284761969006774698</id><published>2012-01-26T06:00:00.001-08:00</published><updated>2012-01-26T14:56:58.266-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantitative finance'/><category scheme='http://www.blogger.com/atom/ns#' term='treasury'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='bond'/><title type='text'>Finance Research Papers</title><content type='html'>&lt;p&gt;Here are some papers of interest I ran into recently:&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/finance-research-papers_26.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2284761969006774698?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2284761969006774698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/finance-research-papers_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2284761969006774698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2284761969006774698'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/finance-research-papers_26.html' title='Finance Research Papers'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-3716603481541217541</id><published>2012-01-26T06:00:00.000-08:00</published><updated>2012-01-27T08:02:34.216-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming languages'/><title type='text'>Academic Programming Languages in Mainstream Use</title><content type='html'>&lt;p&gt;It is said that once a programming language is born, it never really dies. That may be so, but popularity can still be a fickle thing. I think it is safe to say that most academic programming languages never make it out of the lab in a serious way. However, there are a few prominent exceptions to this observation, some of which were and are wildly successful:&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/academic-programming-languages-in.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-3716603481541217541?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/3716603481541217541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/academic-programming-languages-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3716603481541217541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3716603481541217541'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/academic-programming-languages-in.html' title='Academic Programming Languages in Mainstream Use'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2727018354685817298</id><published>2012-01-25T06:00:00.000-08:00</published><updated>2012-01-26T14:57:24.785-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='HFT'/><category scheme='http://www.blogger.com/atom/ns#' term='high-frequency trading'/><category scheme='http://www.blogger.com/atom/ns#' term='quantitative finance'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><title type='text'>Finance Research Papers</title><content type='html'>&lt;p&gt;Here are a few hot-off-the-press research abstracts which caught my eye:&lt;ul&gt;&lt;li&gt;&lt;a href="http://ssrn.com/abstract=1985951"&gt;Need for Speed: An Empirical Analysis of Hard and Soft Information in a High Frequency World&lt;/a&gt; studies news sentiment-based high-frequency trading using an extension of Hasbrouck&amp;#39;s market microstructure model (and Chaboud and Tookes) and NASDAQ high-frequency data from 2008 to 2009. The paper seeks to answer whether we can effectively do machine-driven trading based on news sentiment and whether speed matters. The author distinguishes between &amp;quot;hard&amp;quot; and &amp;quot;soft&amp;quot; information events where hard events are price data and soft events news ticker items, blog posts, and Twitter messages (though this paper focuses on news ticker alone). This study only uses Reuters News Sentiment software. The conclusion is that at this point, non-high frequency traders have an advantage in processing the &amp;quot;soft&amp;quot; information events. I think this area is gaining quite a bit of attention with both bigger firms (Thomas Reuters, Dow Jones) and smaller ones (a startup named &lt;a href="http://l.aunch.it/gzl3"&gt;Stockr.com (invite link)&lt;/a&gt; for example) are investing in news sentiment and social media-based trading (respectively). &lt;/li&gt;&lt;li&gt;&lt;a href="http://ssrn.com/abstract=1990472"&gt;Market Making Under the Proposed Volcker Rule&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://ssrn.com/abstract=1990608"&gt;No Strings Attached: When Giving it Away Versus Making Them Pay Leads to Negative Net Benefit Perceptions in Online Exchanges&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/finance-research-papers.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2727018354685817298?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2727018354685817298/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/finance-research-papers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2727018354685817298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2727018354685817298'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/finance-research-papers.html' title='Finance Research Papers'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2828867806002279358</id><published>2012-01-24T06:00:00.000-08:00</published><updated>2012-01-24T07:48:43.405-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='C++11'/><title type='text'>New C++ Features and C++ Texts</title><content type='html'>&lt;p&gt;Without pretty fundamental changes such as concepts, it will only be a matter of time before we get a smattering of books on C++11. Some existing C++ books have been updated with a chapter to two on C++11 features. They will of course vary in quality considerably. David Vandevoorde is behind at least a couple of the new features. He has a book &lt;a href="http://www.amazon.com/gp/product/0201734842/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;amp;tag=substructural-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=0201734842"&gt;C++ Templates: The Complete Guide&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=substructural-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0201734842" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;"&gt; on template metaprogramming. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/new-c-features-and-c-texts.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2828867806002279358?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2828867806002279358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/new-c-features-and-c-texts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2828867806002279358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2828867806002279358'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/new-c-features-and-c-texts.html' title='New C++ Features and C++ Texts'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-3942011767433543981</id><published>2012-01-24T05:54:00.000-08:00</published><updated>2012-01-24T10:13:37.835-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trading strategies'/><category scheme='http://www.blogger.com/atom/ns#' term='trading'/><category scheme='http://www.blogger.com/atom/ns#' term='signals'/><category scheme='http://www.blogger.com/atom/ns#' term='indicators'/><title type='text'>Writer's Market</title><content type='html'>&lt;p&gt;A couple of days ago, I encounter &lt;a href="http://www.amazon.com/gp/product/1599632276/ref=as_li_tf_tl?ie=UTF8&amp;tag=substructural-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1599632276"&gt;2012 Writer's Market Deluxe Edition (Writer's Market Online)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=substructural-20&amp;l=as2&amp;o=1&amp;a=1599632276" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; at a neighborhood bookstore. The book contained a catalog of freelancing opportunities in a wide assortment of magazines and journals. What I found interesting was that financial and technology freelancers did not receive an appreciably higher rate than other areas. There were certainly exceptions, but for the most part, there was no real discrepancy between rates in different fields. The main trading-oriented publication the book listed was &lt;a href="http://www.traders.com"&gt;www.traders.com&lt;/a&gt; (Technical Analysis, Inc., publisher of Stock and Commodities, Working Money, and Traders.com Advantage magazines), where freelancers apparently contribute a good deal of the articles. &lt;/p&gt;&lt;p&gt;According to the Editorial Guidelines, the top 5 hot topics are relative strength indicator (RSI), average directional movement rating (ADXR), Fibonacci ratios, MACD and moving averages, and volume trends. I am a bit surprised to see RSI so prominent. In contrast, stochastics and chart reading are much further down on the list. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-3942011767433543981?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/3942011767433543981/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/writers-market.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3942011767433543981'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3942011767433543981'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/writers-market.html' title='Writer&apos;s Market'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5419407149313332638</id><published>2012-01-23T06:00:00.000-08:00</published><updated>2012-02-01T08:58:04.472-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='hedging'/><category scheme='http://www.blogger.com/atom/ns#' term='college tuition'/><category scheme='http://www.blogger.com/atom/ns#' term='higher education'/><title type='text'>Saving Up for College Tuition and Hedging, Part 1</title><content type='html'>&lt;p&gt;One of the biggest expenses for many American families is college tuition. In fact, it is a component of the Consumer Price Index (CPI), though not a very big component. The other overwhelming expenses are transportation (typically cars) and housing. For transportation and housing costs, you can at least partially hedge against further price increases (however imperfectly) by investing in appropriate securities (crude or RBOB futures and Case-Schiller housing futures). According to the December 2011 CPI report, tuition has increased by almost 7-fold since 1984 (the baseline of the CPI). For comparison, tuition increases have dwarfed even growth in hospital services expenses (only 6.5x). The only component of the CPI that grew more was tobacco (8.4x). Thus, not only is tuition a big expense, it is also one of the fastest growing. According to the &lt;a href="http://www.bls.gov/spotlight/2010/college/"&gt;Bureau of Labor Statistics (BLS)&amp;#39;s analysis&lt;/a&gt;, the college tuition inflation rate averages about 6.7% annually for the past 10 years (with a low of 4% and a high of 9.8%), even amidst recession. Recession exacerbated the increases as governments cut funding. Now what kind of investment can give an 8% annual return even in the midst of a massive downturn? A tax-sheltered education savings account such as a Coverdell or 529 Plan helps, but even then a steady 8% pre-tax return from index or mutual fund investing is quite challenging. &lt;a href="http://www.mymoneyblog.com/charts-college-tuition-vs-housing-bubble-vs-medical-costs.html"&gt;MyMoneyBlog&lt;/a&gt; puts everything in perspective, showing that tuition increases dwarf that of the housing bubble.&lt;/p&gt;&lt;p&gt;In this series of posts, I will be looking into the cause of tuition inflation and the different possibilities for dealing with the phenomenon in investment terms.&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/saving-up-for-college-tuition-and.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5419407149313332638?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5419407149313332638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/saving-up-for-college-tuition-and.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5419407149313332638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5419407149313332638'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/saving-up-for-college-tuition-and.html' title='Saving Up for College Tuition and Hedging, Part 1'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-9120640471387795675</id><published>2012-01-20T06:52:00.000-08:00</published><updated>2012-01-20T06:52:04.821-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='boost'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='C++11'/><title type='text'>C++ and GCC</title><content type='html'>&lt;p&gt;Now that C++11 has been live for a little while, I was curious of the state of support from the major compilers. GCC/G++ is the major one. As of GCC 4.7, it appears to support of good deal of C++11 features which actually made it into the standard (concepts being the big omission). Variadic templates, auto-type declarations, initializer lists (vector&amp;lt;int&amp;gt; v {1,2,3}; works), unions supporting all non-reference member types, strongly-typed enums and many others made it into GCC. There is even a range for (for i : collection), something Java incorporated a while ago and the scripting languages had before then. The omissions (stuff in the standard but not in GCC 4.7) include garbage collection and most of the concurrency features. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-9120640471387795675?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/9120640471387795675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/c-and-gcc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/9120640471387795675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/9120640471387795675'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/c-and-gcc.html' title='C++ and GCC'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5033625057198179370</id><published>2012-01-19T06:00:00.001-08:00</published><updated>2012-01-19T13:09:45.231-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quantitative finance'/><category scheme='http://www.blogger.com/atom/ns#' term='research'/><category scheme='http://www.blogger.com/atom/ns#' term='algorithmic finance'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><title type='text'>Algorithmic Finance</title><content type='html'>&lt;p&gt;There is a brand new journal combining Computer Science and Finance, &lt;a href="http://algorithmicfinance.org/"&gt;Journal of Algorithmic Finance&lt;/a&gt;. Both the advisory board and editorial team are ensemble casts with some of the biggest names in computer science and finance. They just published their inaugural issue in December 2011. The top paper (as indicated by number of SSRN downloads) is one on &lt;a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1773169"&gt;Markets are Efficient if and Only if P = NP&lt;/a&gt;, which perhaps is very reassuring to all the traders out there, at least at a theoretical level. For those unfamiliar with the terminology, P means solvable in polynomial time (i.e., we have reasonably smart, efficient algorithms to solve them) and NP means verifiable in polynomial time (i.e., given a solution, we can verify that it works efficiently). NP-complete is a class of problems such that all problems in NP can be (efficiently) reframed in terms of any NP-complete problem. For problems in NP but not in P, we generally do not have efficient algorithms for exact solutions. Instead, we pretty much have to fall back on exhaustive search (i.e., try all the possible answers and see what works). If one can solve an NP-complete problem efficiently in the general case, then one can solve any problem in NP efficiently, which potentially saves some astounding sum of money and enables a lot of previously impractical technologies. The more interesting implication of the paper is that the market can serve as an oracle to solve NP-complete problems. Recently DARPA has decided to invest in &lt;a href="http://www.darpa.mil/Our_Work/I2O/Programs/Crowd_Sourced_Formal_Verification_(CSFV).aspx"&gt;crowd-sourcing and gamification to solve difficult formal verification problems&lt;/a&gt;. Instead of potentially awkward game embeddings of difficult computational problems, I wonder if market strategies may be more effective and direct.&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/algorithmic-finance.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5033625057198179370?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5033625057198179370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/algorithmic-finance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5033625057198179370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5033625057198179370'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/algorithmic-finance.html' title='Algorithmic Finance'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-4073342124058719220</id><published>2012-01-19T06:00:00.000-08:00</published><updated>2012-01-19T13:09:26.519-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='treasury'/><category scheme='http://www.blogger.com/atom/ns#' term='dividend'/><category scheme='http://www.blogger.com/atom/ns#' term='bond'/><category scheme='http://www.blogger.com/atom/ns#' term='earnings'/><title type='text'>Earnings versus Dividend Yields</title><content type='html'>&lt;p&gt;Given the good Bank of America earnings announcement today, I though it is fitting to look at the earnings yield versus dividend yield of the S&amp;amp;P over a 50 year stretch of time. The ratio has been growing for a long, long while. Back in the 1960s, companies paid out a lot more of their earnings in dividends. Even given the rising trend, the ratio seems over-extended at this point. We have pretty high earnings yield at 7.7% but only a 2.1% dividend yield. The ratio seems to fall whenever we have some recession or slowdown, indicating that dividend cuts may lag earning declines. Assuming that earnings yield at least hold the line (a big IF), the long term trend suggests an overall dividend yield of 2.57%. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/earnings-versus-dividend-yields.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-4073342124058719220?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/4073342124058719220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/earnings-versus-dividend-yields.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4073342124058719220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4073342124058719220'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/earnings-versus-dividend-yields.html' title='Earnings versus Dividend Yields'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-plFa-399ZTs/TxhDfZrAyXI/AAAAAAAABaE/9JT71rUlE2g/s72-c/earningsvsdividend.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-7319794037790570420</id><published>2012-01-18T21:00:00.000-08:00</published><updated>2012-01-23T07:42:47.104-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><title type='text'>Net Worth, Income, and Media</title><content type='html'>&lt;p&gt;In New York, everywhere you look is CNBC and Bloomberg. Both tout how their viewership has high net worth and income. With all the captive audiences on trading floors around the world, that isn't a far-fetched claim. For the most part, though, all I ever see on those two channels were GEICO commercials. The interesting part is that as a percentage of viewership, &lt;a href="http://seekingalpha.com"&gt;seekingalpha.com&lt;/a&gt; does better than both CNBC and Bloomberg at attracting people with household incomes 100k+ (44% versus 40% and 38% respectively). One can do better than that if you can convince kitcometals.com, Neiman-Marcus, or ThinkOrSwim.com to let you advertise on their sites which attract 56%, 41%, and 52% respectively of 100k+ household income viewership as a percentage of total viewership. &lt;/p&gt;&lt;p&gt;I would have included MoneyScience.com in this comparison but the data source I used was quite US-centric.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-7319794037790570420?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/7319794037790570420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/net-worth-income-and-media.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7319794037790570420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7319794037790570420'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/net-worth-income-and-media.html' title='Net Worth, Income, and Media'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1467998646519332331</id><published>2012-01-18T06:00:00.000-08:00</published><updated>2012-01-19T13:10:36.061-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='HFT'/><category scheme='http://www.blogger.com/atom/ns#' term='high-frequency trading'/><category scheme='http://www.blogger.com/atom/ns#' term='microstructure'/><title type='text'>Microstructure Modeling</title><content type='html'>&lt;p&gt;Jonathan Kinlay has an interesting &lt;a href="http://jonathankinlay.com/index.php/2011/05/market-microstructure-models-for-high-frequency-trading-strategies/"&gt;list of papers on market microstructure&lt;/a&gt; including his synopsis of each. Many of them applied a vector autoregression model to quote and trade data. The focus, however, is always the impact of the limit order book and the strategies for generating new bids and asks on the limit order book. All of the studies focused on the stock markets. Perhaps the most interesting of the papers is a &lt;a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1735338"&gt;recent one on Price Dynamics in a Markovian Limit Order Market&lt;/a&gt; from Rama Cont of Columbia, which provides a mostly analytical model for high frequency dynamics of prices and order flow with endogenous relationship between durations and price changes. Most of the data in this study came from 2008. According to that data, for certain DJ stocks, ~1.2% of observed bid-ask spreads were more than 1 tick, thus not as pertinent to the model. The average lifetime of such a spread appears to be only a couple of milliseconds. The model does consider order flow in the presence of market orders and cancellations, including the case when they dominate limit orders. &lt;/p&gt;&lt;p&gt;I also found a number of books on the subject (more after the jump).&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/microstructure-modeling.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1467998646519332331?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1467998646519332331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/microstructure-modeling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1467998646519332331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1467998646519332331'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/microstructure-modeling.html' title='Microstructure Modeling'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-180447767158930884</id><published>2012-01-17T06:00:00.000-08:00</published><updated>2012-01-19T13:10:52.713-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='memory management'/><category scheme='http://www.blogger.com/atom/ns#' term='boost'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrency'/><title type='text'>Memory Management and Concurrency in C++</title><content type='html'>&lt;p&gt;Despite the flurry of activity from the Boost and C++11 standards committee, two crucial things remain quite challenging: efficient memory management and concurrency. What started me down this train of thought was some good old code reading. I encountered plain old vectors of pointers. There are apparently a handful of alternatives to this. Boost implements ptr_vector that keeps track of the lifetimes of all its elements as a unit. vector&amp;lt;shared_ptr&amp;gt; is another possibility. The core of the problem is that since vectors&amp;#39; underlying representation is a pointer, and one cannot get a pointer to a reference (the assumption being one wanted the efficiency of reference-passing but with the convenience of STL containers).  &lt;/p&gt;&lt;p&gt;More after the jump&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/memory-management-and-concurrency-in-c.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-180447767158930884?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/180447767158930884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/memory-management-and-concurrency-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/180447767158930884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/180447767158930884'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/memory-management-and-concurrency-in-c.html' title='Memory Management and Concurrency in C++'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5929884769087659619</id><published>2012-01-16T21:00:00.000-08:00</published><updated>2012-01-19T13:11:07.539-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='reading'/><category scheme='http://www.blogger.com/atom/ns#' term='economy'/><title type='text'>Airport Reading</title><content type='html'>&lt;p&gt;When I am stuck in the airport I often visit the bookstores there. Airports are apparently one of the last bastions where bookstores still exist whereas they have completely disappeared in some towns. Most of the time, airport bookstores do not carry anything of interest to me except the latest Barron's and a few finance magazines. Consequently, I was surprised pleasantly to see at least two of Michael Lewis' books at one airport bookstore, &lt;a href="http://www.amazon.com/gp/product/0393081818/ref=as_li_tf_tl?ie=UTF8&amp;tag=substructural-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0393081818"&gt;Boomerang: Travels in the New Third World&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=substructural-20&amp;l=as2&amp;o=1&amp;a=0393081818" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; (about the roots of financial crises in Greece, Ireland, Germany, and the US) and &lt;a href="http://www.amazon.com/gp/product/0393338398/ref=as_li_tf_tl?ie=UTF8&amp;tag=substructural-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0393338398"&gt;Moneyball&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=substructural-20&amp;l=as2&amp;o=1&amp;a=0393338398" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt; (about the business and economics of baseball), both being NY Times bestsellers. Lewis the the author of &lt;a href="http://www.amazon.com/gp/product/039333869X/ref=as_li_tf_tl?ie=UTF8&amp;tag=substructural-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=039333869X"&gt;Liar's Poker&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=substructural-20&amp;l=as2&amp;o=1&amp;a=039333869X" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;, a sardonic expose on the unreal bigger-than-life world of Wall Street in the 1980s.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5929884769087659619?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5929884769087659619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/airport-reading.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5929884769087659619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5929884769087659619'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/airport-reading.html' title='Airport Reading'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-8414931760451870806</id><published>2012-01-10T09:48:00.000-08:00</published><updated>2012-01-10T09:52:50.664-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='futures market'/><category scheme='http://www.blogger.com/atom/ns#' term='crude oil'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><title type='text'>Earnings season is upon us</title><content type='html'>&lt;p&gt;It&amp;#39;s earnings season again. Alcoa started us on a sour note with a multi-cent miss even after excluding one-time items. Tiffany&amp;#39;s warned. But benign retail numbers were out this morning (with Ross and Costco among others doing fairly well). This has given the market a lift. &lt;/p&gt;&lt;p&gt;I revisit a trade I was watching but did not make after the jump.&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/earnings-season-is-upon-us.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-8414931760451870806?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/8414931760451870806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/earnings-season-is-upon-us.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8414931760451870806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8414931760451870806'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/earnings-season-is-upon-us.html' title='Earnings season is upon us'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-3908648893362726354</id><published>2012-01-06T07:00:00.000-08:00</published><updated>2012-01-06T08:11:31.350-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='HFT'/><category scheme='http://www.blogger.com/atom/ns#' term='high-frequency trading'/><title type='text'>Trade Frequencies, Part 1</title><content type='html'>&lt;p&gt;Typically what people refer to as high-frequency trading occurs on the stock markets. However, firms have also branched out to a whole assortment of other markets in attempt to reap the alpha from high-frequency strategies. Moreover, data such as futures prices sometimes serve as a signal for equity trading. Different kinds of markets, however, have considerably different characteristics. Moreover, the volume and trade frequency varies among each individual security. On one side, you have the SPY ETF which is easily among the most actively traded securities in the stock market with daily volumes in the hundreds of millions. During August 2011, SPY&amp;#39;s volume even spiked to as much as 717 million, though 100-200 million is more typical. To put that into perspective, the total daily volume of the NYSE is about a couple billion in recent times. In contrast, some securities are barely traded at all.  &lt;/p&gt;&lt;p&gt;More on all this after the jump...&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/trade-frequencies-part-1.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-3908648893362726354?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/3908648893362726354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/trade-frequencies-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3908648893362726354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3908648893362726354'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/trade-frequencies-part-1.html' title='Trade Frequencies, Part 1'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-3725461708463810677</id><published>2012-01-05T11:01:00.000-08:00</published><updated>2012-01-05T11:01:15.968-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Garbage Collection and C++</title><content type='html'>&lt;p&gt;C/C++ had the potential for automatic garbage collection in the form of the conservative mark-sweep Boehm-Demers-Weiser garbage collector for decades (at least from 1988 onwards). Although an early version of the garbage collector is even included in the GCC distribution, only a few groups actively use it. Some have used it as a leak detector. Boehm himself explains this as due to &lt;a href="http://sysrun.haifa.il.ibm.com/hrl/ISMM2009/program.html#4"&gt;lack of standardization&lt;/a&gt;. With C++11, the hope is that this will change with official sanctioning of garbage collected implementations. The slide presentation you can find in the above link summarizes the design. The argument for garbage collection in C++ is the move to multicore, where the claim is that GC parallelizes better than manual management and that some parallelization techniques are simplified in the presence of GC.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-3725461708463810677?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/3725461708463810677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/garbage-collection-and-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3725461708463810677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3725461708463810677'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/garbage-collection-and-c.html' title='Garbage Collection and C++'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2776917951588289413</id><published>2012-01-05T10:15:00.000-08:00</published><updated>2012-01-05T10:15:59.291-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='dynamically typed'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>POPL 2012 Papers</title><content type='html'>&lt;p&gt;It's just a few weeks until POPL 2012 (Symposium on Principles of Programming Languages, one of the top programming language theory research conferences) in Philadelphia. The &lt;a href="https://docs.google.com/spreadsheet/pub?key=0Av2DFkf0lGU8dFAyaFNvZEppQkY3Z3pqREExRHA4R1E&amp;single=true&amp;gid=11&amp;output=html"&gt;program&lt;/a&gt; has been out for a while. This time, there are three papers on C/C++ semantics. Apparently we have gotten to the point where researchers have (mechanically) formalized interesting chunks of that large, complicated edifice. The one coming out from INRIA [&lt;a href="http://gallium.inria.fr/~xleroy/publi/cpp-construction.pdf"&gt;PDF&lt;/a&gt;] has a mechanized (Coq) semantics for C++ construction and destruction including C++11 features. The authors actually give a formal proof of the RAII (resource acquisition is initialization) pattern, specifically that in a terminating program every construction of a subobject is indeed matched by a destruction. The process of developing a formal semantics also helped identify issues in the C++ standard both C++03 and C++11. On the type systems side, there is also a paper from Adobe Research on gradual type systems, especially a type inference scheme with support for dynamic types. One paper describes a type system and language design supporting probability density functions for custom probability distributions and continuous probability. Apparently probability distributions are monads too!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2776917951588289413?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2776917951588289413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/popl-2012-papers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2776917951588289413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2776917951588289413'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/popl-2012-papers.html' title='POPL 2012 Papers'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2270323765465676566</id><published>2012-01-04T10:01:00.000-08:00</published><updated>2012-01-09T09:54:41.760-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='exchange-traded funds'/><category scheme='http://www.blogger.com/atom/ns#' term='ETF'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmark'/><title type='text'>Market Indexing</title><content type='html'>&lt;p&gt;Fundamental indexing, an idea promulgated by Rob Arnott and his firm, caused quite a stir when it was introduced in 2004 with many questioning the whole idea. It has since given rise to a number of ETFs. The original is PRF, an ETF launched in December 2005. &lt;a href="http://www.invescopowershares.com/rafi/"&gt;According to PowerShares&amp;#39; site&lt;/a&gt;, they are benchmarking PRF against the Russell 1000. Powershares followed on this product with 5 more, covering the developed markets ex-US (PXF), Asia Pacific ex-Japan (PAF), emerging markets (PXH), developed ex-US small cap (PDN), and US small-mid cap (PRFZ). &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/market-indexing.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2270323765465676566?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2270323765465676566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/market-indexing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2270323765465676566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2270323765465676566'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/market-indexing.html' title='Market Indexing'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-9005579702919964391</id><published>2012-01-03T11:22:00.000-08:00</published><updated>2012-01-03T15:55:33.796-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='market analysis'/><category scheme='http://www.blogger.com/atom/ns#' term='market performance'/><title type='text'>Forward Looking</title><content type='html'>&lt;p&gt;Now that the holidays are over, what is going on in the markets? A couple of European debt auctions went fairly well last week. This does not change the overall long-term picture, but looks like nothing collapsed over the holidays. Moreover, the Iran-Strait of Hormuz situation could have spun out of control early on, but it did not (yet). &lt;/p&gt;&lt;p&gt;I was curious what news items were affecting the companies on my equity watch lists (both long and short). On the growth side of things, the basic materials and energy side lead the market (APA, EOG, ROSE, APC, HAL, NE, MOS, FCX). FCX is up ~6%. The rest are up more than 2% for the most part. HAL is suffering from &lt;a href="http://www.marketwatch.com/story/bp-asks-halliburton-to-pay-costs-of-10-oil-spill-2012-01-03"&gt;some headline shock due to its spate with BP&lt;/a&gt; (BP is asking HAL to foot the cleanup bill plus lost profits), but the damage is mild since nothing is decided yet.   &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2012/01/forward-looking.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-9005579702919964391?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/9005579702919964391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2012/01/forward-looking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/9005579702919964391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/9005579702919964391'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2012/01/forward-looking.html' title='Forward Looking'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-swUv6AmDNr0/TwNSlBAha3I/AAAAAAAABZg/Mhxa7GbzlHA/s72-c/growth-wl-freq.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2480530231452363375</id><published>2011-12-22T09:59:00.001-08:00</published><updated>2011-12-22T10:47:23.093-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='corporate governance'/><title type='text'>Shareholder Meetings</title><content type='html'>&lt;p&gt;Matthew Rafat&amp;#39;s blog &lt;a href="http://willworkforjustice.blogspot.com/"&gt;willworkforjustice.blogspot.com&lt;/a&gt; has a first-hand record of shareholder meetings for a number of companies, though mostly in the Bay Area since that is where he is based. With organizations such as &lt;a href="http://www.moxyvote.com"&gt;moxyvote&lt;/a&gt; starting up and various motions towards more responsive corporate governance, this record is an interesting data point. Large shareholders (pension funds, etc.) are still for the most part slumbering giants. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/shareholder-meetings.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2480530231452363375?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2480530231452363375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/shareholder-meetings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2480530231452363375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2480530231452363375'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/shareholder-meetings.html' title='Shareholder Meetings'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-7129794280188264321</id><published>2011-12-20T06:00:00.001-08:00</published><updated>2012-01-09T07:48:11.533-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='latency'/><category scheme='http://www.blogger.com/atom/ns#' term='web browser'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>How long does it take to compile a web browser, Part 1</title><content type='html'>&lt;p&gt;In today&amp;#39;s brave new world, people can build and deploy a web app very quickly. However, on the other side of the equation, systems software such as web browsers are not getting any simpler. The cost of the rich media experience in modern web apps quite frequently borne by systems software including browsers, servers, and plugins. Just eyeballing, in Chrome (default multi-process mode), each tab take 30-100 MB of RAM. Luckily, I am not one to keep many tabs open concurrently, but many, many people do. A rich web experience can quickly gobble up whatever amount of memory you can throw at it. There are many people who have compared memory usage for Chrome, Firefox, Safari, and Internet Explorer (&lt;a href="http://techpp.com/2011/09/28/chrome-14-vs-firefox-7-memory-footprint-comparison/"&gt;TechPP&lt;/a&gt;, &lt;a href="http://download.cnet.com/8301-2007_4-20047314-12.html"&gt;CNet&lt;/a&gt;, &lt;a href="http://www.tomshardware.com/reviews/firefox-chrome-opera,2558-4.html"&gt;Tom&amp;#39;s Hardware&lt;/a&gt;, &lt;a href="http://www.dotnetperls.com/chrome-memory"&gt;DotNetPerls&lt;/a&gt;, and many more I am sure), but, here, I would like to take a look at another facet of web browser complexity: source code size, time to build, and size of debug executable. This post follows and expands upon the &lt;a href="http://substructural.blogspot.com/2011/11/sourceforge-open-source-quant-finance.html"&gt;type of study I did on open source finance software&lt;/a&gt;. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/facets-of-web-browsers-how-long-to.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-7129794280188264321?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/7129794280188264321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/facets-of-web-browsers-how-long-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7129794280188264321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7129794280188264321'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/facets-of-web-browsers-how-long-to.html' title='How long does it take to compile a web browser, Part 1'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-wId-xH4KUIc/TvEJThPDjHI/AAAAAAAABZU/tGOeMP9eRaI/s72-c/chromiumcomps.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-6907934764944684323</id><published>2011-12-20T06:00:00.000-08:00</published><updated>2011-12-20T09:12:00.732-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='economics'/><category scheme='http://www.blogger.com/atom/ns#' term='debt'/><category scheme='http://www.blogger.com/atom/ns#' term='economy'/><title type='text'>US Debt Service</title><content type='html'>&lt;p&gt;The economic times have really changed. The scope of household deleveraging is quite astounding. The Federal Reserve releases a figure called the Financial Service Ratio which measures amount of consumer and mortgage debt servicing including automobile lease payments, rental payments on tenant-occupied property, homeowners&amp;#39; insurance, and property tax payments to disposable personal income. For renters, the ratio peaked around 2001 at 31.05. For homeowners, it peak a lot later around 2007 at 17.55. Both have been sliding ever since. This data refers to the country as a whole. The picture for the individual regions may look different. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/us-debt-service.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-6907934764944684323?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/6907934764944684323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/us-debt-service.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6907934764944684323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6907934764944684323'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/us-debt-service.html' title='US Debt Service'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-kh8HAHnbPXE/TvC_KKTBq4I/AAAAAAAABY8/_tZcqXVK7m4/s72-c/debtservice.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5941843439461984141</id><published>2011-12-19T10:30:00.000-08:00</published><updated>2011-12-21T09:38:22.464-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='module system'/><category scheme='http://www.blogger.com/atom/ns#' term='SML/NJ'/><category scheme='http://www.blogger.com/atom/ns#' term='modularity'/><category scheme='http://www.blogger.com/atom/ns#' term='Standard ML'/><title type='text'>Symmetric Type Sharing in ML</title><content type='html'>&lt;p&gt;In the Standard ML language, there are two primary mechanisms for refining a module signature after the fact. One is a symmetric mechanism called type sharing and the other called &lt;tt&gt;where type&lt;/tt&gt;, aka fibration. These are useful for facilitating modular programming by enabling reuse of module signatures (i.e., the syntactic &amp;quot;type&amp;quot; of a module). &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/symmetric-type-sharing-in-ml.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5941843439461984141?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5941843439461984141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/symmetric-type-sharing-in-ml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5941843439461984141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5941843439461984141'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/symmetric-type-sharing-in-ml.html' title='Symmetric Type Sharing in ML'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-8663010123154215478</id><published>2011-12-16T13:51:00.000-08:00</published><updated>2011-12-16T13:51:20.930-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='exchange-traded funds'/><category scheme='http://www.blogger.com/atom/ns#' term='ETF'/><category scheme='http://www.blogger.com/atom/ns#' term='share buyback'/><title type='text'>Buybacks and Dividend Growth</title><content type='html'>&lt;p&gt;There is a &lt;a href="http://seekingalpha.com/article/314312-dividends-vs-buybacks-putting-the-debate-to-bed-part-ii"&gt;lively discussion&lt;/a&gt; on one of the front-page stories on Seekingalpha about whether Buybacks destroy value. As in my previous posts, I am on the fence regarding this one. It really varies on a case to case basis depending on where the money is coming from (some buybacks are highly leveraged and some special dividends come from debt issuance) and where it could have gone instead. It was surprising to see at least one investigation seemingly indicating that Buyback Achievers trump Dividend Achievers by a considerable margin. In terms of the intersection between PKW and PFM, it is only 12 companies: IBM, TGT, WAG, CB, FDO, WMT, GWW, CTAS, TJX, SFG, CASY, LOW. This group outperformed both PKW and PFM over a 1 year time frame. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/buybacks-and-dividend-growth.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-8663010123154215478?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/8663010123154215478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/buybacks-and-dividend-growth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8663010123154215478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8663010123154215478'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/buybacks-and-dividend-growth.html' title='Buybacks and Dividend Growth'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-UU_1gp-rly0/Tuu82EG0v8I/AAAAAAAABYs/yaki7wmR684/s72-c/pkw-pfm-intersection.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-209911891035256591</id><published>2011-12-16T10:46:00.000-08:00</published><updated>2011-12-16T11:40:23.320-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='market performance'/><title type='text'>Social Web IPOs</title><content type='html'>&lt;p&gt;Looks like Zynga&amp;#39;s IPO day didn&amp;#39;t start a social web frenzy (down 7.8% as of now). The broad market certainly was no help here. Quite a pattern is forming with Pandora, Groupon, Linkedin, and Renren. None of these led to an unqualified success, and most of them are doing quite poorly especially if one bought at the open of the first day. Those who bought at the IPO price did considerably better for each of those 3 names. Groupon and Pandora debuted last month and in June respectively. Linkedin and Renren debuted in May. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/social-web-ipos.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-209911891035256591?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/209911891035256591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/social-web-ipos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/209911891035256591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/209911891035256591'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/social-web-ipos.html' title='Social Web IPOs'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-8721606447119881330</id><published>2011-12-15T07:00:00.000-08:00</published><updated>2011-12-15T08:28:47.041-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud infrastructure'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud computing'/><title type='text'>Can free tiers be tear free?</title><content type='html'>&lt;p&gt;Many of the cloud computing services offer some kind of free tier these days. Most of them are time-limited (e.g., Amazon&amp;#39;s free tier lasts for 1 year, Microsoft&amp;#39;s 90 days), but some are not including Google. How do they stack up? &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/can-free-tiers-be-tear-free.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-8721606447119881330?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/8721606447119881330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/can-free-tiers-be-tear-free.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8721606447119881330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8721606447119881330'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/can-free-tiers-be-tear-free.html' title='Can free tiers be tear free?'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1193680862081191739</id><published>2011-12-14T15:25:00.000-08:00</published><updated>2011-12-14T15:25:23.969-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='semantics'/><category scheme='http://www.blogger.com/atom/ns#' term='language design'/><title type='text'>Data-Driven Language Design</title><content type='html'>&lt;p&gt; One recurring issue with the evolution of programming languages is the tension between feature creep and stagnation. Some programming languages manage to evolve very rapidly, incorporating all kinds of features in response to developer requests or the language architect&amp;#39;s leading. Brian Goetz has &lt;a href="http://www.ibm.com/developerworks/java/library/j-ldn1/"&gt;an interesting article on DeveloperWorks&lt;/a&gt; which argues for using &amp;quot;corpus analysis&amp;quot;, studying the actual frequency of use of language constructs in the corpus of source code, to guide the evolution of a language. In his article, he describes two examples, precise exceptions rethrow semantics and type inference, where corpus analysis played a role in determine how Java evolved. When I was working on SML/NJ, we informally used this technique to determine the best design in terms of certain type checking/inference and module system elements. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/data-driven-language-design.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1193680862081191739?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1193680862081191739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/data-driven-language-design.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1193680862081191739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1193680862081191739'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/data-driven-language-design.html' title='Data-Driven Language Design'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-264817312389048291</id><published>2011-12-13T13:57:00.000-08:00</published><updated>2011-12-14T08:55:23.891-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='exchange-traded funds'/><category scheme='http://www.blogger.com/atom/ns#' term='ETF'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='share buyback'/><title type='text'>Share Buybacks, Part 4</title><content type='html'>&lt;p&gt;Taking a sampling of the 41 PKW Buyback Achievers I could find XBRL annual reports on, there are a number of interesting points. The mean buyback rate for 2010 was 7.3% of common stock shares outstanding (DEI). Given this data point, IBM&amp;#39;s rate of buyback seems only a middling one. I would caution generalization from a single year&amp;#39;s worth of data, but it does provide a little perspective. A particular high or low buyback rate does not mean much by itself. One has to consider where the money for the buybacks is coming from and how is the rest of the business doing. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/share-buybacks-part-4.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-264817312389048291?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/264817312389048291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/share-buybacks-part-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/264817312389048291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/264817312389048291'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/share-buybacks-part-4.html' title='Share Buybacks, Part 4'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-c-JJerlwa1Q/TujT4dwMcAI/AAAAAAAABYc/Bl8UjeegKuo/s72-c/buyback-distribution-2010.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1182252898818780386</id><published>2011-12-13T12:35:00.000-08:00</published><updated>2011-12-13T12:35:43.730-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='market analysis'/><category scheme='http://www.blogger.com/atom/ns#' term='dollar'/><category scheme='http://www.blogger.com/atom/ns#' term='bond'/><title type='text'>Vicious Cycle</title><content type='html'>&lt;p&gt;The Fed didn't ride in with the cavalry today. Looking from their perspective, why would they? The domestic data from the past few weeks did not indicate catastrophe. Popular support for further easing is tenuous at best. The main risk is from the debt situation in Europe. The evanescent hope that fueled the past few weeks' action dissipated just as quickly. The Dollar and Treasuries skyrocketed from the lows of the day. In Europe, there is a vicious cycle going on. The large private holders of sovereigns (i.e., banks and funds) insist on being made whole, thus pressuring the very sovereigns they don't want to default. The European governments insist on more and more austerity, negating what little chance they had to have secular growth lift them out of the mess. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1182252898818780386?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1182252898818780386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/vicious-cycle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1182252898818780386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1182252898818780386'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/vicious-cycle.html' title='Vicious Cycle'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-3181582237059497527</id><published>2011-12-13T12:03:00.000-08:00</published><updated>2011-12-13T12:37:20.800-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='ocaml'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud infrastructure'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='web framework'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='cloud computing'/><title type='text'>Server Infrastructure, Part 2</title><content type='html'>&lt;p&gt;Following &lt;a href="http://substructural.blogspot.com/2011/11/server-infrastructure.html"&gt;post on Oscigen&amp;#39;s benchmark&lt;/a&gt;, I was curious how much does increased memory usage due to Ruby and Python-based web app stacks affect the bottom line. Plotting Amazon EC2 instance cost against instance memory shows that costs scale roughly linearly with the memory allowance. The least squares fit is y(x) = 0.028*x + 0.079. Linear scaling means that when Ruby/Rails take 10x the memory (roughly the difference between OCaml/Oscigen and Ruby/Rails) then it costs 10x as much in the long run (and after scaling up). For smaller instances, the difference is probably less. Of course, this doesn&amp;#39;t take into account the productivity difference. However, although Ruby and Rails are clearly more productive than C/CGI, it is not clear that it is more productive than other high-level languages with better memory use and performance characteristics.  &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/server-infrastructure-part-2.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-3181582237059497527?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/3181582237059497527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/server-infrastructure-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3181582237059497527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3181582237059497527'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/server-infrastructure-part-2.html' title='Server Infrastructure, Part 2'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-yLMmLr_QVsc/Tuettjz0RHI/AAAAAAAABYQ/7E-ckzZQ6Ic/s72-c/ec2mem.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-8473182256408704296</id><published>2011-12-12T11:00:00.000-08:00</published><updated>2011-12-12T11:00:38.794-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trading strategies'/><category scheme='http://www.blogger.com/atom/ns#' term='treasury'/><category scheme='http://www.blogger.com/atom/ns#' term='bond'/><title type='text'>A Paper on "High Frequency" Treasuries</title><content type='html'>&lt;p&gt;There is &lt;a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=565441"&gt;a paper from London Business School&lt;/a&gt; dated from a while back (2002) that studies simple pairs strategies applied to the whole universe of US treasuries secondary market. The data used are intraday quotes and transaction information from GovPX (thus "high frequency"), which has since been acquired. The paper has an interesting table comparing equity and treasury markets (Table 1). One particular metric is the "social acceptance" of shorting the securities. The claim is that shorting equities has low acceptance whereas shorting treasuries is "less affected". The proposed strategies reduced the standard deviation of returns considerably though the level of returns were also dragged down somewhat. The best performing strategies generally kept risk controls very tight. When transaction and financing costs are accounted for, the returns start to trail the risk free return, though it outperforms equity and the treasury bond index in terms of Sharpe ratio and Gain-Loss ratio. Curiously, these strategies are slightly positively correlated with equities and slightly negatively correlated with the bond index.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-8473182256408704296?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/8473182256408704296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/paper-on-high-frequency-treasuries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8473182256408704296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8473182256408704296'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/paper-on-high-frequency-treasuries.html' title='A Paper on &quot;High Frequency&quot; Treasuries'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-7847179671359893350</id><published>2011-12-10T21:17:00.001-08:00</published><updated>2012-01-03T15:37:41.292-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='ocaml'/><category scheme='http://www.blogger.com/atom/ns#' term='ML'/><category scheme='http://www.blogger.com/atom/ns#' term='haskell'/><category scheme='http://www.blogger.com/atom/ns#' term='ghc'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmark'/><title type='text'>Save bits, save power, save the world, Part 2</title><content type='html'>&lt;p&gt;The GHC Haskell and OCaml compilers do not have builtin popcount support, so again I precomputed the bit pop count for each ASCII letter. Using the same ~9 Mb 4x concatenation of /usr/share/dict/words from &lt;a href="http://substructural.blogspot.com/2011/12/save-bits-save-power-save-world.html"&gt;last time&lt;/a&gt; I measured the performance of the resultant code. This time, the test machine was a Macbook Pro 2.16 GHz with 2 Gb of RAM. The microprocessor is a Core Duo T7400 which has no support for the popcnt instruction anyway.&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/save-bits-save-power-save-world-part-2.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-7847179671359893350?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/7847179671359893350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/save-bits-save-power-save-world-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7847179671359893350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7847179671359893350'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/save-bits-save-power-save-world-part-2.html' title='Save bits, save power, save the world, Part 2'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-4477004191966360548</id><published>2011-12-08T15:07:00.001-08:00</published><updated>2011-12-08T15:16:38.449-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><title type='text'>Europe Again</title><content type='html'>The markets closed on down note. After hours, we have ES, ZN, and DX at 1231.75 (down ~2.5%), 131'055 (up ~0.39%), and 78.920 (up ~0.55%) respectively. Tomorrow is the end of another summit (an EU summit). Europe remains the mover of markets for now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-4477004191966360548?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/4477004191966360548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/europe-again.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4477004191966360548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4477004191966360548'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/europe-again.html' title='Europe Again'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2289391781451643400</id><published>2011-12-08T06:58:00.001-08:00</published><updated>2011-12-08T07:27:47.218-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><title type='text'>Risk Aversion</title><content type='html'>&lt;p&gt;The Dollar is up, 78.780 (+0.310). Treasuries are holding quite firm at 130'240. The ECB lowered rates back to the record low to 1.00%, offered banks unlimited cash, but did not initiate new bond purchases. Gold has tripped up a bit, but nothing game-changing at this point. Taking a look at the weekly for large-cap equities (S&amp;amp;P 500 E-mini), one can see the slow but steady upward Europe hope rally (rising channel). Today's action appears to have rejected new highs, but there has been no significant confirmation of a break in this very short-term time frame.  &lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3dpYAErk9dY/TuDWHjgEJ-I/AAAAAAAABYE/oaLyhjpebJM/s1600/ESDec11.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="150" width="200" src="http://1.bp.blogspot.com/-3dpYAErk9dY/TuDWHjgEJ-I/AAAAAAAABYE/oaLyhjpebJM/s200/ESDec11.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;In terms of the individual stocks front, I will be looking at some emerging market issues. Brazilian metals miner VALE looks to be hanging around the 52-week bottom at 22.42. Brazilian oil giant Petrobras PBR bounced up a little but lagged the broader market. Today it took a 3.84% plunge to 27.10. Chinese oil offshore driller CNOOC CEO is at 193.68, which is actually around the top of its recent range. It currently yields around 2.9%&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2289391781451643400?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2289391781451643400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/risk-aversion.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2289391781451643400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2289391781451643400'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/risk-aversion.html' title='Risk Aversion'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-3dpYAErk9dY/TuDWHjgEJ-I/AAAAAAAABYE/oaLyhjpebJM/s72-c/ESDec11.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1021133491598737136</id><published>2011-12-07T07:30:00.001-08:00</published><updated>2012-01-03T15:36:03.202-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='scala'/><title type='text'>Save bits, save power, save the world, Part 1</title><content type='html'>&lt;p&gt;Ok, the title was a little tongue-in-cheek. I did a fairly whimsical experiment yesterday. Since text strings are represented as bits which are either 1 (on) or 0 (off), I was wondering which unused domain names used the minimum number of &amp;quot;on&amp;quot; bits. The answer may be non-intuitive to the non-computer scientist. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/save-bits-save-power-save-world.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1021133491598737136?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1021133491598737136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/save-bits-save-power-save-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1021133491598737136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1021133491598737136'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/save-bits-save-power-save-world.html' title='Save bits, save power, save the world, Part 1'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-3635728929446051350</id><published>2011-12-07T06:20:00.000-08:00</published><updated>2011-12-07T06:20:47.950-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ML'/><category scheme='http://www.blogger.com/atom/ns#' term='statically typed'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='Standard ML'/><title type='text'>Substructural Type Systems and Performance, Part 1</title><content type='html'>&lt;p&gt;Why is the name of this blog &amp;quot;substructural&amp;quot;? In turns out that in the realm of advanced type systems, there is a family of type systems derived from a family of logical systems called substructural logics. The chief distinction of substructural type systems is that one or more of the &amp;quot;structural properties&amp;quot; of type environments are eliminated. These rules are exchange, weakening, and contraction. Exchange allows arbitrarily reordering bindings in the type environment. Weakening enables adding new bindings. A type derivation is deemed &amp;quot;weakened&amp;quot; in the sense that if a program already typechecks using a certain type environment, adding new bindings to that environment won&amp;#39;t negate the well-typing of the program. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/substructural-type-systems-and.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-3635728929446051350?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/3635728929446051350/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/substructural-type-systems-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3635728929446051350'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3635728929446051350'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/substructural-type-systems-and.html' title='Substructural Type Systems and Performance, Part 1'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1432303438601796181</id><published>2011-12-06T15:27:00.000-08:00</published><updated>2011-12-06T21:24:11.600-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='entrepreneurship'/><category scheme='http://www.blogger.com/atom/ns#' term='startup'/><category scheme='http://www.blogger.com/atom/ns#' term='technology'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>The Steam Engine of the 2010s?</title><content type='html'>&lt;p&gt;I read a couple of technology-/startup-oriented articles recently. One was yesterday&amp;#39;s &lt;a href="http://www.forbes.com/sites/venkateshrao/2011/12/05/the-rise-of-developeronomics/"&gt;Forbes article on  developeronomics&lt;/a&gt; which describes the growing prominence of talented software developers and investment in them in stark terms. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/11/steam-engine-of-2010s.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1432303438601796181?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1432303438601796181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/steam-engine-of-2010s.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1432303438601796181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1432303438601796181'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/steam-engine-of-2010s.html' title='The Steam Engine of the 2010s?'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1920032270192275997</id><published>2011-12-05T11:03:00.001-08:00</published><updated>2011-12-15T08:31:44.266-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='market analysis'/><category scheme='http://www.blogger.com/atom/ns#' term='exchange-traded funds'/><category scheme='http://www.blogger.com/atom/ns#' term='ETF'/><category scheme='http://www.blogger.com/atom/ns#' term='share buyback'/><title type='text'>Share Buybacks, Part 3</title><content type='html'>&lt;p&gt;Following my previous discussions of share buybacks &lt;a href="http://substructural.blogspot.com/2011/11/share-buybacks-part-2.html"&gt;here&lt;/a&gt; and &lt;a href="http://substructural.blogspot.com/2011/11/share-buy-backs-part-1.html"&gt;here&lt;/a&gt;, let&amp;#39;s look into the distribution of the share counts for the PKW (Share Buyback Achievers ETF) components. The components of the Share Buyback Achievers exhibit significant diversity in outstanding shares. For this study, I used the outstanding share information from Yahoo Finance which appears to be a rough undiluted number. The mean, median, and standard deviation of share count are 242M, 81M, and 430M respectively. The component with the minimum number of shares outstanding in this fund is homebuilder NVR with a mere 4.98M shares out. Mega-retailer WMT has the most with 3.44B shares.&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/share-buybacks-part-3.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1920032270192275997?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1920032270192275997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/share-buybacks-part-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1920032270192275997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1920032270192275997'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/share-buybacks-part-3.html' title='Share Buybacks, Part 3'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-S1VqoZLH2yo/Tt0jGvKtgWI/AAAAAAAABXs/x_36AZqIKEU/s72-c/buyback-shares-outstanding-auto.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2055152019638276283</id><published>2011-12-02T10:40:00.001-08:00</published><updated>2011-12-06T21:24:52.607-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='module system'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='ML'/><category scheme='http://www.blogger.com/atom/ns#' term='modularity'/><category scheme='http://www.blogger.com/atom/ns#' term='generic programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Standard ML'/><category scheme='http://www.blogger.com/atom/ns#' term='scala'/><title type='text'>Firestorm</title><content type='html'>&lt;p&gt;The past few days have seen a veritable firestorm of flames between the Java and Scala communities. The proximate cause was a leaked private email outlining what the Yammer folks disliked about Scala. An &lt;a href="http://eng.yammer.com/blog/2011/11/30/scala-at-yammer.html"&gt;official post&lt;/a&gt; from Yammer followed but not before many bloggers had a field day with the leaked email. What is interesting is that one such discussion on Stephen Colebourne&amp;#39;s blog pointed that the the &lt;a href="http://blog.joda.org/2011/11/scala-feels-like-ejb-2-and-other.html"&gt;lack of a &amp;quot;module system&amp;quot;&lt;/a&gt; is a principal deficiency of Scala. This point, mind you, was not part of the Yammer email. In fact, it preceded the email by a few days. The post cited the Scala&amp;#39;s community&amp;#39;s response to an inquiry about Scala and &amp;quot;module systems&amp;quot; [&lt;a href="http://groups.google.com/group/scala-debate/browse_thread/thread/15fb1cf78eed9d7f?pli=1"&gt;Google Groups&lt;/a&gt;]. That inquiry initially resulted in some misunderstanding. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/12/firestorm.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2055152019638276283?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2055152019638276283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/firestorm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2055152019638276283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2055152019638276283'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/firestorm.html' title='Firestorm'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-922776293000858242</id><published>2011-12-02T08:11:00.001-08:00</published><updated>2011-12-02T12:53:05.270-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='trading strategies'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='automated trading'/><category scheme='http://www.blogger.com/atom/ns#' term='genetic programming'/><title type='text'>Multiarmed Bandits</title><content type='html'>I tweeted a little while ago about a post from the Untyped people on &lt;a href="http://untyped.com/untyping/2011/02/11/stop-ab-testing-and-make-out-like-a-bandit/"&gt;applying a multiarmed bandit algorithm to website optimization (in contrast to A/B testing)&lt;/a&gt;. It turns out that many have considered the multiarmed bandit problem for optimizing market maker profitability,Bandit Market Maker by Penna and Reid [&lt;a href="http://arxiv.org/abs/1112.0076v1"&gt;PDF&lt;/a&gt;]. The basic idea is to dynamically optimize (i.e., reinforcement/online learning) the use of k-levers each operating under initially unknown and eventually partly known distributions. Presumably, the more one uses the levers, the more one learns about the reward, but there is an exploration-exploitation dilemma -- since we are operating online one has to choose whether to take the empirically revealed best choice thus far or to continue to explore for more rewarding options. The exploration-exploitation dilemma also matters to genetic algorithms and programming, but the multiarmed bandit problem explicitly optimizes for it. The exciting thing is that after decades of research, they have found optimal algorithms for the multiarmed bandit problem. The Untyped post cites one of them, Finite-time Analysis of the Multiarmed Bandit Problem by Auer et al [&lt;a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.98.9211&amp;rep=rep1&amp;type=pdf"&gt;PDF&lt;/a&gt;].&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-922776293000858242?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/922776293000858242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/multiarmed-bandits.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/922776293000858242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/922776293000858242'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/multiarmed-bandits.html' title='Multiarmed Bandits'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5386936424075106490</id><published>2011-12-01T11:43:00.001-08:00</published><updated>2011-12-06T21:25:11.194-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exchange-traded funds'/><category scheme='http://www.blogger.com/atom/ns#' term='ETF'/><category scheme='http://www.blogger.com/atom/ns#' term='commodities'/><title type='text'>Crude Oil and Oil Stocks</title><content type='html'>One would logically expect oil stocks to track with crude oil prices. For the most part, this is true. Below are the correlation coefficients between a select number of oil services, drillers, refiners, integrated conglomerates, an oil sector ETF (XLE), and an ETF for accessing crude prices (USO), imperfect as it may be due to futures roll. Though most companies track with USO, there are a couple of exceptions. Transocean (RIG) exhibits low correlation with other sector companies and even a negative correlation coefficient with the commodity itself. Halliburton (HAL) has also been exhibiting very low correlation coefficient (0.16). &lt;a href="http://substructural.blogspot.com/2011/12/crude-oil-and-oil-stocks.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5386936424075106490?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5386936424075106490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/12/crude-oil-and-oil-stocks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5386936424075106490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5386936424075106490'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/12/crude-oil-and-oil-stocks.html' title='Crude Oil and Oil Stocks'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2144303153407951935</id><published>2011-11-30T09:03:00.001-08:00</published><updated>2011-11-30T09:09:37.667-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='dollar'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='treasury'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='bond'/><title type='text'>Euphoria</title><content type='html'>The markets have been alternating quite quickly from euphoria to depression and back to euphoria. Today is one of those euphoric days. S&amp;ampP e-mini December (ES) is up more than 3.2% as I write this. The 10-year (ZN) took a nose-dive after news from the central banks and ADP numbers (which were very good and came with a hefty upward revision of October numbers), but has recovered to a -0.23% loss. The dollar (DX) has tanked also at 78.450. The next big event is Friday Nonfarm Payrolls (NFP).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2144303153407951935?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2144303153407951935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/euphoria.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2144303153407951935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2144303153407951935'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/euphoria.html' title='Euphoria'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-7014571166739311434</id><published>2011-11-29T09:38:00.001-08:00</published><updated>2011-12-15T08:31:52.951-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='exchange-traded funds'/><category scheme='http://www.blogger.com/atom/ns#' term='ETF'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='share buyback'/><title type='text'>Share Buybacks, Part 2</title><content type='html'>In my &lt;a href="http://substructural.blogspot.com/2011/11/share-buy-backs-part-1.html"&gt;last post on share buybacks&lt;/a&gt;, I started by breaking down the components of the Powershares Share Buyback Achievers ETF PKW. The fund PKW sports an average PE of 13, a yield of 0.78%, and a beta of 0.98. Over several periods, PKW outperformed SPY (with a bout of slight underperformance recently):&lt;a href="http://substructural.blogspot.com/2011/11/share-buybacks-part-2.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-7014571166739311434?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/7014571166739311434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/share-buybacks-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7014571166739311434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7014571166739311434'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/share-buybacks-part-2.html' title='Share Buybacks, Part 2'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-8519688438284584183</id><published>2011-11-29T09:15:00.001-08:00</published><updated>2011-11-29T10:24:16.159-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='scala'/><title type='text'>Scala Performance</title><content type='html'>I just found this &lt;a href="http://brizzled.clapper.org/id/88/"&gt;experiment&lt;/a&gt; pitting several Python-based servers versus a Scala one. After "priming the pump" to get the VM to optimize the Scala one, Scala handled 3.6x more requests per second than the Python Twisted web server. It even handled 8.5% more requests than a largely C-infused Python server &lt;a href="https://github.com/william-os4y/fapws3/wiki"&gt;Fast Asyncronous Python WSGI Server&lt;/a&gt;. No memory use information was given, but these results do definitely tilt towards Scala.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-8519688438284584183?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/8519688438284584183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/scala-performance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8519688438284584183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8519688438284584183'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/scala-performance.html' title='Scala Performance'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5465913490640634084</id><published>2011-11-28T11:13:00.001-08:00</published><updated>2011-12-15T08:30:18.318-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='exchange-traded funds'/><category scheme='http://www.blogger.com/atom/ns#' term='ETF'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='share buyback'/><title type='text'>Share Buybacks, Part 1</title><content type='html'>&lt;p&gt;I recently read an interesting &lt;a href="http://seekingalpha.com/article/309718-permanent-share-buybacks-ibm-s-path-to-sustainable-wealth-creation"&gt;article on SeekingAlpha&lt;/a&gt; about IBM's share buyback record. The article says that over the past 16 years, IBM has been able to half its outstanding share count, which Warren Buffett claims as one reason why he bought $10B worth. That got me thinking, there is at least one ETF focused on share buybacks, &lt;a href="http://www.invescopowershares.com/products/overview.aspx?ticker=pkw"&gt;PKW PowerShares Buyback Achievers&lt;/a&gt;. The fund has 139 components. What is IBM's performance relative to the rest of these? The fund has only been around since 12/2006, but presumably the index (Mergent DRB) has been around a while longer. Some of the components include TGT, DTV, TWX, TJX, COH, AZO, and GPS at 4.77%, 13.4%, 4.99%, 4.82%, 9.11%, 10.62%, and 10.35% decrease in common stock shares outstanding from FY 2010 to FY 2011 respectively. From the SeekingAlpha article, IBM has bought back anywhere from 0.01% to 8.73% of shares in a single year. Stay tuned for more information on the share buyback data point.&lt;/p&gt;&lt;p&gt;This is the first post in a series. The next post is &lt;a href="http://substructural.blogspot.com/2011/11/share-buybacks-part-2.html"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5465913490640634084?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5465913490640634084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/share-buy-backs-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5465913490640634084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5465913490640634084'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/share-buy-backs-part-1.html' title='Share Buybacks, Part 1'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-8918780662913824126</id><published>2011-11-25T09:28:00.001-08:00</published><updated>2011-11-27T18:58:49.070-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='exchange-traded funds'/><category scheme='http://www.blogger.com/atom/ns#' term='ETF'/><category scheme='http://www.blogger.com/atom/ns#' term='market performance'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><title type='text'>ETF Performance</title><content type='html'>Comparing ETF performance is actually somewhat tricky, though the issue isn't particular to ETFs. Though the CFA material has whole sections to deal with presentation of performance, there remains many variables. Returns can be annualized (though generally only performance terms 1 year or more should be annualized) or cumulative. The prices used could be bid-ask midpoints at closing (which is the preferred method by ETF issuers) or last trade price (which is the data available to us mere mortals). The performance can be total return (including any distributions such as dividends and capital distributions) or market price return. The cumulative return could end on today or the last business day of the preceding month. Then there is market and NAV performance. All these factors can make a significant difference in the calculated performance numbers, especially over longer periods. For illiquid issues, the bid-ask midpoints and last trade may differ considerably. Yesterday, I collected cumulative returns for IYY (iShares Dow US Broad Index ETF) from a few places:&lt;br /&gt;&lt;div style="display: inline-block; padding-right: 20px;"&gt;Schwab Cumulative &lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Period&lt;/th&gt;&lt;th&gt;Mkt&lt;/th&gt;&lt;th&gt;NAV&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1 mo&lt;/td&gt;&lt;td&gt;11.3&lt;/td&gt;&lt;td&gt;11.3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3 mo&lt;/td&gt;&lt;td&gt;-3.3&lt;/td&gt;&lt;td&gt;-3.2&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6 mo&lt;/td&gt;&lt;td&gt;-8.0&lt;/td&gt;&lt;td&gt;-8.0&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1 yr&lt;/td&gt;&lt;td&gt;-7.8&lt;/td&gt;&lt;td&gt;-7.8&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="display: inline-block; padding-right: 20px;"&gt;Yahoo "Trailing Returns" &lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Period&lt;/th&gt;&lt;th&gt;Mkt&lt;/th&gt;&lt;th&gt;NAV&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1 mo&lt;/td&gt;&lt;td&gt;11.30&lt;/td&gt;&lt;td&gt;11.33&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3 mo&lt;/td&gt;&lt;td&gt;-3.26&lt;/td&gt;&lt;td&gt;-3.17&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1 yr&lt;/td&gt;&lt;td&gt;7.76&lt;/td&gt;&lt;td&gt;7.84&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div style="display: inline-block; padding-right: 20px;"&gt;iShares Cumulative&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th&gt;Period&lt;/th&gt;&lt;th&gt;Mkt&lt;/th&gt;&lt;th&gt;Total&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1 mo&lt;/td&gt;&lt;td&gt;11.31&lt;/td&gt;&lt;td&gt;11.33&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3 mo&lt;/td&gt;&lt;td&gt;-3.15&lt;/td&gt;&lt;td&gt;-3.16&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6 mo&lt;/td&gt;&lt;td&gt;-7.96&lt;/td&gt;&lt;td&gt;-7.99&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;1 yr&lt;/td&gt;&lt;td&gt;7.83&lt;/td&gt;&lt;td&gt;7.87&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;Though the Schwab and Yahoo data are agreement, notice how the iShares reported performances diverges starting from the 3 mos point. In a low yield environment, the difference between -3.26% and -3.15% cumulative market returns is huge. I have not been able to reconcile this discrepancy exactly. It is not merely the $0.262 dividend distribution during the 3-mo period. I think the moral of the story is threefold:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;take nothing for granted&lt;/li&gt;&lt;li&gt;always read the fine print on how performance is calculated&lt;/li&gt;&lt;li&gt;try to obtain performance data from multiple sources&lt;/li&gt;&lt;/ol&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-8918780662913824126?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/8918780662913824126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/etf-performance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8918780662913824126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8918780662913824126'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/etf-performance.html' title='ETF Performance'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-6060611932495094823</id><published>2011-11-24T11:22:00.001-08:00</published><updated>2011-11-25T09:49:51.328-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><title type='text'>Yahoo Finance Gotcha</title><content type='html'>While writing scripts to reproduce the returns information on some ETFs, I found a silly gotcha when using data from Yahoo Finance. It turns out that the website and CSV historical quotes information interprets starting dates differently. If one asks for a starting day that is not a business day, the website will also give quote information for the last business day preceding your starting day. The CSV historical quotes has the opposite behavior. If the starting day is not a business day, the earliest quote that the CSV gives is the first business day after your starting day. For example, the earliest quote &lt;tt&gt;&lt;a href="http://ichart.finance.yahoo.com/table.csv?s=SCHX&amp;a=06&amp;b=31&amp;c=2011&amp;d=09&amp;e=31&amp;f=2011&amp;g=d&amp;ignore=.csv"&gt;http://ichart.finance.yahoo.com/table.csv?s=SCHX&amp;a=06&amp;b=31&amp;c=2011&amp;d=09&amp;e=31&amp;f=2011&amp;g=d&amp;ignore=.csv&lt;/a&gt;&lt;/tt&gt; will give is 2011-08-01 whereas &lt;tt&gt;&lt;a href="http://finance.yahoo.com/q/hp?s=SCHX&amp;a=06&amp;b=31&amp;c=2011&amp;d=09&amp;e=31&amp;f=2011&amp;g=d"&gt;http://finance.yahoo.com/q/hp?s=SCHX&amp;a=06&amp;b=31&amp;c=2011&amp;d=09&amp;e=31&amp;f=2011&amp;g=d&lt;/a&gt;&lt;/tt&gt; will give 2011-07-29, with July 31, 2011 (the month in the URL request is also 0-origin so 06 is July) being a Sunday. This is certainly something to watch out for when fine-tuning data collection from Yahoo.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-6060611932495094823?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/6060611932495094823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/yahoo-finance-gotcha.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6060611932495094823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6060611932495094823'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/yahoo-finance-gotcha.html' title='Yahoo Finance Gotcha'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-7961389082298395715</id><published>2011-11-23T16:45:00.001-08:00</published><updated>2011-11-23T17:01:35.337-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><title type='text'>Pre-Holiday Closing</title><content type='html'>The markets close for this short week due to the US holidays. The S&amp;ampP 500 stands at 1161.79 and the 10-year treasury yield at 1.88. The Treasury market has been telegraphing the massive tail risk for quite a while now ever since February when yields hit 3.74 and have been tanking ever since. Now it looks like the core Euro-zone is feeling the heat with French and even German sovereign yields rising. The German 10-year bund still has a -22.9 basis point spread over the US 10-year, though the 2- and 5-year have 39.2 and 25.2 basis points spreads over their respective US counterparts. On the bright side, Durable Goods did not turn out too bad, but that is little consolation for the volatility wary.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-7961389082298395715?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/7961389082298395715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/pre-holiday-closing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7961389082298395715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/7961389082298395715'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/pre-holiday-closing.html' title='Pre-Holiday Closing'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-3394498256810382264</id><published>2011-11-22T13:23:00.001-08:00</published><updated>2011-11-22T19:06:33.707-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dynamically typed'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='template'/><category scheme='http://www.blogger.com/atom/ns#' term='statically typed'/><category scheme='http://www.blogger.com/atom/ns#' term='boost'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><title type='text'>Static Type System and Numerical Computing</title><content type='html'>The programming languages with which most people are familiar, such C/C++, Java, Python, JavaScript, and Ruby, presents a very stark contrast. On the one hand, you have statically typed languages (C/C++ and Java) which are amenable to a wide assortment of compile-time optimizations due to the presence of types. On the other, you have dynamically typed languages (Python, JavaScript, and Ruby) which are "fun" to program and amenable to rapid prototype due to more succinct syntax partly due to the absence of explicit type annotations. The sweet spot, in my humble opinion, is statically type but with type inference, a subject of my expertise and doctoral studies. I plan to write a few posts on this subject, near and dear to my heart. Heavy duty Numerical computing is one area where dynamically typed languages such as Matlab, R, and NumPy/Python have gained a considerable mindshare. Since NumPy offloads computations to efficient C libraries, this is quite reasonable. I would like to discuss where I think numerical computing and statistical analysis programs can benefit from a more sophisticated static type system with type inference. To whet your appetite, consider the case that C++'s Boost Library contains the &lt;a href="http://www.boost.org/doc/libs/1_35_0/libs/mpl/doc/tutorial/dimensional-analysis.html"&gt;functionality needed to statically check for units&lt;/a&gt; (i.e., dimensional analysis). The performance difference between code generated from statically typed languages and from dynamically typed languages is not just the absence of dynamic type checks. Types in static type systems enable a considerable array of optimizations to get rid of that last tiny ounce of latency.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-3394498256810382264?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/3394498256810382264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/statically-typed-programming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3394498256810382264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/3394498256810382264'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/statically-typed-programming.html' title='Static Type System and Numerical Computing'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-820554344348390217</id><published>2011-11-21T07:14:00.001-08:00</published><updated>2011-12-06T21:27:33.706-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='open source'/><category scheme='http://www.blogger.com/atom/ns#' term='quickfix'/><category scheme='http://www.blogger.com/atom/ns#' term='quantitative finance'/><category scheme='http://www.blogger.com/atom/ns#' term='software'/><category scheme='http://www.blogger.com/atom/ns#' term='quantlib'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><title type='text'>Top 5 Open Source Quant Finance Projects</title><content type='html'>In the recent months, I have found the data on open source development projects to be quite fascinating. It turns out that most of the activity in open source quant finance code happens on Sourceforge. I pulled some of that data and charted them.&lt;a href="http://substructural.blogspot.com/2011/11/sourceforge-open-source-quant-finance.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-820554344348390217?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/820554344348390217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/sourceforge-open-source-quant-finance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/820554344348390217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/820554344348390217'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/sourceforge-open-source-quant-finance.html' title='Top 5 Open Source Quant Finance Projects'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-yLgCvHHGlt8/Tsp7SPJaygI/AAAAAAAABWU/G1dc9yT0t_k/s72-c/qfsfdownloads.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-2917959874271698775</id><published>2011-11-18T10:43:00.001-08:00</published><updated>2011-11-22T18:37:30.277-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='predictive analytics'/><category scheme='http://www.blogger.com/atom/ns#' term='social media'/><category scheme='http://www.blogger.com/atom/ns#' term='data mining'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='social networks'/><title type='text'>Datamining Sentiment from News Text</title><content type='html'>In an earlier post, I mentioned different companies using social media to gather information for stock market trades. The larger area of developing predictive analytics and datamining of news article text has several interesting players: Thomas Reuters [&lt;a href="http://thomsonreuters.com/content/financial/pdf/enterprise/Machine_Readable_News.pdf"&gt;PDF&lt;/a&gt;], &lt;a href="http://ravenpack.com/research/newsanalysis.htm"&gt;Dow Jones (RavenPack)&lt;/a&gt;, &lt;a href="http://www.predictivesignals.com/"&gt;Predictive Signal&lt;/a&gt;, and &lt;a href="http://www.marketpsychdata.com/"&gt;MarketPsych&lt;/a&gt;. Predictive Signal claims 10.4% positive returns (not annualized) over a nearly 3 month period (May to Aug 2011) versus an S&amp;ampP 500 decline of 9.9%. MarketPsych cites a 25+% better returns than the S&amp;ampP 500 with a third of the volatility from September 2008 to December 2010. In the latter, they actually traded over that 2 year period using their proprietary signals (&lt;a href="http://www.marketpsy.com/"&gt;MarketPsy Long-Short Fund LP&lt;/a&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-2917959874271698775?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/2917959874271698775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/datamining-sentiment-from-news-text.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2917959874271698775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/2917959874271698775'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/datamining-sentiment-from-news-text.html' title='Datamining Sentiment from News Text'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-6248437879222898333</id><published>2011-11-18T05:09:00.001-08:00</published><updated>2011-11-22T18:36:51.791-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='futures market'/><category scheme='http://www.blogger.com/atom/ns#' term='dollar'/><category scheme='http://www.blogger.com/atom/ns#' term='investment'/><category scheme='http://www.blogger.com/atom/ns#' term='treasury'/><category scheme='http://www.blogger.com/atom/ns#' term='sp500'/><category scheme='http://www.blogger.com/atom/ns#' term='emini'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='bond'/><title type='text'>Options Expiration Friday</title><content type='html'>&lt;p&gt;Today is options expiration Friday and Leading Indicators at 10:00am. Futures currently read as follows:&lt;/p&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;Contract&lt;/td&gt;&lt;td&gt;Price&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ES Dec&lt;/td&gt;&lt;td&gt;1223.00&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ZN Dec&lt;/td&gt;&lt;td&gt;130'155&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;DX Dec&lt;/td&gt;&lt;td&gt;77.840&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-6248437879222898333?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/6248437879222898333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/today-is-options-expiration-friday-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6248437879222898333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6248437879222898333'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/today-is-options-expiration-friday-and.html' title='Options Expiration Friday'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-6220144996485178622</id><published>2011-11-17T13:48:00.001-08:00</published><updated>2011-11-22T18:22:05.386-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='dollar'/><category scheme='http://www.blogger.com/atom/ns#' term='gold'/><category scheme='http://www.blogger.com/atom/ns#' term='treasury'/><category scheme='http://www.blogger.com/atom/ns#' term='dividend'/><category scheme='http://www.blogger.com/atom/ns#' term='finance'/><category scheme='http://www.blogger.com/atom/ns#' term='bond'/><title type='text'>Correlations</title><content type='html'>Looks like the stock market broke down a bit and is hanging outside the previous trading range. I put together a script to calculate correlation coefficients to see where things stand. &lt;br /&gt;&lt;table style="border: solid 1px"&gt;&lt;tbody style="border: solid 1px"&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;spy&lt;/td&gt;&lt;td&gt;sdy&lt;/td&gt;&lt;td&gt;tlt&lt;/td&gt;&lt;td&gt;zroz&lt;/td&gt;&lt;td&gt;uup&lt;/td&gt;&lt;td&gt;gld&lt;/td&gt;&lt;td&gt;xle&lt;/td&gt;&lt;td&gt;xlf&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;spy&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;0.93&lt;/td&gt;&lt;td&gt;-0.68&lt;/td&gt;&lt;td&gt;-0.64&lt;/td&gt;&lt;td&gt;-0.34&lt;/td&gt;&lt;td&gt;-0.57&lt;/td&gt;&lt;td&gt;0.95&lt;/td&gt;&lt;td&gt;0.94&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;sdy&lt;/td&gt;&lt;td&gt;0.93&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;-0.41&lt;/td&gt;&lt;td&gt;-0.36&lt;/td&gt;&lt;td&gt;-0.15&lt;/td&gt;&lt;td&gt;-0.43&lt;/td&gt;&lt;td&gt;0.83&lt;/td&gt;&lt;td&gt;0.77&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;tlt&lt;/td&gt;&lt;td&gt;-0.68&lt;/td&gt;&lt;td&gt;-0.41&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;0.69&lt;/td&gt;&lt;td&gt;0.51&lt;/td&gt;&lt;td&gt;-0.77&lt;/td&gt;&lt;td&gt;-0.87&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;zroz&lt;/td&gt;&lt;td&gt;-0.64&lt;/td&gt;&lt;td&gt;-0.36&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;0.72&lt;/td&gt;&lt;td&gt;0.45&lt;/td&gt;&lt;td&gt;-0.75&lt;/td&gt;&lt;td&gt;-0.84&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;uup&lt;/td&gt;&lt;td&gt;-0.34&lt;/td&gt;&lt;td&gt;-0.15&lt;/td&gt;&lt;td&gt;0.69&lt;/td&gt;&lt;td&gt;0.72&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;-0.08&lt;/td&gt;&lt;td&gt;-0.53&lt;/td&gt;&lt;td&gt;-0.51&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;gld&lt;/td&gt;&lt;td&gt;-0.57&lt;/td&gt;&lt;td&gt;-0.43&lt;/td&gt;&lt;td&gt;0.51&lt;/td&gt;&lt;td&gt;0.45&lt;/td&gt;&lt;td&gt;-0.08&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;-0.42&lt;/td&gt;&lt;td&gt;-0.61&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;xle&lt;/td&gt;&lt;td&gt;0.95&lt;/td&gt;&lt;td&gt;0.83&lt;/td&gt;&lt;td&gt;-0.77&lt;/td&gt;&lt;td&gt;-0.75&lt;/td&gt;&lt;td&gt;-0.53&lt;/td&gt;&lt;td&gt;-0.42&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;0.95&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;xlf&lt;/td&gt;&lt;td&gt;0.94&lt;/td&gt;&lt;td&gt;0.77&lt;/td&gt;&lt;td&gt;-0.87&lt;/td&gt;&lt;td&gt;-0.84&lt;/td&gt;&lt;td&gt;-0.51&lt;/td&gt;&lt;td&gt;-0.61&lt;/td&gt;&lt;td&gt;0.95&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;The correlation coefficients are computed for the past 100-days of returns calculated from adjusted closing prices for each asset. There is a little something for everyone here. Equities (SPY) and dividend-paying equities (SDY) have strong correlations. Despite appreciating crude prices, energy stocks (XLE) are still strongly tied with equities as a whole. To get negative correlation with equities, one may look to treasuries (TLT and ZROZ [Pimco Long Dated Zeros]), the dollar, and gold. TLT and ZROZ similar but in terms of correlations with other assets, it happens to be TLT that exhibits the slightly more pronounced negative correlations despite ZROZ being more of a pure play. Surprisingly, the least correlated assets in this study are gold (GLD) and dollar (UUP). &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-6220144996485178622?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/6220144996485178622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/correlations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6220144996485178622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/6220144996485178622'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/correlations.html' title='Correlations'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1852223627120828963</id><published>2011-11-16T17:27:00.001-08:00</published><updated>2011-12-14T16:29:20.722-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='functional programming'/><category scheme='http://www.blogger.com/atom/ns#' term='ML'/><category scheme='http://www.blogger.com/atom/ns#' term='Python'/><category scheme='http://www.blogger.com/atom/ns#' term='Standard ML'/><category scheme='http://www.blogger.com/atom/ns#' term='concurrency'/><title type='text'>Programming Language Gotchas</title><content type='html'>&lt;p&gt;Looks like I spoke too soon. The October rally was looking a little long in tooth, and a little warning from the credit agencies was enough to get the market to go risk off at least for this afternoon. At least yields did not decline too much (2.01% for the 10-year according to MarketWatch). The Dollar Index (DX), however, has certainly been in an uptrend since the end of October trough.  &lt;/p&gt;&lt;p&gt;Coming from the Standard ML world of languages makes me take many things for granted. It also gives me a probably pretty narrow perspective. Hacking on my trading analysis tools in other languages helps me broaden that somewhat, though I have certainly worked in the mainstream languages long before I encountered ML and its brethren. I would like to keep a record of these gotchas as I encounter them. I do not intend this as value judgments but rather a documentation of noteworthy differences from a higher-order typed programming language perspective. &lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/11/programming-language-gotchas.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1852223627120828963?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1852223627120828963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/programming-language-gotchas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1852223627120828963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1852223627120828963'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/programming-language-gotchas.html' title='Programming Language Gotchas'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-4128722429879836543</id><published>2011-11-16T10:51:00.001-08:00</published><updated>2011-11-22T18:23:24.823-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stock market'/><category scheme='http://www.blogger.com/atom/ns#' term='statistics'/><category scheme='http://www.blogger.com/atom/ns#' term='trading'/><category scheme='http://www.blogger.com/atom/ns#' term='options'/><category scheme='http://www.blogger.com/atom/ns#' term='investment'/><category scheme='http://www.blogger.com/atom/ns#' term='option strategies'/><title type='text'>Cash Secured Puts</title><content type='html'>&lt;p&gt;Seeing that this morning was a benign CPI day with no earth-moving news from Europe, I thought that it would be an interesting exercise to look at a volatility-selling options strategy. The strategy is a fairly conservative one, cash secured put writing. My sample is the 341 component subset of the S&amp;P 500 with options activity today (i.e., there is are bids and asks). I will be only looking at the nearest to the money strikes to the last traded price of the underlying. The puts expire in less than 3 days (Friday, 11/19/11) so there really is not much time premium left. The returns are computed as put premium (midpoint of the bid and ask) over the strike times the 100 multiplier (i.e., the amount of cash needed in case of assignment). The VIX today (the last time I looked) remains elevated over 30. &lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-PnOSA6OHpa4/TsQPEM2M_-I/AAAAAAAABWE/kd_PAAPT1lg/s1600/putpremiums.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="240" width="320" src="http://3.bp.blogspot.com/-PnOSA6OHpa4/TsQPEM2M_-I/AAAAAAAABWE/kd_PAAPT1lg/s320/putpremiums.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt; The above is a histogram of the cash secured put returns. The horizontal axis marks the returns (put premium/ (100*strike)) and the vertical the number of securities that have that return. The median, mean, and standard deviation for the returns are 0.000675, 0.00101, and 0.00111 respectively. The max is 0.01 for TSS. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-4128722429879836543?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/4128722429879836543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/cash-secured-puts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4128722429879836543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4128722429879836543'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/cash-secured-puts.html' title='Cash Secured Puts'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-PnOSA6OHpa4/TsQPEM2M_-I/AAAAAAAABWE/kd_PAAPT1lg/s72-c/putpremiums.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-5956187075629432969</id><published>2011-11-15T14:45:00.001-08:00</published><updated>2011-11-22T18:36:15.579-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='web framework'/><category scheme='http://www.blogger.com/atom/ns#' term='scalability'/><category scheme='http://www.blogger.com/atom/ns#' term='latency'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><category scheme='http://www.blogger.com/atom/ns#' term='benchmark'/><title type='text'>Server Infrastructure</title><content type='html'>&lt;p&gt;Recently, I have been building a market data feed and order book simulator. Since I had already built an Ncurses front-end (console GUI) for Trader Workstation, this was the opportunity to try out something new. I decided to try out &lt;a href="http://liftweb.net/"&gt;Lift/web&lt;/a&gt;, Scala's web framework. Lift/web is a perfectly fine framework. The ORM side of things (&lt;a href="http://www.assembla.com/spaces/liftweb/wiki/Mapper"&gt;Mapper&lt;/a&gt; for RDBMS and &lt;a href="http://www.assembla.com/wiki/show/liftweb/Record"&gt;Record&lt;/a&gt; geared more towards NoSQL) still seem to be a work-in-progress (though a very usable work-in-progress), but Comet (Ajax-Push) works as advertised. In my experience, however, memory overhead seems to be a real issue. During development, Lift managed to gobble up all the default heap space after just a few source updates. None of the requests were large by any means. Apparently, there are a few configuration tweaks I still need to try to get this under control, but this whole episode got me thinking: with all the emphasis on massively scalable webapps (it seems everyone aspires to serve millions and billions of requests), why do most people tolerate the memory use profiles of Rails/Ruby, Python/Django, and PHP? &lt;/p&gt;&lt;p&gt;There are probably plenty of issues with &lt;a href="http://eigenclass.org/R2/writings/standalone-ocaml-webapps"&gt;this study on Oscigen&lt;/a&gt;, an OCaml-based web app framework, but it does seem to reflect the reality that there is a lot of inefficiency in modern web framework stacks. The above benchmark claims that under fairly benign circumstances, Oscigen outperforms Rails by 10x in terms of both requests/sec and reduced memory use (4.5MB versus 49MB). Oscigen's memory profile apparently ties with a simple C-based web app (using FastCGI). Interestingly, on the opposite end of the spectrum, there is also a C++-based web stack, &lt;a href="http://www.webtoolkit.eu/wt"&gt;Wt&lt;/a&gt;. Regardless of the merits of the benchmark, the fact is that people put up with a considerable amount of memory use. Considering that memory on Amazon EC2 is not exactly free, it does concern me. On one &lt;a href="http://bitnami.org/cloud-cost-calculator"&gt;web app hosting organization's site&lt;/a&gt;, Micro instances are only good for PHP apps whereas Small instances are needed for the lightest of Rails and Java apps. Large servers with 7.5GB RAM (which currently run from $244/month) are needed for "full-size" Rails and Java apps. Is the current state of things a case of memory and servers are too cheap or caching covers over all problems? There is always the red herring of network latency, but if concurrent requests served with constrained resources is the main metric then memory use matters.  &lt;/p&gt;&lt;p&gt;Or maybe it is because good garbage collectors are hard to come by. At least at one point, garbage collection was &lt;a href="http://blog.pluron.com/2008/01/ruby-on-rails-i.html"&gt;an issue&lt;/a&gt; in Ruby. This chain of thought led me to look up whether there are any good solutions for web stacks with low memory footprints, especially any that come in neat statically-typed packages. There is certainly &lt;a href="http://ocsigen.org/"&gt;Oscigen/OCaml&lt;/a&gt;. The StackOverflow people have also suggested Adam Chlipala's &lt;a href="http://www.impredicative.com/ur/"&gt;Ur/Web&lt;/a&gt; system. In the latter stack, after some searching through mail list archives, I have learned that Ur/Web uses region memory management (where the boundaries of a request delimits regions). The main website kept mentioning that Ur/Web is fast at least in part due to not having a garbage collector. That, of course, got me curious as to what did it use for memory management. Ur/Web also seems to be built on Standard ML (the Makefile has settings for both SML/NJ and MLton), which is certainly a plus according to my bias. Though explicit regions (aka memory pools [but careful, this is an overloaded term] or arenas) are pretty efficient (being part of Apache, nginx, PostgreSQL), region inference has its own issues, principally that programs written in a region-unfriendly fashion can lead to poor performance. The consensus on the matter appears to be that regions and garbage collection can be &lt;a href="http://dx.doi.org/10.1145%2F543552.512547"&gt;combined&lt;/a&gt; in a single system to address region-unfriendliness while simultaneously minimizing garbage collection.  &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-5956187075629432969?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/5956187075629432969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/server-infrastructure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5956187075629432969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/5956187075629432969'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/server-infrastructure.html' title='Server Infrastructure'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-1127251121210644493</id><published>2011-11-14T15:20:00.001-08:00</published><updated>2012-01-04T12:56:13.230-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AI'/><category scheme='http://www.blogger.com/atom/ns#' term='trading strategies'/><category scheme='http://www.blogger.com/atom/ns#' term='agent-based computational economics'/><category scheme='http://www.blogger.com/atom/ns#' term='automated trading'/><category scheme='http://www.blogger.com/atom/ns#' term='genetic programming'/><title type='text'>Genetic Programming Performance</title><content type='html'>&lt;p&gt;There is a whole lot of literature on the subject of genetic and evolutionary algorithms for trading strategies. The quality of the work seems to vary considerably. I have yet to discover the canonical and seminal lines of work in the field. Unlike in programming languages research and perhaps other scientific fields, the bibliographies do not all follow the same chain of citations. Or perhaps they do, but I have yet to discover it. More on this after the jump.&lt;/p&gt;&lt;a href="http://substructural.blogspot.com/2011/11/genetic-programming-performance.html#more"&gt;Read more »&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-1127251121210644493?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/1127251121210644493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/genetic-programming-performance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1127251121210644493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/1127251121210644493'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/genetic-programming-performance.html' title='Genetic Programming Performance'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-4043507853416365162</id><published>2011-11-11T13:01:00.000-08:00</published><updated>2012-01-04T12:54:36.186-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AI'/><category scheme='http://www.blogger.com/atom/ns#' term='trading strategies'/><category scheme='http://www.blogger.com/atom/ns#' term='agent-based computational economics'/><category scheme='http://www.blogger.com/atom/ns#' term='automated trading'/><category scheme='http://www.blogger.com/atom/ns#' term='genetic programming'/><title type='text'>Genetic Programming and Trading Strategies</title><content type='html'>&lt;p&gt;From an anecdotal sampling of Linkedin and web discussions, people have applied various machine learning techniques to the creation of trading strategies. The most popular techniques for trading strategies mirror that of the general applied machine learning community, meaning SVM and neural networks are frequently mentioned. One relatively lesser known technique is genetic programming (GP), a variant of genetic algorithms for tree data structures, normally abstract syntax trees. Curiously, the academic community has studied genetic programming quite a lot. Indeed, there are many papers on genetic programming for trade strategies in GECCO (a conference on genetic and evolutionary computation) and other conferences/workshops. Some people from State Street have even contributed &lt;a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=914198&amp;"&gt;their study&lt;/a&gt;. The Quant Stack Exchange has a &lt;a href="http://quant.stackexchange.com/questions/545/how-useful-is-the-genetic-algorithm-for-financial-market-forecasting"&gt;discussion on genetic algorithms&lt;/a&gt; where the problem of data snooping is frequently mentioned as a shortcoming, a problem addressed by regularization in conventional learning techniques. I informally survey some of the studies of the effectiveness of GP in a &lt;a href="http://substructural.blogspot.com/2011/11/genetic-programming-performance.html"&gt;follow-up post&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;My cursory interest in this area is the potential impact of programming language design and especially static type systems on the performance of genetic programming for trading strategies. The nice thing about genetic programming is that the results produced can be theoretically unrestricted unlike basic machine learning techniques that make assumptions such as linearity about the underlying model. Practically, however, the results produced by genetic programming are usually small and possibly uninteresting. This is where modern programming languages theory comes in. In the past decade or so, a number of researchers have studied the problem of the generation of random test cases (of which QuickCheck is a prime example). One of the main engineering challenges there is to ensure that the test cases generated do not all fall into a trivial category. The test cases here can range from instances of simple primitive types (e.g., ints) to nontrivial data structures (e.g., syntax trees or data packet queues). Usually it falls to the developer to write functions that generate a good distribution of test cases to ensure, for example, that the probability of getting a list of length greater than 3 is not negligible. In practice, QuickCheck supplies an assortment of combinators that help produce a good distribution. The developer's domain knowledge is still necessary, but the test generation problem reduces down to a choice of combinators.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-4043507853416365162?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/4043507853416365162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/genetic-programming-and-trading.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4043507853416365162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/4043507853416365162'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/genetic-programming-and-trading.html' title='Genetic Programming and Trading Strategies'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2740067176225782215.post-8306223322454818238</id><published>2011-11-07T09:31:00.000-08:00</published><updated>2011-12-08T16:07:46.249-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='C'/><category scheme='http://www.blogger.com/atom/ns#' term='closures'/><category scheme='http://www.blogger.com/atom/ns#' term='module system'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='nested classes'/><category scheme='http://www.blogger.com/atom/ns#' term='modularity'/><category scheme='http://www.blogger.com/atom/ns#' term='inner classes'/><category scheme='http://www.blogger.com/atom/ns#' term='OOP'/><category scheme='http://www.blogger.com/atom/ns#' term='C++'/><title type='text'>Semantics of Nested Classes</title><content type='html'>Although nested classes are widely adopted in many popular programming languages (e.g., C++, C#, Java, Python, Ruby), I have yet to see a good treatment giving the motivation, use cases, and architectural issues associated with the feature. Moreover, another undocumented aspect is how the semantics of nested classes vary from language to language. They appear to be useful for namespace management (though C++ namespace and Java packages also cover this), &lt;a href="http://en.wikipedia.org/wiki/Closure_(computer_science)#Anonymous_inner-classes_.28Java.29"&gt;simulating closures&lt;/a&gt;, and callbacks for GUIs and event handling (basically a variant of closure simulation).&lt;br /&gt;First thing is first, what are nested classes? &lt;br /&gt;&lt;pre class="brush:c++"&gt;class A {&lt;br /&gt;  class B { }&lt;br /&gt;}&lt;/pre&gt;In essence, they are scoped type declarations and definitions. Instead of defining a class B at the top-level of the program source, one declares a locally scoped one within the definition of another class, A in this case. One immediate consequence of this is a form of namespace management for user-defined aggregate types (i.e., classes). &lt;br /&gt;There are a lot of gotchas due the language design here. The scoping discipline is incomplete. C/C++'s restriction on shadowing prohibits the following code:&lt;br /&gt;&lt;pre class="brush:c++"&gt; &lt;br /&gt;class B; &lt;br /&gt;&lt;br /&gt;class A {&lt;br /&gt;  B something;&lt;br /&gt;  class B { };&lt;br /&gt;}  &lt;/pre&gt;In contrast, the following code compiles:&lt;br /&gt;&lt;pre class="brush:c++"&gt;class A {&lt;br /&gt;  private:&lt;br /&gt;    class B {};&lt;br /&gt;  public:&lt;br /&gt;    B makeB();&lt;br /&gt;}&lt;/pre&gt;Despite the fact that A::B is unnameable outside an instance of A, A exports the member function makeB which yields a value of type A::B. Though one cannot name the return value of makeB outside of A, the value can still be used as is in the case in the following:&lt;br /&gt;&lt;pre class="brush:c++"&gt;class A {&lt;br /&gt;  private:&lt;br /&gt;    class B { &lt;br /&gt;      int x;&lt;br /&gt;       public: &lt;br /&gt;      B add(B _x) { x += _x; }&lt;br /&gt;    };&lt;br /&gt;  public:&lt;br /&gt;    B makeB();&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;int f() {&lt;br /&gt;  A a0, a1;&lt;br /&gt;  a0.makeB().add(a1.makeB());&lt;br /&gt;}&lt;/pre&gt;The above illustrates an important point. C++ nested classes do not declare distinct types for each instance. Although one cannot annotate them as static, they are exactly that. In the example, a0.B and a1.B are of the same type. This is why a0.makeB().add(a1.makeB()) type checks. This means that writing a nested class is equivalent to lifting that class definition out to the top-level and selectively hiding the name of the nested class.  &lt;br /&gt;Between different languages, there is a design chasm. In C++, there is only the unitary nested class and its associated semantics. Java distinguishes between static nested classes (similar to the C++ nested class) and inner classes. Java actually has a number of variants of nested classes (&lt;a href="https://blogs.oracle.com/darcy/entry/nested_inner_member_and_top"&gt;https://blogs.oracle.com/darcy/entry/nested_inner_member_and_top&lt;/a&gt;). The above C++ example translated into Java fails type checking because of A.B is private. &lt;pre class="brush:java"&gt;class A {&lt;br /&gt;      private class B {&lt;br /&gt;&lt;br /&gt;        public B add(B rhs) { val += rhs.val; return this; }&lt;br /&gt;        private int val;&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public B makeB() { return new B(); };&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class Nested0 {&lt;br /&gt;&lt;br /&gt;   public static void main() {&lt;br /&gt;     A a0 = new A();&lt;br /&gt;     A a1 = new A();&lt;br /&gt;     a0.makeB().add(a1.makeB());&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;The call to add is flagged as a problem because a0.makeB()'s type (i.e., A.B) is inaccessible. If A.B were public or protected, however, the type checker is satisfied despite a0.B and a1.B supposedly denoting two distinct inner classes. Thus, at least at this point, inner classes do not provide abstract types in the sense of generative types.&lt;/p&gt;&lt;p&gt;On the other hand, as this &lt;a href="http://www.theserverside.com/news/1363881/The-Working-Developers-Guide-to-Java-Bytecode"&gt;discussion&lt;/a&gt; on Java decompilation (javap) shows, the semantics of inner classes are such that have a kind of C++ &lt;pre&gt;friend&lt;/pre&gt; relationship with their outer enclosing class. The discussion on TheServerSide shows how this is implemented: the compiler generates a static method that "breaks the encapsulation wall" to permit accessing private members of the outer class.  &lt;/p&gt;&lt;h3&gt;References&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;Herb Sutter wrote an article on &lt;a href="http://www.gotw.ca/gotw/058.htm"&gt;nested classes in C++&lt;/a&gt;.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2740067176225782215-8306223322454818238?l=substructural.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://substructural.blogspot.com/feeds/8306223322454818238/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://substructural.blogspot.com/2011/11/semantics-of-nested-classes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8306223322454818238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2740067176225782215/posts/default/8306223322454818238'/><link rel='alternate' type='text/html' href='http://substructural.blogspot.com/2011/11/semantics-of-nested-classes.html' title='Semantics of Nested Classes'/><author><name>George</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
