quandl blog Menu
Francis Smart

Francis Smart

Rambling rogue researcher Francis Smart is a PhD student of econometrics and psychometrics with a focus on simulation methods. He has degrees in Economics (BS) and Applied Economics (MA) from Montana State University and is studying Measurement and Quantitative Methods at Michigan State University. Currently living in Mozambique, he has happily traded reliable internet for year round sun.

Francis' blog can be found at: http://www.EconometricsbySimulation.com/

Permalink:

Investigating the relationship between gold and bitcoin prices with R.

Reine by Ennio Pozzetti

Image by Ennio Pozzetti

 
In this post I will explore some of the movements in markets in recent years, these movements have caught many by surprise resulting in some people unexpectedly striking it rich while others have lost a great deal. I am no financial advisor, nor do I have a background in financial analysis, so please take everything with a grain of salt. If anything is true about financial markets, they are inherently unpredictable.

I will investigate the relationship between the price of gold and the price of bitstamps, with two competing hypothesizes. One hypothesis is that both goods represent investments that people seek because they are “safe” and “risk minimal”. The mantra “gold always has value” and “bit money does not rely upon government support” both seem to imply this. If this is true then both markets will move together. When the total economy seems uncertain, both will gain in price. When the economy does well, both will lose value as investors shift from safe investments to investments that provide higher expected return. An alternative hypothesis investigated here is that they are seen as competing investments. Thus when the price of gold goes down investors will move into bit currency which will drive the price of bit currency up. Likewise, if the price of bit coins goes down investors will shift to gold which will drive the price of gold up.
Continue reading…

  • Christian

    Sorry, I didn’t expect my reply to lose the formatting. In short, here are the plots: http://tinypic.com/r/2jbwr2w/8 and http://tinypic.com/r/2h38m07/8. Here is the code with output: http://pastebin.com/8mPLHvv4

  • JorgeStolfi

    Dear Francis,
    (1) it is not clear whether the “price variations” are pecentual or in USD. IN teh second case you will have the same problem as in the first plot: data before Apr/2013 will eb swamped by the data after that.

    (2) your interpretation of p seems reversed, I think that there is 10 in 11 chances of finding a correlation of 0.3% or greater between two variables that are in fact uncorrleated.

    (3) The BTC price history after Apr/2013 was defined entirely by the opening of the Chiense market (which is almost entirely day trading, not long-term) and the Chinese government restrictions to bitcoin trade. Those events are not related to the perceived value of BTC as a safe stroe of value, so any correlation with the gold prices is bound to be accidental.

  • •••
  • Thanks for leaving a comment, please keep it clean. HTML allowed is strong, code and a href.
Eran Raviv

Eran Raviv

Eran holds a BA in Economics from Ben-Gurion University, two MSc degrees: in Applied Statistics from Tel-Aviv University and in Quantitative Finance from Erasmus University, and a Ph.D in Econometrics from Erasmus University. His research interests focus on applied forecasting, dimension reduction, shrinkage techniques and data mining. Eran currently holds a Quantitative Analyst position with the Economics and Financial Markets team at the pension fund APG Asset-Management in Amsterdam, Netherlands.

Eran's blog can be found at: http://eranraviv.com/category/blog

Permalink:

Using R to model the classic 60/40 investing rule

Treelife by Timothy Poulton

Image by Timothy Poulton

 
A long-standing paradigm among savers and investors is to favor a mixture of 40% bonds and 60% equities. The simple rationale is that stocks will provide greater returns while bonds will serve as a diversifier when if equities fall. If you are saving for your pension, you probably heard this story before, but do you believe it?

At least in part, this makes sense. Stocks are more volatile and thus should yield more as compensation. Regarding diversification, we can take a stab at it and try to model the correlation between stocks and bonds, but for now let’s assume it holds that bonds will ‘defend’ us during crisis. Today we zoom in on the pain this 60/40 mixture can cause you over the years, and compare it to other alternatives. We use numbers from the last two decades to show that you may want to reconsider this common paradigm.

Continue reading…

  • Prestone Adie

    Aydin,
    please insert the following lines after the library(“quandl”) line
    library(“ggplot2) #ggplot
    library(“xts”) #xts
    library(“quantmod”) #yearlyReturn

    the functions shown after the library calls require the libraries to be loaded.

  • Prestone Adie

    Aydin,
    register on the Quandl website and under your account tab, look for the Authentication token and insert it as indicated on Eran’s code.
    Furthermore, you need to install and load the following libraries: ggplot2,xts, quantmod.
    I hope this helps.

  • •••
  • Thanks for leaving a comment, please keep it clean. HTML allowed is strong, code and a href.
