| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Finance::Symbology::Convention::Fidessa; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
41
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
1379
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = 0.3; |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
my $template = { |
|
9
|
|
|
|
|
|
|
'Preferred' => { |
|
10
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(-)$/, |
|
11
|
|
|
|
|
|
|
template => '-', |
|
12
|
|
|
|
|
|
|
}, |
|
13
|
|
|
|
|
|
|
'Preferred Class' => { |
|
14
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(-([A-Z]))$/, |
|
15
|
|
|
|
|
|
|
template => '-=CLASS=', |
|
16
|
|
|
|
|
|
|
class => 3 |
|
17
|
|
|
|
|
|
|
}, |
|
18
|
|
|
|
|
|
|
'Class' => { |
|
19
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\.([A-Z]))$/, |
|
20
|
|
|
|
|
|
|
template => '.=CLASS=', |
|
21
|
|
|
|
|
|
|
class => 3 |
|
22
|
|
|
|
|
|
|
}, |
|
23
|
|
|
|
|
|
|
'Preferred when distributed' => { |
|
24
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(-WD)$/, |
|
25
|
|
|
|
|
|
|
template => '-WD', |
|
26
|
|
|
|
|
|
|
}, |
|
27
|
|
|
|
|
|
|
'When distributed' => { |
|
28
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(!W$)/, |
|
29
|
|
|
|
|
|
|
template => '!W', |
|
30
|
|
|
|
|
|
|
}, |
|
31
|
|
|
|
|
|
|
'Warrants' => { |
|
32
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\+)$/, |
|
33
|
|
|
|
|
|
|
template => '+', |
|
34
|
|
|
|
|
|
|
}, |
|
35
|
|
|
|
|
|
|
'Warrants Class' => { |
|
36
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\+([A-Z]))$/, |
|
37
|
|
|
|
|
|
|
template => '+=CLASS=', |
|
38
|
|
|
|
|
|
|
class => 3 |
|
39
|
|
|
|
|
|
|
}, |
|
40
|
|
|
|
|
|
|
'Called' => { |
|
41
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(!L)$/, |
|
42
|
|
|
|
|
|
|
template => '!', |
|
43
|
|
|
|
|
|
|
}, |
|
44
|
|
|
|
|
|
|
'Class Called' => { |
|
45
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\.([A-Z])L)$/, |
|
46
|
|
|
|
|
|
|
template => '.=CLASS=L', |
|
47
|
|
|
|
|
|
|
class => 3 |
|
48
|
|
|
|
|
|
|
}, |
|
49
|
|
|
|
|
|
|
'Preferred Called' => { |
|
50
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(-CL)$/, |
|
51
|
|
|
|
|
|
|
template => '-CL', |
|
52
|
|
|
|
|
|
|
}, |
|
53
|
|
|
|
|
|
|
'Preferred Class Called' => { |
|
54
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(-([A-Z])\.CL)$/, |
|
55
|
|
|
|
|
|
|
template => '-=CLASS=.CL', |
|
56
|
|
|
|
|
|
|
class => 3 |
|
57
|
|
|
|
|
|
|
}, |
|
58
|
|
|
|
|
|
|
'Preferred Class When Issued' => { |
|
59
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(-([A-Z])\*)$/, |
|
60
|
|
|
|
|
|
|
template => '-=CLASS=*', |
|
61
|
|
|
|
|
|
|
class => 3 |
|
62
|
|
|
|
|
|
|
}, |
|
63
|
|
|
|
|
|
|
'Emerging Company Marketplace' => { |
|
64
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(!EC)$/, |
|
65
|
|
|
|
|
|
|
template => '!EC', |
|
66
|
|
|
|
|
|
|
}, |
|
67
|
|
|
|
|
|
|
'Partial Paid' => { |
|
68
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(!PP)$/, |
|
69
|
|
|
|
|
|
|
template => '!PP', |
|
70
|
|
|
|
|
|
|
}, |
|
71
|
|
|
|
|
|
|
'Convertible' => { |
|
72
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(!V)$/, |
|
73
|
|
|
|
|
|
|
template => '!V', |
|
74
|
|
|
|
|
|
|
}, |
|
75
|
|
|
|
|
|
|
'Convertible Called' => { |
|
76
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(!VL)$/, |
|
77
|
|
|
|
|
|
|
template => '!VL', |
|
78
|
|
|
|
|
|
|
}, |
|
79
|
|
|
|
|
|
|
'Class Convertible' => { |
|
80
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\.([A-Z])V)$/, |
|
81
|
|
|
|
|
|
|
template => '.=CLASS=V', |
|
82
|
|
|
|
|
|
|
class => 3 |
|
83
|
|
|
|
|
|
|
}, |
|
84
|
|
|
|
|
|
|
'Preferred Class Convertible' => { |
|
85
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(-([A-Z])V)$/, |
|
86
|
|
|
|
|
|
|
template => '-=CLASS=V', |
|
87
|
|
|
|
|
|
|
class => 3 |
|
88
|
|
|
|
|
|
|
}, |
|
89
|
|
|
|
|
|
|
'Preferred Class When Distributed' => { |
|
90
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(-([A-Z])WD)$/, |
|
91
|
|
|
|
|
|
|
template => '-=CLASS=WD', |
|
92
|
|
|
|
|
|
|
class => 3 |
|
93
|
|
|
|
|
|
|
}, |
|
94
|
|
|
|
|
|
|
'Rights' => { |
|
95
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(!R)$/, |
|
96
|
|
|
|
|
|
|
template => '!R', |
|
97
|
|
|
|
|
|
|
}, |
|
98
|
|
|
|
|
|
|
'Units' => { |
|
99
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\.U)$/, |
|
100
|
|
|
|
|
|
|
template => '.U', |
|
101
|
|
|
|
|
|
|
}, |
|
102
|
|
|
|
|
|
|
'When Issued' => { |
|
103
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\*)$/, |
|
104
|
|
|
|
|
|
|
template => '*', |
|
105
|
|
|
|
|
|
|
}, |
|
106
|
|
|
|
|
|
|
'Rights When Issued' => { |
|
107
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(!R\*)$/, |
|
108
|
|
|
|
|
|
|
template => '!R*', |
|
109
|
|
|
|
|
|
|
}, |
|
110
|
|
|
|
|
|
|
'Preferred When Issued' => { |
|
111
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(-\*)$/, |
|
112
|
|
|
|
|
|
|
template => '-*', |
|
113
|
|
|
|
|
|
|
}, |
|
114
|
|
|
|
|
|
|
'Class When Issued' => { |
|
115
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\.([A-Z])\*)$/, |
|
116
|
|
|
|
|
|
|
template => '.=CLASS=*', |
|
117
|
|
|
|
|
|
|
class => 3 |
|
118
|
|
|
|
|
|
|
}, |
|
119
|
|
|
|
|
|
|
'Warrant When Issued' => { |
|
120
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\+\*)$/, |
|
121
|
|
|
|
|
|
|
template => '+*', |
|
122
|
|
|
|
|
|
|
}, |
|
123
|
|
|
|
|
|
|
'TEST Symbol' => { |
|
124
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\.CT)$/, |
|
125
|
|
|
|
|
|
|
template => '/TEST' }, |
|
126
|
|
|
|
|
|
|
#Fidessa only symbols |
|
127
|
|
|
|
|
|
|
'Special' => { |
|
128
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\.SP)$/ |
|
129
|
|
|
|
|
|
|
}, |
|
130
|
|
|
|
|
|
|
'Stamped' => { |
|
131
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(\.SD)$/ |
|
132
|
|
|
|
|
|
|
}, |
|
133
|
|
|
|
|
|
|
'With Warrants' => { |
|
134
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(:W)$/ |
|
135
|
|
|
|
|
|
|
}, |
|
136
|
|
|
|
|
|
|
'Without Warrants' => { |
|
137
|
|
|
|
|
|
|
pattern => qr/^([A-Z]+)(:XW)$/ |
|
138
|
|
|
|
|
|
|
} |
|
139
|
|
|
|
|
|
|
}; |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
sub check { |
|
143
|
7
|
|
|
7
|
0
|
13
|
my ($self, $symbol) = @_; |
|
144
|
|
|
|
|
|
|
|
|
145
|
7
|
|
|
|
|
9
|
for my $type (keys %{$template}){ |
|
|
7
|
|
|
|
|
49
|
|
|
146
|
125
|
100
|
|
|
|
563
|
if (my @matches = $symbol =~ m/$template->{$type}{pattern}/){ |
|
147
|
4
|
50
|
|
|
|
26
|
my @class = splice(@matches,$template->{$type}{class}-1,1) |
|
148
|
|
|
|
|
|
|
if defined $template->{$type}{class}; |
|
149
|
|
|
|
|
|
|
|
|
150
|
4
|
|
|
|
|
6
|
my $returnObj; |
|
151
|
4
|
|
|
|
|
10
|
$returnObj->{type} = $type; |
|
152
|
4
|
|
|
|
|
10
|
$returnObj->{symbol} = shift @matches; |
|
153
|
4
|
50
|
|
|
|
10
|
$returnObj->{class} = shift @class if defined $class[0]; |
|
154
|
4
|
50
|
|
|
|
14
|
$returnObj->{suffix} = shift @matches if defined $matches[0]; |
|
155
|
|
|
|
|
|
|
|
|
156
|
4
|
|
|
|
|
19
|
return $returnObj; |
|
157
|
|
|
|
|
|
|
} |
|
158
|
|
|
|
|
|
|
} |
|
159
|
3
|
|
|
|
|
18
|
return undef; |
|
160
|
|
|
|
|
|
|
} |
|
161
|
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
sub convert { |
|
163
|
3
|
|
|
3
|
0
|
6
|
my ($self, $obj) = @_; |
|
164
|
|
|
|
|
|
|
|
|
165
|
3
|
|
|
|
|
9
|
my $outline = $template->{$obj->{type}}{template}; |
|
166
|
|
|
|
|
|
|
|
|
167
|
3
|
50
|
|
|
|
19
|
return -1 unless defined $outline; |
|
168
|
|
|
|
|
|
|
|
|
169
|
3
|
50
|
|
|
|
10
|
$outline =~ s/=CLASS=/$obj->{class}/ |
|
170
|
|
|
|
|
|
|
if defined $obj->{class}; |
|
171
|
|
|
|
|
|
|
|
|
172
|
3
|
|
|
|
|
13
|
return $obj->{symbol}.$outline; |
|
173
|
|
|
|
|
|
|
} |
|
174
|
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
1; |