R Language

Predictability of kurtosis and skewness in S&P constituents

October 3, 2011 | Pat

How much predictability is there for these higher moments? Data The data consist of daily returns from the start of 2007 through mid 2011 for almost all of the S&P 500 constituents. Estimates were made over each half year of data.  Hence there are 8 pairs of estimates where one estimate immediately follows ... [Read more...]

Time series equivalence of brains and markets

September 27, 2011 | Pat

fMRI data from 90 locations in the brain look somewhat like daily closing prices on 116 stocks if you squint just right. Marginal Revolution was nice enough to point to “Topological isomorphisms of human brain and financial market networks”. I’ve only just glanced through the paper.  I find it interesting, but ... [Read more...]

Beta and expected returns

September 16, 2011 | Pat

Some pictures to explore the reality of the theory that stocks with higher beta should have higher expected returns. Figure 2 of “The effect of beta equal 1″ shows the return-beta relationship as downward sloping.  That’s a sample of size 1.  In this post we add six more datapoints. Data The exact ... [Read more...]

Solve your R problems

September 12, 2011 | Pat

  download ‘The R Inferno’ Epilogue I’m not a lawyer, but here is my understanding of the rules should you want to extract images from this page: Most of the images are from istockphoto.com. You would need to pay for each image that you want to use. It is ...
[Read more...]

A brief history of S&P 500 beta

September 8, 2011 | Pat

Data The data are daily returns starting at the beginning of 2007.  There are 477 stocks for which there is full and seemingly reliable data. Estimation The betas are all estimated on one year of data. The times that identify the betas mark the point at which the estimate would become available.  ... [Read more...]

Review of “Risk and Meaning” by Nicolas Bouleau

September 5, 2011 | Pat

The subtitle is: Adversaries in Art, Science and Philosophy. Executive Summary Genius or madness? I haven’t decided. Irreversibility of interpretation The book drives home that once we decide how something is we can’t go back to our state of innocence. Figures 1 through 3 exhibit this idea via a randomly ... [Read more...]

Realized beta and beta equal 1

August 30, 2011 | Pat

What does beta look like in the out-of-sample period for the portfolios generated to have beta equal to 1? In the comments Ian Priest wonders if the results in “The effect of beta equal 1″ are due to a shift in beta from the estimation period to the out-of-sample period.  (The current ... [Read more...]

The effect of beta equal 1

August 29, 2011 | Pat

Investment Performance Guy had a post about beta equal 1.  It made me wonder about the properties of portfolios with beta equal 1.  When I looked, I got a bigger answer than I expected. Data I have some S&P 500 data lying about from the post ‘On “Stock correlation has been rising”‘.  ... [Read more...]

Things I learned at useR!2011

August 25, 2011 | Pat

The title says “things” but conferences are mainly about people. Some of it can be serendipitous.  For example, one day I sat next to Jonathan Rougier at lunch because I had a question for him about climate models.  When Jonathan left, I started a conversation with the person on my ... [Read more...]

Random input software testing

August 23, 2011 | Pat

The usual approach to testing software is to create a specific problem and see if the software gets the correct answer.  Although this is very useful, there are problems with it: It is labor-intensive It almost totally neglects to test the code that throws errors There can be unconscious bias ...
[Read more...]

A view of useR!2011

August 22, 2011 | Pat

Start Brian Ripley The conference was opened with a talk by Brian Ripley.  I’ll distort his talk into 3 points that came across to me. 1. R Core is finite The time available from R Core members is a strictly limited good.  The more that is pushed onto R Core, the ...
[Read more...]

Statistical construction error

August 20, 2011 | Pat

Yes, the title is meant to have two readings. The effect The Numbers Guy, among other examples, talks about the UK Office for National Statistics needing to revise its estimate for the construction sector output because of an error. Original: 2.3% growth Corrected: 0.5% growth Here is the Telegraph article cited by ...
[Read more...]

The indices understate the carnage

August 9, 2011 | Pat

The first 6 trading days of August have been bad for the major indices, but how variable is that across portfolios? To answer that, two sets of random portfolios were generated from the constituents of the S&P 500.  The trading days are 2011 August 1 — 5 and 8. The returns of the indices for … Continue ... [Read more...]

Trading volume forecast for an illiquid stock

August 8, 2011 | Dzidorius Martinaitis

When dealing with transaction cost analysis, a stock’s volume is assumed to be stable or foreseeable.  However, there is different picture, then we are dealing with an illiquid stock. It is relatively easy to forecast the volume of a liquid stock, because trading volume has high autocorrelation – the volumes ... [Read more...]

More S&P 500 correlation

July 28, 2011 | Pat

Here are some additions to the previous post on S&P 500 correlation. Correlation distribution Before we only looked at mean correlations.  However, it is possible to see more of the distribution than just the mean.  Figures 1 and 2 show several quantiles: 10%, 25%, 50%, 75%, 90%. Figure 1: Quantiles of 50-day rolling correlation of … Continue reading → [Read more...]

How big block trades affect stock market prices?

July 27, 2011 | Dzidorius Martinaitis

I will be giving a presentation on “Optimal transaction cost” in Vilnius on  16  August. While preparing the presentation and looking for an optimal execution solution, a natural question arises: does the size of the trade affect stock market price? I’m sure, you would say 100 % yes. Well, you would be ... [Read more...]

Registration closing for UseR! 2011

July 18, 2011 | Pat

Friday July 22 is the last day on which you can register for UseR! 2011 at the University of Warwick.  The conference will be 2011 August 16-18. You can peruse the book of abstracts and view the draft schedule. I am scheduled to give a talk on “Random input testing with R”.  The ...
[Read more...]

On “Stock correlation has been rising”

July 17, 2011 | Pat

Ticker Sense posted about the mean correlation of the S&P 500. The plot there — similar to Figure 1 — shows that correlation has been on the rise after a low in February. Figure 1: Mean 50-day rolling correlation of S&P 500 constituents to the index. For me, this post raised a whole lot ... [Read more...]

Plotting git statistics

July 13, 2011 | Dzidorius Martinaitis

Here’s a funny story – friend of my, avid gamer at that time, was going downhill on a bicycle when wonderful idea flashed his mind: I need to save the current status… Just in case if I crash, I will start again from the top of the hill. If you ... [Read more...]

Testing an S&P 500 prediction

July 10, 2011 | Pat

If a particular prediction comes true, how surprised should we be? The prediction The page that sparked my curiosity tells of a prediction made a year ago that the S&P 500 would beat its historic high by the end of 2011.  It says that at the point the prediction was made, ... [Read more...]
1 4 5 6 7 8 10

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)