Finance::Exchange - represents a financial stock exchange object.
version 0.01
use Finance::Exchange;
my $exchange_symbol = 'LSE'; # London Stocks Exchange
my $exchange = Finance::Exchange->create_exchange($exchange_symbol);
This is a generic representation of a financial stock exchange.
my $exchange = Finance::Exchange->create_exchange('LSE');
is $exchange->symbol, 'LSE';
is $exchange->display_name, 'London Stock Exchange';
is $exchange->trading_days, 'weekdays';
is $exchange->trading_timezone, 'Europe/London';
# The list of days starts on Sunday and is a set of flags indicating whether
# we trade on that day or not
is $exchange->trading_days_list, [ 0, 1, 1, 1, 1, 1, 0 ];
is $exchange->market_times, { ... };
is $exchange->delay_amount, 15, 'LSE minimum delay is 15 minutes';
is $exchange->currency, 'GBP', 'LSE is traded in pound sterling';
is $exchange->trading_date_can_differ, 0, 'only applies to AU/NZ';
...
Exchange object constructor.
Exchange display name, e.g. London Stock Exchange.
Exchange symbol, e.g. LSE to represent London Stocks Exchange.
An exchange's trading day category.
For example, an exchange that trades from Monday to Friday is given a trading days category of 'weekdays'.
The list is enumerated in the exchanges_trading_days_aliases.yml file.
The timezone in which the exchange conducts business.
This should be a string which will allow the standard DateTime module to find the proper information.
List the trading day index which is defined in exchanges_trading_days_aliases.yml.
An example of a 'weekdays' trading days list is as follow: - 0 # Sun - 1 # Mon - 1 # Tues - 1 # Wed - 1 # Thurs - 1 # Fri - 0 # Sat
A hash reference of human-readable exchange trading times in Greenwich Mean Time (GMT).
The trading times are broken into three categories:
1. standard - which represents the trading times in non Day Light Saving (DST) period. 2. dst - which represents the trading time in DST period. 3. partial_trading - which represents the trading breaks (e.g. lunch break) in a trading day
The acceptable delay amount of feed on this exchange, in minutes. Default is 60 minutes.
The currency in which the exchange is traded in.
A boolean flag to indicate if an exchange would open on the previous GMT date due to DST.