Tammer Kamel

Tammer Kamel

Foot soldier for the open data movement; founder of Quandl.

Permalink:

Quandl Open Data

Synopsis: This is, we think, the best source of historical stock price data on the internet because it is accurate, complete and 100% open.

We added a new source to the site today called Quandl Open Data. We launched it with historical daily stock price data for 500 of the largest US stocks, but we hope to get that number to 4000 this month. This new “source” on Quandl is significant for four reasons.

1 – The Data is Better

This price data is better than anything we have had before (and anything we know of elsewhere on the internet) because it includes dividends, splits and adjustments in one dataset. We calculate adjustments using the CRSP methodology, but the raw dividend and split information empowers any other adjustment methodology you may wish to employ. We update the data as quickly as we can each day.

2 – The Data is Original

Most data on Quandl is sourced from elsewhere on the internet (which we do with zealous transparency.) This new data source is different because it is “original”; the data is manufactured by us and Quandl users. The definitive version of the data actually lives on Quandl and not elsewhere. (This is a first for us.)

3 – The Data is Open

Note our terms of use for this data:

You may copy, distribute, disseminate or include the data in other products for commercial and/or noncommercial purposes. There are no restrictions whatsoever on the use of this data.

Thus we now provide the internet’s first and only totally unencumbered source of historical stock price data.

4 – It’s a Wiki

Quandl Open Data has been assigned the source code “WIKI” for good reason: this data is and will be maintained by our community. We are very excited about this project which is currently being spearheaded by us and a small set of Quandl users. We are inspired of course by Wikipedia: We want nothing less than to permanently place as much financial information as possible into the public domain with absolutely no restrictions on its use.

This project is just getting started. Our thanks to everyone who helped by contributing backfill and helping to clean. There is much more work to be done on this front. The next step is to expand coverage to more stocks. We will eventually open this process up to the entire Quandl community. In the interim it only takes an email to me to get involved right now.

  • •••
  • Thanks for leaving a comment, please keep it clean. HTML allowed is strong, code and a href.
Sean Crawford

Sean Crawford

Empowering people by improving the accessibility of data.

Permalink:

Quandl R tutorial now on DataCamp

shield-quandl

There is now an excellent tutorial on using Quandl via R at DataCamp.com. Datacamp offers really well designed (and free) in-browser tutorials for learning more effective data analysis. Their focus thus far has been on R.

The free interactive Quandl course introduces you to the main functionality in the Quandl R package. In two short chapters you’ll learn how to search through Quandl’s data sets, how to access them, and how you can easily manipulate them for your own purposes. All exercises are based on real-life examples (e.g. Bitcoin exchange rates).

Datacamp is quite impressive; definitely worth a visit!

  • Thanks for leaving a comment, please keep it clean. HTML allowed is strong, code and a href.
Quandl Team

Quandl Team

Striving to make numerical data easy to find and easy to use.

Permalink:

Superset URLs Have Changed

If you use supersets on Quandl, please note that the URLs for your supersets have changed.  Instead of existing under www.quandl.com/USER_XX, they now exist under new source which is your exact username on Quandl.

Taking myself as an example, my superset used to exist at:

www.quandl.com/USER_YY/6KY

but it now exists at

www.quandl.com/TAMMER1/6KY

If you are accessing your supersets by API, you need to be aware of this change.

If you have any questions or problems, just drop us a line connect@quandl.com

  • Adam Sussman

    Can you create a superset using the API?

  • Thanks for leaving a comment, please keep it clean. HTML allowed is strong, code and a href.
Sean Crawford

Sean Crawford

Empowering people by improving the accessibility of data.

Permalink:

DataHero Partners with Quandl

DataheroQuandl

Quandl is proud to announce a new partnership with data visualization and analytics service DataHero.  Now new users looking to better understand DataHero’s functionality will be able to begin their exploring through a selection of sample datasets by Quandl. After signing into the service you will be able to choose from a variety of datasets and import them in a single click. Once loaded you’ll be able to easily create dynamic charts of real estate data, commodities markets, or even your favorite football team! Then you can easily segment and filter your charts, or go deeper with drag-and-drop cohort analysis.

Continue reading…

  • Thanks for leaving a comment, please keep it clean. HTML allowed is strong, code and a href.