Financial Modeling for Real

How to Debunk the Myths of
Finance and Economics
Using R Code

The Efficient Market Hypothesis (EMH) lies at the heart of finance and economics. According to the entrenched doctrine, the real and financial markets are so efficient that they absorb every nub of information with perfect wisdom and adjust the price of every asset forthwith. In response to each flash of news, the updates occur so abruptly that no single actor can exploit the dispatch with any measure of confidence or prowess.

One outgrowth of the EMH is the Random Walk Model that pictures the path of the market as a thoroughly erratic process. If all the clues have already been baked into the current valuation of each asset, then the next shift in price has to come as a complete surprise.

Sad to say, but this caricature of the real and financial markets belies the actual behavior of the participants along with the assets. A testament to the fallacy shows up in the subtle but persistent waves in the stock market throughout the year.

From a formal stance, the EMH corresponds to a couple of models that are dubbed here as the Idle and Drift templates. By contrast, a pliant portrait of seasonal patterns is evinced by the Sway Model.

The triplex of frameworks is assessed against the record of the stock market spanning 69 years starting from the onset of 1950. The raw data consist of monthly readings of the S&P Index, the leading barometer of the bourse among professionals ranging from fund managers to academic researchers.

To underscore the gulf between the theory and reality, the case study employs only a minute fraction of the wealth of information freely available to all comers at the top resource favored by the investing public. Moreover, the quantitative assay relies solely on the most basic of statistical tools; namely, the binomial test that is highly robust by dint of its simplicity. From a computational stance, the attendant code invokes just a tiny subset of the plethora of functions built into the core module of the R system: the leading choice of programming language and software platform for data science in the context of scientific research as well as pragmatic inquest.

Based on the Idle Model, the market should move about as often in the upward direction as the downward heading. However, a binomial probe using hard data rejects the bland model of equal odds at a highly significant level. Put another way, the Idle mockup is grossly inconsistent with the reality of the marketplace.

By contrast, the Sway Model does a laudable job of balancing the odds of an uprise versus a downstroke of the market. More precisely, the fraction of positive moves is 0.493 thus lying close to the expected value of 0.500. In this way, the seasonal template bisects the prospects of rising and falling with a great deal of verism. From a formal stance, the cyclic framework conforms to the null hypothesis of equal odds against a two-sided test of the alternative premise.

The foregoing results focus on the direction of motion. Each assay is inherently a binary affair dealing with a shift of the market to the upside or downside while ignoring the extent of the traverse.

A different way to compare the candidate models involves the size of the errors that ensue. In this context, one template outperforms another if the magnitude of the lapses on average happens to fall below its rival’s. By this measure, the Drift Model trounces the Idle version at a high level of statistical significance. Better yet, the Sway framework outshines both of the Efficient mockups.

For starters, the seasonal model bests the Idle icon in 55.7% of the cases at a staunch level of statistical heft. In particular, the p-value of 0.0006081 falls decidedly below the usual boundary of 0.05 that marks the threshold of significance.

Moreover, the Sway motif outranks the Drift version as well. The former beats the latter in 53.9% of the cases and proves its edge with a p-value of 0.01425.

In these and other ways, the limber model of seasonal waves disproves the dogma of efficiency at ample levels of statistical grit. The upshot is to roundly upend the dominant school of finance and economics.

From a larger stance, this guidebook fulfills a medley of objectives. A broad-based goal is to dispel the gospel that proclaims the markets to be so efficient as to absorb every shard of information with perfect wisdom, thus leaving no further tip for foretelling the market. By this argument, the price of every asset is deemed to move in a purely flighty and aimless fashion.

A second and pragmatic goal is to devise an honest profile of the temporal patterns in the stock market. The factual template serves to debunk the myth of randomness that hampers the mass of practitioners and observers ranging from investors and analysts to academics and policymakers.

A third aim is to present a tutorial for harnessing the R system to make sense of a thorny and quaggy domain. In the process, a tiny subset of the basic functions built into the software platform is enough to answer cryptic questions of great consequence in theory as well as practice.

A fourth target deals with the power of an elementary tool in statistics for grasping a knotty system in the form of the stock market. The latter complex has long thwarted—and continues to stymie—myriads of actors ranging from solo investors and communal pools to academic researchers and public officials. Remarkably, though, the plainest technique in the toolkit of hypothesis testing yields decisive results at high levels of statistical clout in plumbing a murky domain of the utmost complexity.

NOTE:  The publication is an ebook under the title of “Financial Modeling for Real”. The guidebook is available in PDF mode at MintKit Library.

*       *       *