A friend recently made a prediction about the price of oil for the next three months. I thought I would perform some time series forecasting on the West Texas Intermediate prices and see if his numbers were reasonable from a dumb-numbers canned-forecasting perspective. I’m not making the claim that one can reasonably and accurately forecast oil prices with traditional time series techniques. (That’s bogus.) I’m simply doing this to learn more about forecasting.
Monthly petroleum prices can be found at the Energy Information Administration. Ever relevant, Wikipedia has a great write-up on recent trends in oil prices. Also, there is this Times article on the spike and drop in 2008 which had this apt summary,
[Oil prices are] the product of an extremely volatile mixture of speculation, oil production, weather, government policies, the global economy, the number of miles the average American is driving in any given week and so on. But the daily price is actually set — or discovered, in economic parlance — on the futures exchange.
In this post I’ll provide some code for parsing an .eml file and extracting images. I was able to perfrom the parsing with the help of a great blog post I found here. Turning the blocks of ASCII letters back into JPEGs and PNGs took some work.
In this post I’ll discuss compound Poisson processes, which I read about in the final chapter of Hassett and Stewart’s Probability for Risk Management last night. These model a stochastic process where at regular intervals (months, quarters, etc.) some number of events occur according to a Poisson process with rate , and the intensity of each event is determined independently by another other distribution.
In this post I’ll cover testing with unittest and nose. A really good overview of testing and testing tools is provided at the Hitchhiker’s Guide to Python.
In this post, I’ll discuss some lessons learned from BASH programming, in particular, how to pass return values from BASH’s “functions”. BASH does not provide support scoped variables by default, so variables declared in a function are available everywhere once the function has been called. BASH will let you declare local variables within a function through the local keyword. Returning values is then a matter of echoing them out.
In this post I’ll look at how you would monitor a process on a system in a BASH script. In particular, we’ll consider the case where we want to determine if a file is done uploading via scp. If you have lsof or fuser installed on your system, this is not difficult, but you can’t always count on these tools being installed.
This morning I installed, compiled, and ran a simple example program using the GNU Scientific Library. This took me a while to figure out, so I’ll share the process here. I am assuming that the reader, like the author, has only vague familiarity with C.
In this post I’ll talk about how to set up your Scipy stack on a Mac, and make some recommendations for other tools: Homebrew for general package management, iTerm2 for a terminal, Solarized for a text editing color scheme, and pathogen for vim package management.
In this post, I’ll describe a technique for determining whether the mean of two sets are significantly different. In a previous post I demonstrated how to perform the standard statistical tests using R. Randomization tests are convenient when you can’t say anything about the normality or homoscedasticity (constant variance) of the population, and/or you don’t have access to a truly random sample.