Excel operations in SQL: 40 examples

Excel is a great tool. I love it. But let’s say you want to play with lots of data from lots of different files, and you want to do a lot of operations on that data. Or maybe you need to maintain data that is being entered and updated from many different sources and in […]

Commodity trade analysis with comtradr in R

I have already introduced various interfaces in R and Python for querying data directly from within a script. Examples covered by me inlcuded the OECD database and its interface in R, i.e. the OECD package in R. I also e.g. covered twitteR, Google trends and the EUROSTAT R-package. In this post I will use another package: comtradr. […]

Picking efficient freight portfolio in Python

In previous posts I have demonstrated how you can query stock price data with e.g. pandas_datareader in Python. In this post I will present an algorithm with which you can construct an efficient portfolio based on any set of stocks that you might be considering. The algorithm will determine the optimal share of each stock […]

UPS FedEx stock analysis in pandas_datareader

I have already demonstrated how you can retrieve e.g. GDP data from FRED using pandas_datareader in Python. I have also analyzed stock prices for Procter & Gamble using Yahoo Finance as a source and pulling the data via pandas_datareader. In this post I want to analyze daily stock returns, for UPS and FedEx. I will […]

Pandas datareader for FRED GDP data

In other posts I have demonstrated how to use the quandl module in Python for retrieving equity or stock prices. I also showed how to query stock prices from Yahoo, using pandas_datareader in Python. I also demonstrated OECD and FRED interfaces in R and Python, in the form of packages and modules. In this post […]