Difference between revisions of "Dow Jones Industrial Average"

From Geohashing
imported>Zigdon
(irc.peeron.com)
(geo.crox.net (recommended))
 
(41 intermediate revisions by 24 users not shown)
Line 1: Line 1:
The '''Dow Jones Industrial Average''' is a well known indicator of the overall health of the economy calculated using the current value of a variety of stocks along with the 'Dow Divisor'. The opening value of the Dow Jones Industrial Average is used as an entropy source in [[Algorithm|the Geohashing algorithm]].
+
The '''Dow Jones Industrial Average''' is a well known indicator of the overall health of the economy calculated using the current value of a variety of stocks along with a periodically adjusted [http://en.wikipedia.org/wiki/DJIA_divisor divisor]. The opening value of the Dow Jones Industrial Average is used as an entropy source in [[Algorithm|the Geohashing algorithm]].
  
 
If you're programming a geohashing calculator, mapping service or other [[implementation]], you'll need a source for the current and historic DJIA value. This page lists known sources and ways to access them and access restrictions.
 
If you're programming a geohashing calculator, mapping service or other [[implementation]], you'll need a source for the current and historic DJIA value. This page lists known sources and ways to access them and access restrictions.
  
== Conventions ==
+
== The Internet ==
  
In the following descriptions, tokens will be used in URLs to represent values of the date as specified by the PHP [http://us2.php.net/strftime strftime() function]. Specifically:
+
=== Conventions ===
  
* '''%Y''' is the four digit year (Eg, 1990)
+
In the following descriptions, tokens will be used in URLs to represent values of the date as specified by the [http://www.opengroup.org/onlinepubs/009695399/functions/strftime.html strftime() function] found in many languages. Specifically:
* '''%m''' is the two digit month number (Eg, 03)
 
* '''%d''' is the two digit day number (Eg, 14)
 
  
== irc.peeron.com ==
+
* '''%Y''' is the year (e.g. 1990)
 +
* '''%m''' is the two digit month number (e.g. 03)
 +
* '''%d''' is the two digit day number (e.g. 14)
 +
 
 +
=== geo.crox.net (recommended) ===
 +
 
 +
{{DJISource
 +
|hostname=geo.crox.net
 +
|url=http://geo.crox.net/djia/%Y/%m/%d
 +
|urlComments=Date format is quite flexible, eg %Y%m%d or %Y-%m-%d are both fine too. For compatibility with the carabiner.peeron.com source, you get a "404" http error if there is no data (however along with an error message explaining why there is no data).
 +
|startDate=1928/10/01
 +
|updateSource=different reputable websites; some historical data from Reuters and Financial Times.
 +
|updateFrequency=as soon as the data is available
 +
|serverLocation=two separate locations in Switzerland and the Netherlands
 +
|accessRestrictions=No technical restrictions, users are expected to use common sense, when in doubt, ask.
 +
|contactAccount=Crox}}
 +
 
 +
The script checks that separate sources give the same value before outputting anything. This should ensure that wrong data is never displayed (I've seen myself cases where google or yahoo temporarily had a wrong number for a short while just after 9:30.)
 +
 
 +
The source is now hosted on two different servers in two independent networks. You can either use geo.crox.net which should generally point to a working server, or alternatively use www1.geo.crox.net and fall-back to www2.geo.crox.net (or the other way round) for maximum availability.
 +
 
 +
Note that I found some discrepancies in the historical data between the different sources, but none of them affect expeditions after the algorithm was published.
 +
 
 +
I plan to make SQL dumps or CSV exports available for those wanting historical data, in the meanwhile ask me. Comments and suggestions welcome.
 +
 
 +
In addition to the opening values, you can also fetch the following information:
 +
 
 +
geo.crox.net/djia/'''last_day_avail'''
 +
 
 +
Last day for which a DJIA opening value has been cached. For instance, on regular working days before 09:30 NYC time this will be set to the previous day. Or on a regular Friday after 09:30 NYC time this will be set to the following Sunday. Format: YYYY-MM-DD.
 +
 
 +
geo.crox.net/djia/'''holidays'''
 +
 
 +
The list of DOW holidays used by geo.crox.net. Format: YYYY-MM-DD, one per line.
 +
 
 +
Watch this space for updates.
 +
 
 +
=== carabiner.peeron.com ===
  
 
{{DJISource
 
{{DJISource
|hostname=irc.peeron.com
+
|hostname=carabiner.peeron.com
|url=http://irc.peeron.com/xkcd/map/data/%Y/%m/%d
+
|url=http://carabiner.peeron.com/xkcd/map/data/%Y/%m/%d
 
|urlComments=This is used by the [http://xkcd.com/geohashing reference implementation].
 
|urlComments=This is used by the [http://xkcd.com/geohashing reference implementation].
 
|startDate=1928/10/01
 
|startDate=1928/10/01
Line 24: Line 59:
 
|contactAccount=Zigdon}}
 
|contactAccount=Zigdon}}
  
== sctree-it.sytes.net:50324 ==
+
This source was formerly at irc.peeron.com.
  
{{DJISource
+
== Television ==
|hostname=sctree-it.sytes.net:50324
+
In areas without (instant) internet access, you need to know the current DJIA to calculate today's coordinates manually. That probably means ''by using a cellphone or notebook with an offline calculator''.
|url=http://sctree-it.sytes.net:50324/dow.php?yy=%Y&mm=%m&dd=%d
+
=== Europe ===
|startDate=1970-01-02
+
Channel N24s teletextpage 301 shows the DJIA opening value:<br>
|updateSource=finance.google.com
+
[[Image:Hermann_DIJA_on_N24_teletex.png]]
|updateFrequency=weekdays, at 09:35 [[ET]]
 
|serverLocation=Stamford, CT, USA
 
|accessRestrictions=There is an additional parameter: &dbg=true, that will print the relevant variables on each step of the process. This page used by my implementation. There are no technical restrictions in place, but please let me ([[User:Gandazgul]]) know if you're planning to use it heavily.
 
|contactAccount=Gandazgul}}
 
  
== finance.yahoo.com ==
+
[[Category:Algorithm]]
 
+
[[Category:Definitions]]
{{DJISource
+
[[Category:Implementations]]
|hostname=finance.yahoo.com
 
|url=http://ichart.finance.yahoo.com/table.csv?s=%5EDJI&a=09&b=1&c=1928&d=%m&e=%d&f=%Y&g=d&ignore=.csv
 
|urlComments=comma-delimited file download with Date,Open,High,Low,Close,Volume,Adjusted Close
 
|startDate=1928-10-01
 
|updateSource=finance.yahoo.com
 
|updateFrequency=daily
 
|serverLocation=Probably San Jose, CA
 
|accessRestrictions=none
 
|contactAccount=
 
|contactEmail=support@yahoo.com}}
 
 
 
== Unreliable ==
 
 
 
=== xkcd.nucleardog.com ===
 
 
 
{{DJISource
 
|hostname=xkcd.nucleardog.com
 
|url=http://xkcd.nucleardog.com/getdow.php?year=%Y&month=%m&day=%d
 
|urlComments=Leading zeros are not significant in year, month and day values. If you request a date which has no value it will return the string 'null'. If you would like to avoid it returning 'null' when requesting days such as weekends, you may pass the GET variable 'compensate' with any value, which will cause it to work backwards from any non-existent days until it finds one with a value and return that instead.
 
|startDate=1970-01-02
 
|updateSource=finance.google.com
 
|updateFrequency=<span style="background: #faa">'''unreliable'''</span> ''(see note)''
 
|serverLocation=Texas, USA
 
|accessRestrictions=Free for anyone to use up to a reasonable number of requests. If you plan on making upwards of 10k or 20k requests a day, please consult with me first.
 
|contactAccount=NuclearDog}}
 
* '''Note:''' As of 17:15, 24 May 2008 (UTC), this source is unreliable for recent dates, returning <CODE>null</CODE> for [[2008-05-22]] and <CODE>12620.9</CODE> for [[2008-05-23]].  These values should be <CODE>12597.69</CODE> and <CODE>12620.90</CODE> (with the zero) instead.  Please use an alternate Dow source until these problems are fixed.
 
* As of 14:19, 30 May 2008 (UTC), does not have any values for the week of 27-30 May.
 

Latest revision as of 21:56, 21 April 2024

The Dow Jones Industrial Average is a well known indicator of the overall health of the economy calculated using the current value of a variety of stocks along with a periodically adjusted divisor. The opening value of the Dow Jones Industrial Average is used as an entropy source in the Geohashing algorithm.

If you're programming a geohashing calculator, mapping service or other implementation, you'll need a source for the current and historic DJIA value. This page lists known sources and ways to access them and access restrictions.

The Internet

Conventions

In the following descriptions, tokens will be used in URLs to represent values of the date as specified by the strftime() function found in many languages. Specifically:

  • %Y is the year (e.g. 1990)
  • %m is the two digit month number (e.g. 03)
  • %d is the two digit day number (e.g. 14)

geo.crox.net (recommended)

geo.crox.net
Date Range:1928/10/01 - present
Update Source:different reputable websites; some historical data from Reuters and Financial Times.
Update Frequency:as soon as the data is available
Server Location:two separate locations in Switzerland and the Netherlands
Contact:Crox

The source can be accessed at:

http://geo.crox.net/djia/%Y/%m/%d
  • Date format is quite flexible, eg %Y%m%d or %Y-%m-%d are both fine too. For compatibility with the carabiner.peeron.com source, you get a "404" http error if there is no data (however along with an error message explaining why there is no data).
  • Access Restrictions: No technical restrictions, users are expected to use common sense, when in doubt, ask.


The script checks that separate sources give the same value before outputting anything. This should ensure that wrong data is never displayed (I've seen myself cases where google or yahoo temporarily had a wrong number for a short while just after 9:30.)

The source is now hosted on two different servers in two independent networks. You can either use geo.crox.net which should generally point to a working server, or alternatively use www1.geo.crox.net and fall-back to www2.geo.crox.net (or the other way round) for maximum availability.

Note that I found some discrepancies in the historical data between the different sources, but none of them affect expeditions after the algorithm was published.

I plan to make SQL dumps or CSV exports available for those wanting historical data, in the meanwhile ask me. Comments and suggestions welcome.

In addition to the opening values, you can also fetch the following information:

geo.crox.net/djia/last_day_avail

Last day for which a DJIA opening value has been cached. For instance, on regular working days before 09:30 NYC time this will be set to the previous day. Or on a regular Friday after 09:30 NYC time this will be set to the following Sunday. Format: YYYY-MM-DD.

geo.crox.net/djia/holidays

The list of DOW holidays used by geo.crox.net. Format: YYYY-MM-DD, one per line.

Watch this space for updates.

carabiner.peeron.com

carabiner.peeron.com
Date Range:1928/10/01 - present
Update Source:finance.google.com, dates before 1970 from yahoo.com
Update Frequency:weekdays, between 09:00 and 10:00 ET - as soon as the data is available on google. Usually up by 09:35 ET
Server Location:Reston, Virginia, USA
Contact:Zigdon

The source can be accessed at:

http://carabiner.peeron.com/xkcd/map/data/%Y/%m/%d
  • This is used by the reference implementation.
  • Access Restrictions: There are no technical restrictions in place, but please let User:Zigdon know if you're about to use it heavily.


This source was formerly at irc.peeron.com.

Television

In areas without (instant) internet access, you need to know the current DJIA to calculate today's coordinates manually. That probably means by using a cellphone or notebook with an offline calculator.

Europe

Channel N24s teletextpage 301 shows the DJIA opening value:
Hermann DIJA on N24 teletex.png