sec_id 5.2.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +6 -0
- data/CHANGELOG.md +24 -0
- data/MIGRATION.md +101 -0
- data/README.md +200 -17
- data/lib/sec_id/active_model.rb +144 -0
- data/lib/sec_id/base.rb +33 -1
- data/lib/sec_id/bic/country_codes.rb +46 -0
- data/lib/sec_id/bic.rb +123 -0
- data/lib/sec_id/cei.rb +19 -7
- data/lib/sec_id/cfi/attribute_set.rb +49 -0
- data/lib/sec_id/cfi/classification.rb +107 -0
- data/lib/sec_id/cfi/field.rb +56 -0
- data/lib/sec_id/cfi/tables.rb +1033 -0
- data/lib/sec_id/cfi.rb +138 -208
- data/lib/sec_id/cik.rb +13 -0
- data/lib/sec_id/concerns/checkable.rb +2 -2
- data/lib/sec_id/concerns/generatable.rb +71 -0
- data/lib/sec_id/concerns/normalizable.rb +1 -0
- data/lib/sec_id/concerns/validatable.rb +14 -3
- data/lib/sec_id/cusip.rb +18 -7
- data/lib/sec_id/deep_freeze.rb +18 -0
- data/lib/sec_id/detector.rb +28 -7
- data/lib/sec_id/dti.rb +104 -0
- data/lib/sec_id/figi.rb +18 -0
- data/lib/sec_id/fisn.rb +31 -0
- data/lib/sec_id/iban/country_rules.rb +7 -6
- data/lib/sec_id/iban.rb +19 -1
- data/lib/sec_id/isin.rb +20 -15
- data/lib/sec_id/lei.rb +13 -0
- data/lib/sec_id/occ.rb +21 -0
- data/lib/sec_id/railtie.rb +14 -0
- data/lib/sec_id/scanner.rb +2 -6
- data/lib/sec_id/sedol.rb +16 -0
- data/lib/sec_id/valoren.rb +13 -0
- data/lib/sec_id/version.rb +2 -1
- data/lib/sec_id/wkn.rb +16 -0
- data/lib/sec_id.rb +29 -4
- data/sec_id.gemspec +11 -5
- data/sig/manifest.yaml +8 -0
- data/sig/sec_id/base.rbs +72 -0
- data/sig/sec_id/bic/country_codes.rbs +5 -0
- data/sig/sec_id/bic.rbs +30 -0
- data/sig/sec_id/cei.rbs +26 -0
- data/sig/sec_id/cfi/attribute_set.rbs +68 -0
- data/sig/sec_id/cfi/classification.rbs +23 -0
- data/sig/sec_id/cfi/field.rbs +337 -0
- data/sig/sec_id/cfi/tables.rbs +68 -0
- data/sig/sec_id/cfi.rbs +56 -0
- data/sig/sec_id/cik.rbs +19 -0
- data/sig/sec_id/concerns/checkable.rbs +41 -0
- data/sig/sec_id/concerns/generatable.rbs +26 -0
- data/sig/sec_id/concerns/normalizable.rbs +34 -0
- data/sig/sec_id/concerns/validatable.rbs +42 -0
- data/sig/sec_id/cusip.rbs +29 -0
- data/sig/sec_id/deep_freeze.rbs +6 -0
- data/sig/sec_id/detector.rbs +35 -0
- data/sig/sec_id/dti.rbs +27 -0
- data/sig/sec_id/errors.rbs +28 -0
- data/sig/sec_id/figi.rbs +31 -0
- data/sig/sec_id/fisn.rbs +24 -0
- data/sig/sec_id/iban/country_rules.rbs +10 -0
- data/sig/sec_id/iban.rbs +54 -0
- data/sig/sec_id/isin.rbs +40 -0
- data/sig/sec_id/lei.rbs +33 -0
- data/sig/sec_id/occ.rbs +45 -0
- data/sig/sec_id/scanner.rbs +46 -0
- data/sig/sec_id/sedol.rbs +34 -0
- data/sig/sec_id/valoren.rbs +29 -0
- data/sig/sec_id/version.rbs +3 -0
- data/sig/sec_id/wkn.rbs +15 -0
- data/sig/sec_id.rbs +58 -0
- metadata +55 -7
- data/lib/sec_id/concerns/identifier_metadata.rb +0 -56
data/lib/sec_id.rb
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
require 'sec_id/version'
|
|
4
4
|
|
|
5
|
+
# Toolkit for securities identifiers — validate, normalize, parse, detect, convert,
|
|
6
|
+
# generate, and classify ISIN, CUSIP, CEI, SEDOL, FIGI, LEI, IBAN, CIK, OCC, WKN,
|
|
7
|
+
# Valoren, CFI, FISN, BIC, and DTI.
|
|
8
|
+
#
|
|
9
|
+
# @see https://github.com/svyatov/sec_id
|
|
5
10
|
module SecID
|
|
6
11
|
# Base error class for all SecID errors.
|
|
7
12
|
class Error < StandardError; end
|
|
@@ -52,7 +57,7 @@ module SecID
|
|
|
52
57
|
# @return [Boolean]
|
|
53
58
|
# @raise [ArgumentError] if any key in types is unknown
|
|
54
59
|
def valid?(str, types: nil)
|
|
55
|
-
return
|
|
60
|
+
return detector.matches?(str) if types.nil?
|
|
56
61
|
|
|
57
62
|
types.any? { |key| self[key].valid?(str) }
|
|
58
63
|
end
|
|
@@ -120,6 +125,20 @@ module SecID
|
|
|
120
125
|
result || raise(InvalidFormatError, parse_error_message(str, types))
|
|
121
126
|
end
|
|
122
127
|
|
|
128
|
+
# Generates a new, format-valid identifier instance of the given type.
|
|
129
|
+
#
|
|
130
|
+
# @note Generated identifiers are valid in format only — they are not real,
|
|
131
|
+
# registered securities.
|
|
132
|
+
#
|
|
133
|
+
# @param key [Symbol] identifier type (e.g. :isin, :cusip)
|
|
134
|
+
# @param random [Random] seedable source for reproducible output
|
|
135
|
+
# @return [SecID::Base] a generated, format-valid instance of the type mapped to `key`
|
|
136
|
+
# (e.g. {SecID::ISIN} for `:isin`)
|
|
137
|
+
# @raise [ArgumentError] if key is unknown
|
|
138
|
+
def generate(key, random: Random.new)
|
|
139
|
+
self[key].generate(random: random)
|
|
140
|
+
end
|
|
141
|
+
|
|
123
142
|
private
|
|
124
143
|
|
|
125
144
|
# @return [void]
|
|
@@ -132,8 +151,7 @@ module SecID
|
|
|
132
151
|
end
|
|
133
152
|
|
|
134
153
|
def parse_any(str)
|
|
135
|
-
|
|
136
|
-
key && self[key].new(str)
|
|
154
|
+
detector.first_match(str)
|
|
137
155
|
end
|
|
138
156
|
|
|
139
157
|
def parse_from(str, types)
|
|
@@ -178,11 +196,12 @@ module SecID
|
|
|
178
196
|
end
|
|
179
197
|
end
|
|
180
198
|
|
|
199
|
+
require 'sec_id/deep_freeze'
|
|
181
200
|
require 'sec_id/errors'
|
|
182
|
-
require 'sec_id/concerns/identifier_metadata'
|
|
183
201
|
require 'sec_id/concerns/normalizable'
|
|
184
202
|
require 'sec_id/concerns/validatable'
|
|
185
203
|
require 'sec_id/concerns/checkable'
|
|
204
|
+
require 'sec_id/concerns/generatable'
|
|
186
205
|
require 'sec_id/base'
|
|
187
206
|
require 'sec_id/detector'
|
|
188
207
|
require 'sec_id/scanner'
|
|
@@ -199,3 +218,9 @@ require 'sec_id/valoren'
|
|
|
199
218
|
require 'sec_id/cei'
|
|
200
219
|
require 'sec_id/cfi'
|
|
201
220
|
require 'sec_id/fisn'
|
|
221
|
+
require 'sec_id/bic'
|
|
222
|
+
require 'sec_id/dti'
|
|
223
|
+
|
|
224
|
+
# Auto-activate the ActiveModel validator inside Rails; a no-op everywhere else (keeps the
|
|
225
|
+
# default require zero-dependency). See SecID::Railtie and lib/sec_id/active_model.rb.
|
|
226
|
+
require 'sec_id/railtie' if defined?(Rails::Railtie)
|
data/sec_id.gemspec
CHANGED
|
@@ -10,19 +10,25 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.authors = ['Leonid Svyatov']
|
|
11
11
|
spec.email = ['leonid@svyatov.ru']
|
|
12
12
|
|
|
13
|
-
spec.summary = 'A Ruby toolkit for securities identifiers — validate, parse, normalize, detect,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'
|
|
13
|
+
spec.summary = 'A Ruby toolkit for securities identifiers — validate, parse, normalize, detect, convert, ' \
|
|
14
|
+
'generate, and classify.'
|
|
15
|
+
spec.description = 'Validate, normalize, parse, convert, generate, and classify securities identifiers. ' \
|
|
16
|
+
'Auto-detect identifier type from any string. Calculate and restore check digits. Generate ' \
|
|
17
|
+
'format-valid identifiers as test fixtures. Decode CFI codes to full ISO 10962:2021 ' \
|
|
18
|
+
'classifications. Includes an opt-in ActiveModel/Rails validator that adds no runtime ' \
|
|
19
|
+
'dependency. Supports ISIN, CUSIP, CEI, SEDOL, FIGI, LEI, IBAN, CIK, OCC, WKN, Valoren, ' \
|
|
20
|
+
'CFI, FISN, BIC, and DTI.'
|
|
17
21
|
spec.homepage = 'https://github.com/svyatov/sec_id'
|
|
18
22
|
spec.license = 'MIT'
|
|
19
23
|
|
|
20
24
|
spec.required_ruby_version = '>= 3.2.0'
|
|
21
25
|
|
|
22
26
|
spec.require_paths = ['lib']
|
|
23
|
-
spec.files = Dir['lib/**/*.rb'] +
|
|
27
|
+
spec.files = Dir['lib/**/*.rb'] + Dir['sig/**/*'] +
|
|
28
|
+
%w[.yardopts CHANGELOG.md LICENSE.txt MIGRATION.md README.md sec_id.gemspec]
|
|
24
29
|
|
|
25
30
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
31
|
+
spec.metadata['documentation_uri'] = 'https://rubydoc.info/gems/sec_id'
|
|
26
32
|
spec.metadata['source_code_uri'] = 'https://github.com/svyatov/sec_id'
|
|
27
33
|
spec.metadata['changelog_uri'] = 'https://github.com/svyatov/sec_id/blob/main/CHANGELOG.md'
|
|
28
34
|
spec.metadata['bug_tracker_uri'] = 'https://github.com/svyatov/sec_id/issues'
|
data/sig/manifest.yaml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Standard-library signatures these RBS files reference. Consumers' RBS/Steep
|
|
2
|
+
# load these automatically when they depend on sec_id. (The gem has no runtime
|
|
3
|
+
# gem dependencies, so none are auto-derived from the gemspec.)
|
|
4
|
+
#
|
|
5
|
+
# Set (ISIN, SEDOL, FIGI, Valoren, BIC) is a core class in rbs 4.0 — always
|
|
6
|
+
# loaded, so it needs no manifest entry.
|
|
7
|
+
dependencies:
|
|
8
|
+
- name: date # Date in OCC
|
data/sig/sec_id/base.rbs
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
module SecID
|
|
2
|
+
# Accepted raw input for parsing/validating an identifier: a String, an Integer
|
|
3
|
+
# (Valoren/CIK/CUSIP accept numeric input), or nil.
|
|
4
|
+
type input = String | Integer | nil
|
|
5
|
+
|
|
6
|
+
# The class-object surface the concern ClassMethods modules call through `self`
|
|
7
|
+
# once extended onto an identifier class (they construct instances via `new`).
|
|
8
|
+
interface _IdentifierClass
|
|
9
|
+
def new: (SecID::input) -> Base
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Base class for securities identifiers, providing a common interface for
|
|
13
|
+
# validation, normalization, parsing, and generation.
|
|
14
|
+
class Base
|
|
15
|
+
include Normalizable
|
|
16
|
+
include Validatable
|
|
17
|
+
include Generatable
|
|
18
|
+
extend Normalizable::ClassMethods
|
|
19
|
+
extend Validatable::ClassMethods
|
|
20
|
+
extend Generatable::ClassMethods
|
|
21
|
+
|
|
22
|
+
# Metadata constants each subclass overrides with its concrete shape. Declared
|
|
23
|
+
# here (as the widest shape) so the shared concern method bodies type-check.
|
|
24
|
+
FULL_NAME: String
|
|
25
|
+
ID_LENGTH: Integer | ::Range[Integer] | ::Array[Integer]
|
|
26
|
+
EXAMPLE: String
|
|
27
|
+
VALID_CHARS_REGEX: ::Regexp
|
|
28
|
+
ID_REGEX: ::Regexp
|
|
29
|
+
|
|
30
|
+
attr_reader full_id: String
|
|
31
|
+
# Reader is nilable (nil for invalid input, checked by `valid_format?`); the ivar is
|
|
32
|
+
# typed `untyped` because subclasses use `@identifier` as non-nil after validation and
|
|
33
|
+
# RBS forbids narrowing an inherited ivar's type.
|
|
34
|
+
def identifier: () -> String?
|
|
35
|
+
|
|
36
|
+
def self.short_name: () -> String
|
|
37
|
+
def self.full_name: () -> String
|
|
38
|
+
def self.id_length: () -> (Integer | ::Range[Integer] | ::Array[Integer])
|
|
39
|
+
def self.length_values: () -> (::Array[Integer] | ::Range[Integer])
|
|
40
|
+
def self.length_specificity: () -> (Integer | Float | nil)
|
|
41
|
+
def self.example: () -> String
|
|
42
|
+
def self.has_check_digit?: () -> bool
|
|
43
|
+
def self.inherited: (singleton(Base) subclass) -> void
|
|
44
|
+
|
|
45
|
+
def initialize: (SecID::input _sec_id_number) -> void
|
|
46
|
+
|
|
47
|
+
def ==: (Base other) -> bool
|
|
48
|
+
alias eql? ==
|
|
49
|
+
def hash: () -> Integer
|
|
50
|
+
def to_h: () -> Hash[Symbol, untyped]
|
|
51
|
+
def as_json: (*untyped) -> Hash[Symbol, untyped]
|
|
52
|
+
|
|
53
|
+
# Check-digit surface. Only the types that `include Checkable` implement these
|
|
54
|
+
# (they raise/NoMethodError otherwise); declared on Base so `Generatable#generate`
|
|
55
|
+
# and `Checkable::ClassMethods` type-check without narrowing on `has_check_digit?`.
|
|
56
|
+
def restore: () -> String
|
|
57
|
+
def restore!: () -> self
|
|
58
|
+
def calculate_check_digit: () -> (Integer | String)
|
|
59
|
+
|
|
60
|
+
def comparison_id: () -> String
|
|
61
|
+
|
|
62
|
+
private
|
|
63
|
+
|
|
64
|
+
def components: () -> Hash[Symbol, untyped]
|
|
65
|
+
def parse: (SecID::input sec_id_number) -> (::MatchData | ::Hash[Symbol, untyped])
|
|
66
|
+
|
|
67
|
+
@full_id: String
|
|
68
|
+
@identifier: untyped
|
|
69
|
+
self.@short_name: String
|
|
70
|
+
self.@has_check_digit: bool
|
|
71
|
+
end
|
|
72
|
+
end
|
data/sig/sec_id/bic.rbs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module SecID
|
|
2
|
+
# Business Identifier Code (BIC / SWIFT code).
|
|
3
|
+
class BIC < Base
|
|
4
|
+
FULL_NAME: String
|
|
5
|
+
ID_LENGTH: Array[Integer]
|
|
6
|
+
EXAMPLE: String
|
|
7
|
+
VALID_CHARS_REGEX: ::Regexp
|
|
8
|
+
ID_REGEX: ::Regexp
|
|
9
|
+
|
|
10
|
+
def self.countries: () -> Array[String]
|
|
11
|
+
|
|
12
|
+
attr_reader bank_code: String?
|
|
13
|
+
attr_reader country_code: String?
|
|
14
|
+
attr_reader location_code: String?
|
|
15
|
+
attr_reader branch_code: String?
|
|
16
|
+
|
|
17
|
+
def initialize: (SecID::input bic) -> void
|
|
18
|
+
private def self.generate_body: (Random random) -> String
|
|
19
|
+
|
|
20
|
+
private
|
|
21
|
+
|
|
22
|
+
def components: () -> Hash[Symbol, untyped]
|
|
23
|
+
def valid_format?: () -> bool
|
|
24
|
+
def detect_errors: () -> Array[Symbol]
|
|
25
|
+
def validation_message: (Symbol code) -> String?
|
|
26
|
+
def recognized_country?: () -> bool
|
|
27
|
+
|
|
28
|
+
self.@countries: Array[String]
|
|
29
|
+
end
|
|
30
|
+
end
|
data/sig/sec_id/cei.rbs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module SecID
|
|
2
|
+
# CUSIP Entity Identifier (CEI).
|
|
3
|
+
class CEI < Base
|
|
4
|
+
include Checkable
|
|
5
|
+
extend Checkable::ClassMethods
|
|
6
|
+
|
|
7
|
+
FULL_NAME: String
|
|
8
|
+
ID_LENGTH: Integer
|
|
9
|
+
EXAMPLE: String
|
|
10
|
+
VALID_CHARS_REGEX: ::Regexp
|
|
11
|
+
ID_REGEX: ::Regexp
|
|
12
|
+
|
|
13
|
+
attr_reader prefix: String?
|
|
14
|
+
attr_reader numeric: String?
|
|
15
|
+
attr_reader entity_id: String?
|
|
16
|
+
|
|
17
|
+
def initialize: (SecID::input cei) -> void
|
|
18
|
+
def calculate_check_digit: () -> Integer
|
|
19
|
+
def self.check_digit: (SecID::input id) -> Integer
|
|
20
|
+
private def self.generate_body: (Random random) -> String
|
|
21
|
+
|
|
22
|
+
private
|
|
23
|
+
|
|
24
|
+
def components: () -> Hash[Symbol, untyped]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Generated by `rake sig:cfi` from SecID::CFI::Tables. Do not edit by hand.
|
|
2
|
+
module SecID
|
|
3
|
+
class CFI < Base
|
|
4
|
+
# The ordered collection of decoded attribute Fields.
|
|
5
|
+
class AttributeSet
|
|
6
|
+
include Enumerable[Field]
|
|
7
|
+
|
|
8
|
+
# `fields` is typed `untyped` because `#initialize` calls
|
|
9
|
+
# `define_singleton_method(field.meaning)` and `field.meaning` is nilable.
|
|
10
|
+
def initialize: (untyped fields) -> void
|
|
11
|
+
def each: () { (Field) -> void } -> self
|
|
12
|
+
| () -> Enumerator[Field, self]
|
|
13
|
+
def []: (Symbol meaning) -> Field?
|
|
14
|
+
def empty?: () -> bool
|
|
15
|
+
def to_h: () -> Hash[untyped, untyped]
|
|
16
|
+
def as_json: (*untyped) -> Hash[Symbol, untyped]
|
|
17
|
+
|
|
18
|
+
# Per-meaning readers — the union of every attribute meaning. Each instance
|
|
19
|
+
# only answers the meanings actually present; an absent one raises
|
|
20
|
+
# NoMethodError at runtime. Use #[] for the presence-uncertain path.
|
|
21
|
+
def asset_class: () -> Field
|
|
22
|
+
def assets: () -> Field
|
|
23
|
+
def barrier_dependency: () -> Field
|
|
24
|
+
def calculation_frequency: () -> Field
|
|
25
|
+
def call_put: () -> Field
|
|
26
|
+
def closed_open: () -> Field
|
|
27
|
+
def components: () -> Field
|
|
28
|
+
def composition: () -> Field
|
|
29
|
+
def currency: () -> Field
|
|
30
|
+
def delivery: () -> Field
|
|
31
|
+
def distribution: () -> Field
|
|
32
|
+
def distribution_policy: () -> Field
|
|
33
|
+
def equity_type: () -> Field
|
|
34
|
+
def exercise_style: () -> Field
|
|
35
|
+
def form: () -> Field
|
|
36
|
+
def further_grouping: () -> Field
|
|
37
|
+
def guarantee: () -> Field
|
|
38
|
+
def income: () -> Field
|
|
39
|
+
def interest_rate_type: () -> Field
|
|
40
|
+
def interest_type: () -> Field
|
|
41
|
+
def investment_strategy: () -> Field
|
|
42
|
+
def issuer_type: () -> Field
|
|
43
|
+
def long_short: () -> Field
|
|
44
|
+
def notional: () -> Field
|
|
45
|
+
def option_style: () -> Field
|
|
46
|
+
def ownership_restrictions: () -> Field
|
|
47
|
+
def payment_status: () -> Field
|
|
48
|
+
def redemption: () -> Field
|
|
49
|
+
def repayment: () -> Field
|
|
50
|
+
def return_trigger: () -> Field
|
|
51
|
+
def return_type: () -> Field
|
|
52
|
+
def security_type: () -> Field
|
|
53
|
+
def standardized: () -> Field
|
|
54
|
+
def strategy_style: () -> Field
|
|
55
|
+
def termination: () -> Field
|
|
56
|
+
def type: () -> Field
|
|
57
|
+
def underlying: () -> Field
|
|
58
|
+
def underlying_assets: () -> Field
|
|
59
|
+
def underlying_fund_type: () -> Field
|
|
60
|
+
def valuation: () -> Field
|
|
61
|
+
def voting_right: () -> Field
|
|
62
|
+
def warrant_type: () -> Field
|
|
63
|
+
def weighting: () -> Field
|
|
64
|
+
|
|
65
|
+
@fields: Array[Field]
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module SecID
|
|
2
|
+
class CFI < Base
|
|
3
|
+
# The decoded ISO 10962:2021 classification of a valid CFI, built by {CFI#decode}.
|
|
4
|
+
class Classification
|
|
5
|
+
attr_reader category: Field
|
|
6
|
+
attr_reader group: Field
|
|
7
|
+
attr_reader attributes: AttributeSet
|
|
8
|
+
|
|
9
|
+
def initialize: (String category_code, String group_code, Array[String] letters) -> void
|
|
10
|
+
def to_s: () -> String
|
|
11
|
+
def to_h: () -> Hash[Symbol, untyped]
|
|
12
|
+
def as_json: (*untyped) -> Hash[Symbol, untyped]
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def build_category: (String code) -> Field
|
|
17
|
+
def build_group: (String category_code, String code) -> Field
|
|
18
|
+
def build_attributes: (String category_code, String group_code, Array[String] letters) -> AttributeSet
|
|
19
|
+
def build_attribute: (untyped position, String letter) -> Field
|
|
20
|
+
def decode_value: (untyped value_map, String letter) -> [Symbol, String]
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
# Generated by `rake sig:cfi` from SecID::CFI::Tables. Do not edit by hand.
|
|
2
|
+
module SecID
|
|
3
|
+
class CFI < Base
|
|
4
|
+
# A single decoded CFI position (category, group, or one attribute).
|
|
5
|
+
class Field
|
|
6
|
+
attr_reader code: String
|
|
7
|
+
attr_reader name: Symbol
|
|
8
|
+
attr_reader label: String
|
|
9
|
+
attr_reader meaning: Symbol?
|
|
10
|
+
|
|
11
|
+
def initialize: (String code, Symbol name, String label, Array[Symbol] domain, ?meaning: Symbol?) -> void
|
|
12
|
+
def to_s: () -> String
|
|
13
|
+
def to_h: () -> Hash[Symbol, untyped]
|
|
14
|
+
def as_json: (*untyped) -> Hash[Symbol, untyped]
|
|
15
|
+
|
|
16
|
+
# Per-domain predicates — the union of every symbol a Field may hold. Each
|
|
17
|
+
# instance only answers the symbols in its own domain; an out-of-domain call
|
|
18
|
+
# raises NoMethodError at runtime (RBS can't express per-instance domains).
|
|
19
|
+
def accreting?: () -> bool
|
|
20
|
+
def accumulation_funds?: () -> bool
|
|
21
|
+
def adjustable_rate?: () -> bool
|
|
22
|
+
def agriculture?: () -> bool
|
|
23
|
+
def allotment_rights?: () -> bool
|
|
24
|
+
def american?: () -> bool
|
|
25
|
+
def american_call?: () -> bool
|
|
26
|
+
def american_chooser?: () -> bool
|
|
27
|
+
def american_put?: () -> bool
|
|
28
|
+
def amortization_plan?: () -> bool
|
|
29
|
+
def amortization_with_call?: () -> bool
|
|
30
|
+
def amortization_with_put?: () -> bool
|
|
31
|
+
def amortization_with_put_and_call?: () -> bool
|
|
32
|
+
def amortizing?: () -> bool
|
|
33
|
+
def annually?: () -> bool
|
|
34
|
+
def arbitrage?: () -> bool
|
|
35
|
+
def asian?: () -> bool
|
|
36
|
+
def asset_backed?: () -> bool
|
|
37
|
+
def asset_backed_securities?: () -> bool
|
|
38
|
+
def asset_based_lending?: () -> bool
|
|
39
|
+
def auction?: () -> bool
|
|
40
|
+
def auction_rate?: () -> bool
|
|
41
|
+
def balanced_conservative?: () -> bool
|
|
42
|
+
def bank_loan?: () -> bool
|
|
43
|
+
def barrier?: () -> bool
|
|
44
|
+
def barrier_capital_protection?: () -> bool
|
|
45
|
+
def barrier_discount_certificate?: () -> bool
|
|
46
|
+
def barrier_instrument_based?: () -> bool
|
|
47
|
+
def barrier_reverse_convertible?: () -> bool
|
|
48
|
+
def barrier_underlying_based?: () -> bool
|
|
49
|
+
def basis_swap?: () -> bool
|
|
50
|
+
def basket?: () -> bool
|
|
51
|
+
def baskets?: () -> bool
|
|
52
|
+
def bearer?: () -> bool
|
|
53
|
+
def bearer_registered?: () -> bool
|
|
54
|
+
def bermudan?: () -> bool
|
|
55
|
+
def bermudan_call?: () -> bool
|
|
56
|
+
def bermudan_chooser?: () -> bool
|
|
57
|
+
def bermudan_put?: () -> bool
|
|
58
|
+
def bonds?: () -> bool
|
|
59
|
+
def bonds_with_warrants?: () -> bool
|
|
60
|
+
def bonus_certificate?: () -> bool
|
|
61
|
+
def bullion_coins?: () -> bool
|
|
62
|
+
def call?: () -> bool
|
|
63
|
+
def call_and_put?: () -> bool
|
|
64
|
+
def call_options?: () -> bool
|
|
65
|
+
def capital_protection_convertible?: () -> bool
|
|
66
|
+
def capital_protection_with_coupons?: () -> bool
|
|
67
|
+
def capital_protection_with_participation?: () -> bool
|
|
68
|
+
def capitalization_weighted?: () -> bool
|
|
69
|
+
def carbon_credit?: () -> bool
|
|
70
|
+
def cash?: () -> bool
|
|
71
|
+
def cash_collateral?: () -> bool
|
|
72
|
+
def cash_payment?: () -> bool
|
|
73
|
+
def cash_repayment?: () -> bool
|
|
74
|
+
def cds_basket?: () -> bool
|
|
75
|
+
def cds_index?: () -> bool
|
|
76
|
+
def cds_index_tranche?: () -> bool
|
|
77
|
+
def cds_single_name?: () -> bool
|
|
78
|
+
def certificate_of_deposit?: () -> bool
|
|
79
|
+
def closed_end?: () -> bool
|
|
80
|
+
def collective_investment_vehicles?: () -> bool
|
|
81
|
+
def combination_of_bonds?: () -> bool
|
|
82
|
+
def combination_of_shares?: () -> bool
|
|
83
|
+
def combined_instruments?: () -> bool
|
|
84
|
+
def commercial_property?: () -> bool
|
|
85
|
+
def commodities?: () -> bool
|
|
86
|
+
def commodities_futures?: () -> bool
|
|
87
|
+
def common_shares?: () -> bool
|
|
88
|
+
def constant?: () -> bool
|
|
89
|
+
def contract_for_difference?: () -> bool
|
|
90
|
+
def convertible?: () -> bool
|
|
91
|
+
def convertible_bonds?: () -> bool
|
|
92
|
+
def convertible_common_shares?: () -> bool
|
|
93
|
+
def convertible_preferred_shares?: () -> bool
|
|
94
|
+
def convertible_redeemable?: () -> bool
|
|
95
|
+
def convertible_securities?: () -> bool
|
|
96
|
+
def corporate?: () -> bool
|
|
97
|
+
def corporate_bonds?: () -> bool
|
|
98
|
+
def covered?: () -> bool
|
|
99
|
+
def credit?: () -> bool
|
|
100
|
+
def credit_default?: () -> bool
|
|
101
|
+
def credits?: () -> bool
|
|
102
|
+
def cross_currency?: () -> bool
|
|
103
|
+
def cumulative_fixed_rate?: () -> bool
|
|
104
|
+
def cumulative_participating?: () -> bool
|
|
105
|
+
def currencies?: () -> bool
|
|
106
|
+
def custom?: () -> bool
|
|
107
|
+
def daily?: () -> bool
|
|
108
|
+
def debt?: () -> bool
|
|
109
|
+
def debt_instruments?: () -> bool
|
|
110
|
+
def defined_benefit?: () -> bool
|
|
111
|
+
def defined_contribution?: () -> bool
|
|
112
|
+
def delivery_versus_payment?: () -> bool
|
|
113
|
+
def depositary_receipts?: () -> bool
|
|
114
|
+
def derivatives?: () -> bool
|
|
115
|
+
def digital?: () -> bool
|
|
116
|
+
def digital_barrier?: () -> bool
|
|
117
|
+
def directional?: () -> bool
|
|
118
|
+
def discount_certificate?: () -> bool
|
|
119
|
+
def dividend?: () -> bool
|
|
120
|
+
def dividend_payments?: () -> bool
|
|
121
|
+
def dividends?: () -> bool
|
|
122
|
+
def elect_at_exercise?: () -> bool
|
|
123
|
+
def elect_at_settlement?: () -> bool
|
|
124
|
+
def energy?: () -> bool
|
|
125
|
+
def enhanced_voting?: () -> bool
|
|
126
|
+
def entitlements?: () -> bool
|
|
127
|
+
def environmental?: () -> bool
|
|
128
|
+
def equal_weighted?: () -> bool
|
|
129
|
+
def equities?: () -> bool
|
|
130
|
+
def equity?: () -> bool
|
|
131
|
+
def escrow_receipts?: () -> bool
|
|
132
|
+
def etf?: () -> bool
|
|
133
|
+
def european?: () -> bool
|
|
134
|
+
def european_call?: () -> bool
|
|
135
|
+
def european_chooser?: () -> bool
|
|
136
|
+
def european_put?: () -> bool
|
|
137
|
+
def event_driven?: () -> bool
|
|
138
|
+
def exchange_traded_funds?: () -> bool
|
|
139
|
+
def exchangeable?: () -> bool
|
|
140
|
+
def express_certificate?: () -> bool
|
|
141
|
+
def extendible?: () -> bool
|
|
142
|
+
def extraction_resources?: () -> bool
|
|
143
|
+
def fertilizer?: () -> bool
|
|
144
|
+
def financial_futures?: () -> bool
|
|
145
|
+
def financing?: () -> bool
|
|
146
|
+
def fixed?: () -> bool
|
|
147
|
+
def fixed_cash_repayment?: () -> bool
|
|
148
|
+
def fixed_fixed?: () -> bool
|
|
149
|
+
def fixed_floating?: () -> bool
|
|
150
|
+
def fixed_interest?: () -> bool
|
|
151
|
+
def fixed_maturity?: () -> bool
|
|
152
|
+
def fixed_maturity_with_call?: () -> bool
|
|
153
|
+
def fixed_maturity_with_put?: () -> bool
|
|
154
|
+
def fixed_maturity_with_put_and_call?: () -> bool
|
|
155
|
+
def fixed_rate?: () -> bool
|
|
156
|
+
def flexible?: () -> bool
|
|
157
|
+
def foreign_exchange?: () -> bool
|
|
158
|
+
def forward?: () -> bool
|
|
159
|
+
def forward_forward_swap?: () -> bool
|
|
160
|
+
def forward_price?: () -> bool
|
|
161
|
+
def forwards?: () -> bool
|
|
162
|
+
def free_of_payment?: () -> bool
|
|
163
|
+
def free_of_restrictions?: () -> bool
|
|
164
|
+
def freight?: () -> bool
|
|
165
|
+
def fully_paid?: () -> bool
|
|
166
|
+
def fund_unit_and_other?: () -> bool
|
|
167
|
+
def funds_of_funds?: () -> bool
|
|
168
|
+
def futures?: () -> bool
|
|
169
|
+
def general_collateral?: () -> bool
|
|
170
|
+
def generated_resources?: () -> bool
|
|
171
|
+
def government_bonds?: () -> bool
|
|
172
|
+
def government_guarantee?: () -> bool
|
|
173
|
+
def gross_total_return?: () -> bool
|
|
174
|
+
def growth?: () -> bool
|
|
175
|
+
def hedge_funds?: () -> bool
|
|
176
|
+
def hold_in_custody?: () -> bool
|
|
177
|
+
def income_funds?: () -> bool
|
|
178
|
+
def index?: () -> bool
|
|
179
|
+
def index_tranche?: () -> bool
|
|
180
|
+
def indices?: () -> bool
|
|
181
|
+
def industrial_products?: () -> bool
|
|
182
|
+
def inflation_rate_index?: () -> bool
|
|
183
|
+
def insurance_policies?: () -> bool
|
|
184
|
+
def interest_rate_index?: () -> bool
|
|
185
|
+
def interest_rates?: () -> bool
|
|
186
|
+
def joint_guarantee?: () -> bool
|
|
187
|
+
def junior?: () -> bool
|
|
188
|
+
def junior_subordinated?: () -> bool
|
|
189
|
+
def legacy_currency?: () -> bool
|
|
190
|
+
def letter_of_credit?: () -> bool
|
|
191
|
+
def life_style?: () -> bool
|
|
192
|
+
def limited_partnership_units?: () -> bool
|
|
193
|
+
def listed_options?: () -> bool
|
|
194
|
+
def loan_lease?: () -> bool
|
|
195
|
+
def local?: () -> bool
|
|
196
|
+
def long?: () -> bool
|
|
197
|
+
def lookback?: () -> bool
|
|
198
|
+
def medium_term_notes?: () -> bool
|
|
199
|
+
def metals?: () -> bool
|
|
200
|
+
def mini_future_certificates?: () -> bool
|
|
201
|
+
def miscellaneous?: () -> bool
|
|
202
|
+
def mixed?: () -> bool
|
|
203
|
+
def mixed_funds?: () -> bool
|
|
204
|
+
def modified_market_cap_weighted?: () -> bool
|
|
205
|
+
def money_market?: () -> bool
|
|
206
|
+
def money_market_instruments?: () -> bool
|
|
207
|
+
def monthly?: () -> bool
|
|
208
|
+
def mortgage_backed?: () -> bool
|
|
209
|
+
def mortgage_backed_securities?: () -> bool
|
|
210
|
+
def multi_commodity?: () -> bool
|
|
211
|
+
def multi_strategy?: () -> bool
|
|
212
|
+
def municipal_bonds?: () -> bool
|
|
213
|
+
def naked?: () -> bool
|
|
214
|
+
def national_currency?: () -> bool
|
|
215
|
+
def negative_pledge?: () -> bool
|
|
216
|
+
def net_total_return?: () -> bool
|
|
217
|
+
def nil_paid?: () -> bool
|
|
218
|
+
def no_payments?: () -> bool
|
|
219
|
+
def nominal?: () -> bool
|
|
220
|
+
def non_deliverable?: () -> bool
|
|
221
|
+
def non_listed_options?: () -> bool
|
|
222
|
+
def non_standardized?: () -> bool
|
|
223
|
+
def non_voting?: () -> bool
|
|
224
|
+
def normal_rate?: () -> bool
|
|
225
|
+
def not_applicable?: () -> bool
|
|
226
|
+
def open?: () -> bool
|
|
227
|
+
def open_end?: () -> bool
|
|
228
|
+
def options?: () -> bool
|
|
229
|
+
def other_assets?: () -> bool
|
|
230
|
+
def other_otc_derivatives?: () -> bool
|
|
231
|
+
def other_path_dependent?: () -> bool
|
|
232
|
+
def others?: () -> bool
|
|
233
|
+
def outperformance_bonus_certificate?: () -> bool
|
|
234
|
+
def outperforming_certificate?: () -> bool
|
|
235
|
+
def overnight?: () -> bool
|
|
236
|
+
def overnight_index_swap?: () -> bool
|
|
237
|
+
def paper?: () -> bool
|
|
238
|
+
def participating?: () -> bool
|
|
239
|
+
def partly_paid?: () -> bool
|
|
240
|
+
def payment_in_kind?: () -> bool
|
|
241
|
+
def pension_funds?: () -> bool
|
|
242
|
+
def perpetual?: () -> bool
|
|
243
|
+
def perpetual_with_call?: () -> bool
|
|
244
|
+
def perpetual_with_put?: () -> bool
|
|
245
|
+
def physical?: () -> bool
|
|
246
|
+
def physical_repayment?: () -> bool
|
|
247
|
+
def polypropylene_products?: () -> bool
|
|
248
|
+
def precious_metal_receipts?: () -> bool
|
|
249
|
+
def preferred_shares?: () -> bool
|
|
250
|
+
def price?: () -> bool
|
|
251
|
+
def price_return?: () -> bool
|
|
252
|
+
def price_weighted?: () -> bool
|
|
253
|
+
def private_equity?: () -> bool
|
|
254
|
+
def private_equity_funds?: () -> bool
|
|
255
|
+
def promissory_note?: () -> bool
|
|
256
|
+
def purchase_rights?: () -> bool
|
|
257
|
+
def put?: () -> bool
|
|
258
|
+
def put_options?: () -> bool
|
|
259
|
+
def quarterly?: () -> bool
|
|
260
|
+
def rates?: () -> bool
|
|
261
|
+
def real?: () -> bool
|
|
262
|
+
def real_estate?: () -> bool
|
|
263
|
+
def real_estate_deeds?: () -> bool
|
|
264
|
+
def real_estate_investment_trusts?: () -> bool
|
|
265
|
+
def redeemable?: () -> bool
|
|
266
|
+
def redeemable_exchangeable?: () -> bool
|
|
267
|
+
def redeemable_exchangeable_extendible?: () -> bool
|
|
268
|
+
def redeemable_extendible?: () -> bool
|
|
269
|
+
def referential_instruments?: () -> bool
|
|
270
|
+
def registered?: () -> bool
|
|
271
|
+
def reit?: () -> bool
|
|
272
|
+
def relative_value?: () -> bool
|
|
273
|
+
def repayment_in_assets?: () -> bool
|
|
274
|
+
def repayment_in_assets_and_cash?: () -> bool
|
|
275
|
+
def repayment_in_assets_or_cash?: () -> bool
|
|
276
|
+
def repayment_in_cash?: () -> bool
|
|
277
|
+
def repurchase_agreements?: () -> bool
|
|
278
|
+
def restricted_voting?: () -> bool
|
|
279
|
+
def restrictions?: () -> bool
|
|
280
|
+
def reverse_convertible?: () -> bool
|
|
281
|
+
def secured?: () -> bool
|
|
282
|
+
def securities_lending?: () -> bool
|
|
283
|
+
def security_selection?: () -> bool
|
|
284
|
+
def semi_annually?: () -> bool
|
|
285
|
+
def senior?: () -> bool
|
|
286
|
+
def senior_subordinated?: () -> bool
|
|
287
|
+
def services?: () -> bool
|
|
288
|
+
def share_and_bond?: () -> bool
|
|
289
|
+
def share_and_warrant?: () -> bool
|
|
290
|
+
def shares?: () -> bool
|
|
291
|
+
def shares_for_qualified_investors?: () -> bool
|
|
292
|
+
def short?: () -> bool
|
|
293
|
+
def single_currency?: () -> bool
|
|
294
|
+
def single_name?: () -> bool
|
|
295
|
+
def single_stock?: () -> bool
|
|
296
|
+
def sovereign?: () -> bool
|
|
297
|
+
def specific_security_collateral?: () -> bool
|
|
298
|
+
def spot?: () -> bool
|
|
299
|
+
def spot_forward_swap?: () -> bool
|
|
300
|
+
def spread_bet?: () -> bool
|
|
301
|
+
def standard_funds?: () -> bool
|
|
302
|
+
def standard_investment_funds?: () -> bool
|
|
303
|
+
def standardized?: () -> bool
|
|
304
|
+
def stock_dividend?: () -> bool
|
|
305
|
+
def stock_dividends?: () -> bool
|
|
306
|
+
def strategies?: () -> bool
|
|
307
|
+
def structured_instruments?: () -> bool
|
|
308
|
+
def structured_products_with_protection?: () -> bool
|
|
309
|
+
def structured_products_without_protection?: () -> bool
|
|
310
|
+
def subscription_rights?: () -> bool
|
|
311
|
+
def supranational?: () -> bool
|
|
312
|
+
def swaps?: () -> bool
|
|
313
|
+
def term?: () -> bool
|
|
314
|
+
def total_return?: () -> bool
|
|
315
|
+
def tracker_certificate?: () -> bool
|
|
316
|
+
def trade_finance_instruments?: () -> bool
|
|
317
|
+
def traditional?: () -> bool
|
|
318
|
+
def tri_party?: () -> bool
|
|
319
|
+
def twin_win_certificate?: () -> bool
|
|
320
|
+
def units?: () -> bool
|
|
321
|
+
def units_for_qualified_investors?: () -> bool
|
|
322
|
+
def unsecured?: () -> bool
|
|
323
|
+
def vanilla?: () -> bool
|
|
324
|
+
def variable?: () -> bool
|
|
325
|
+
def variable_cash_repayment?: () -> bool
|
|
326
|
+
def variable_interest?: () -> bool
|
|
327
|
+
def variance?: () -> bool
|
|
328
|
+
def volatility?: () -> bool
|
|
329
|
+
def voting?: () -> bool
|
|
330
|
+
def warrant_and_warrant?: () -> bool
|
|
331
|
+
def warrants?: () -> bool
|
|
332
|
+
def weekly?: () -> bool
|
|
333
|
+
def zero_coupon?: () -> bool
|
|
334
|
+
def zero_rate?: () -> bool
|
|
335
|
+
end
|
|
336
|
+
end
|
|
337
|
+
end
|