App/Chart/Suffix/SIMEX.pm untested

filter: Statementstmt 0.0% 0 / 33 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 9 Podpod n/a totaltotal 0.0% 0 / 42 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Singapore International Money Exchange (SIMEX) setups.
2  
3 # Copyright 2005, 2006, 2007, 2008, 2009, 2016 Kevin Ryde
4  
5 # This file is part of Chart.
6 #
7 # Chart is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU General Public License as published by the Free
9 # Software Foundation; either version 3, or (at your option) any later
10 # version.
11 #
12 # Chart is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 # details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with Chart. If not, see <http://www.gnu.org/licenses/>.
19  
20  
21 package App::Chart::Suffix::SIMEX;
22 use strict;
23 use warnings;
24 use Locale::TextDomain 'App-Chart';
25  
26 use App::Chart;
27 use App::Chart::Barchart;
28 use App::Chart::Sympred;
29 use App::Chart::TZ;
30 use App::Chart::Weblink;
31 use App::Chart::Suffix::SI;
32  
33 my $pred = App::Chart::Sympred::Suffix->new ('.SIMEX');
34 $App::Chart::Suffix::SI::timezone_singapore->setup_for_symbol ($pred);
35  
36 # barchart for database and for intraday graphs
37 $App::Chart::Barchart::intraday_pred->add ($pred);
38 $App::Chart::Barchart::fiveday_pred->add ($pred);
39  
40 # FIXME: dunno what delay for simex, www.sgx.com says its quotes are
41 # delayed, but doesn't seem to say be how much
42 #
43 # App::Chart::Barchart::setup_quote_delay ($pred, 20);
44  
45 App::Chart::Barchart::commodity_mung
46 ($pred,
47 # equity index futures
48 'NK' => 'NX', # nikkei 225
49 'N3' => 'VN', # nikkei 300
50 #
51 # 'JP' MSCI Japan seems to be missing from barchart, it looks
52 # like that contract has had no volume for a long time, so it
53 # doesn't matter
54 #
55 'JP' => undef, # msci japan
56 #
57 'TW' => 'TI', # msci taiwan
58 'SG' => 'SV', # msci singapore
59 'ST' => 'VS', # straits times
60 'HK' => 'VK', # msci hong kong
61 'IN' => 'NH', # cnx nifty
62  
63 # interest rate futures
64 'ED' => 'DS', # eurodollar
65 'EY' => 'WT', # euroyen tibor
66 'EL' => 'SL', # euroyen libor
67 'JG' => 'JV', # japan 10-yr bond
68 'JB' => 'JX', # japan 10-yr bond mini
69 'SD' => 'VD', # singapore dollar interest rate
70 'SB' => 'JZ'); # singapore 5-yr bond
71  
72  
73 #-----------------------------------------------------------------------------
74 # web link - home page only for now
75 #
76  
77 App::Chart::Weblink->new
78 (pred => $pred,
79 name => __('SGX _Home Page'),
80 desc => __('Open web browser at the Singapore Stock Exchange home page'),
81 url => 'http://www.sgx.com');
82  
83 1;