App-Chart

 view release on metacpan or  search on metacpan

lib/App/Chart/Suffix/CME.pm  view on Meta::CPAN

# Chicago Mercantile Exchange setups.

# Copyright 2005, 2006, 2007, 2008, 2009 Kevin Ryde

# This file is part of Chart.
#
# Chart is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 3, or (at your option) any later version.
#
# Chart is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Suffix::CME;
use strict;
use warnings;
use Locale::TextDomain 'App-Chart';

use App::Chart;
use App::Chart::Barchart;
use App::Chart::Sympred;
use App::Chart::TZ;
use App::Chart::Weblink;
use App::Chart::Yahoo;

my $pred = App::Chart::Sympred::Suffix->new ('.CME');
App::Chart::TZ->chicago->setup_for_symbol ($pred);

$App::Chart::Yahoo::latest_pred->add ($pred);
$App::Chart::Barchart::intraday_pred->add ($pred);
$App::Chart::Barchart::fiveday_pred->add ($pred);


#------------------------------------------------------------------------------
# weblink - contract specs

App::Chart::Weblink->new
  (pred => $pred,
   name => __('CME _Contract Specifications'),
   desc => __('Open web browser at the Chicago Mercantile Exchange contract specifications for this commodity'),
   proc => sub {
     my ($symbol) = @_;
     return 'http://www.cme.com/clearing/clr/spec/contract_specifications_cl.html?product='
       . URI::Escape::uri_escape (App::Chart::symbol_commodity ($symbol));
   });


#------------------------------------------------------------------------------

# (set! barchart-suffix-delay-alist (acons ".CME" 10
# 					 barchart-suffix-delay-alist))


App::Chart::Barchart::commodity_mung
  ($pred,
   # interest rate products (IMM)
   # "EM"        # 1-month LIBOR
   'GLB' => 'GH',  # 1-month LIBOR electronic
   'TB'  => undef, # 13-week treasury bills
   'GTB' => undef, # 13-week treasury bills electronic
   # 'S2'          # 2-year swap pit+electronic
   # 'S5'          # 5-year swap electronic
   'SW5' => undef,   # 5-year swap pit
   # 'S0'         # 10-year swap
   'SW0' => 'S0', # 10-year swap electronic
   'TIE' => 'F3', # 28-day mexican TIIE
   'GTI' => 'F4', # 28-day mexican TIIE electronic
   'CET' => 'F1', # 91-day mexican CETES
   'GCE' => 'F2', # 91-day mexican CETES electronic
   'Y5'  => undef,    # 5-year eurodollar bundle options
   'CPI' => 'CI', # consumer price index
   # 'ED'         # eurodollar
   # 'GE'         # eurodollar electronic
   '3F' => undef,    # eurodollar FRA
   # 'EY'        # euroyen
   # 'EL'        # euroyen LIBOR
   'TZ' => undef,    # fed funds turn
   # 'JB'        # japanese government bonds
   # (F0, F5 agency swaps delisted 11 Apr 05)

   # equity products
   # 'NQ'        # e-mini nasdaq 100
   # 'ES'        # e-mini s&p 500
   'EMD' => 'MD', # e-mini s&p 500
   'FIN' => 'PF', # financial spctr
   # 'GI'        # GSCI
   'GD' => undef,    # GSCI electronic
   # 'ND'        # nasdaq 100 pit+electronic
   # 'NK'        # nikkei 225 dollar
   'NKD' => 'NY', # nikkei 225 dollar electronic
   'NIY' => 'NL', # nikkei 225 yen electronic
   'RS1' => 'RW', # russell 1000
   # 'RL'        # russell 2000 pit+electronic
   'ER2' => 'EZ', # e-mini russell 2000
   # 'SP'        # s&p 500
   # 'SG'        # s&p 500 barra growth
   # 'SU'        # s&p 500 barra value
   # 'MD'        # s&p midcap 400 pit+electronic
   'SMC' => 'PC', # s&p smallcap 600 electronic
   'QCN' => 'NC', # e-mini nasdaq composite pit+elec
   'TEC' => 'PT', # technology spctr
   'X1' => undef,    # X-Funds 1 index
   'X2' => undef,    # X-Funds 2 index
   'X3' => undef,    # X-Funds 3 index



( run in 1.807 second using v1.01-cache-2.11-cpan-39bf76dae61 )