Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.textile
djia-load.pl
gold-load.pl
prices.db
prices.sql
utils.pl

README.textile

The Ratio between the Dow Jones Industrial Average and Gold Prices

Historically, this seems to be a good indicator for exiting out of the gold market. When the ratio gets dangerously close to 1, that’s when you can maximize your profit by selling your gold. We seem to be getting close to that time, now. As of May 2010, the ratio has been hovering around 9.3.

Data Sources

Historical Dow Jones Data

http://finance.yahoo.com/q/hp?s=^DJI

Download the CSV version.

Load it into the database using djia-load.pl.

Historical Gold Data

http://www.research.gold.org/prices/

Download the daily gold price Excel spreadsheet

Load it into the database using gold-load.pl

Useful Queries

For the lazy and impatient ones, I checked in the SQLite database so that you can have some fun with queries right away.

DJIA vs Gold Ratio

    SELECT g.value as gold, 
           d.value as djia, 
           (d.value / g.value) as ratio,
           d.day 
      FROM price g, price d 
     WHERE d.day = g.day 
       AND g.symbol = 'XAU' and d.symbol = 'DJIA'
     ORDER BY d.day;

Monthly from 2000 to Now

    SELECT g.value as gold, 
           d.value as djia, 
           (d.value / g.value) as ratio,
           d.day 
      FROM price g, price d 
     WHERE d.day = g.day 
       AND g.symbol = 'XAU' and d.symbol = 'DJIA'
       AND d.day in (
            SELECT day 
              FROM (SELECT min(day) as day, 
                           strftime('%Y', day) as y, 
                           strftime('%m', day) as m, 
                           min(strftime('%d', day)) as d 
                      FROM price 
                     WHERE day > '1999-12-31' group by y, m))
     ORDER BY d.day;