I have been paying around with the R package twitteR. It is an R interface to the Twitter web API. I used it to search for the 1000 latest tweets containing $TSLA (Tesla's stock ticker). I then removed tweets from outside North America, geolocated them, and plotted them on a map. The map is below.
As we would expect, most tweets are from urban areas -- particularly from Washington D.C to Boston, Florida, and California. Surprisingly there is only one tweet from Seattle, but quite a few from Atlanta. Also, there are many more tweets from the southern states compared to the upper midwest.
When I get a chance (hopefully soon), I'll post the code/packages I used to create the map.
Here is a spreadsheet I created to test the effect of various stock prices and market caps on price and value weighted indices. You should create a similar spreadsheet (though formatted better -- the first sheet should be a summary with a description of what you are doing and the important results, i.e. the correlations). You can also add in interesting charts and possibly an equally-weighted index.
Note, by pressing 'F9' you'll recalculate the '=RAND()' functions, which will give you entirely new correlations. You could hit 'F9' many times, recording the resulting correlations, and get a Monte Carlo estimate of the correlation distributions. A macro may be effective in doing this.
I have posted a new working paper of mine to the 'Working Paper' section. The paper, Parameter Variation & the Components of Natural Gas Price Volatility, hypothesizes that parameters linking natural gas returns to fundamental variables will tend to change as market participants learn. I therefore estimate the parameters using the Kalman filter. I also decompose conditional natural gas volatility into portions attributable to each variable. The abstract is below.
Estimating a static coefficient for a deseasoned gas storage or
weather variable implicitly assumes that market participants react
identically throughout the year (and over each year) to that variable.
In this analysis we model natural gas returns as a linear function of
gas storage and weather variables, and we allow the coefficients of this
function to vary continuously over time. This formulation takes into
account that market participants continuously try to improve their
forecasts of market prices, and this likely means they continuously
change the scale of their reaction to changes in underlying variables.
We use this model to also calculate conditional natural gas volatility
and the proportion of volatility attributable to each factor. We find
that return volatility is higher in the winter, and this increase is at-
tributable to increases in the proportion of volatility due to weather
and natural gas storage. We provide time series estimates of the chang-
ing proportion of volatility attributable to each factor, which is useful
for hedging and derivatives trading in natural gas markets.
I posted my first Shiny App to RStudio's shinyapps.io hosting site. It is a simple app which shows the various cash flow and IRR scenarios for a hypothetical Synthetic CDO. You can check it out here:
I wasn't able to deploy the app with my Debian Sid system, but I was able to deploy it from my Arch Linux box (+1 for Arch).
My EIAdata R package is now available on CRAN. This means you can install the package with a simple,
install.packages("EIAdata") from within R.
A development version of the package is available on GitHub. This package gives you programmatic access, from within R, to over a million energy related time series available through the Energy Information Administration's API.
The spread has declined to $0.21. This shows market participants have a great amount of confidence that gas storage amounts will be sufficient to cover winter demand.