Finance::TW::TAIFEX - Helper functions for Taiwan Futures Exchange
use Finance::TW::TAIFEX; my $taifex = Finance::TW::TAIFEX->new(); $taifex->is_trading_day(); # is today a trading day? my $date = DateTime->now; $taifex->daily_futures_uri($date); $taifex->daily_options_uri($date); $taifex->contract('TX', '201001')->settlement_date; $taifex->product('TX')->near_term; $taifex->product('TX')->next_term;
Finance::TW::TAIFEX provides useful helper functions for the Taiwan Future Exchanges.
Returns the Finance::TW::TAIFEX::Product object represented by NAME.
Currently supported product names:
TX MTX TE TF T5F MSF CPF XIF GTF
TXO TEO TFO MSO XIO GTO
Checks if the given product exists.
Returns the Finance::TW::TAIFEX::Contract of the given product expires on YEAR/MONTH.
Returns the trading calendar for YEAR.
Checks if the given DATE is a known trading day. Default DATE is the date in the current context.
Returns the next known trading day in string after the given DATE.
Returns the previous known trading day in string after the given DATE.
Returns the URI of the official TAIFEX futures trading records for DATE.
Returns a HTTP::Request object that fetches futures monthly interday csv file for $product of $DATE.
Returns a HTTP::Request object that fetches options monthly interday csv file for $product of $DATE.
Returns the URI of the official TAIFEX options trading records for DATE.
The URI returned by daily_futures_uri and daily_options_uri are only valid for the last 30 trading days per the policy of TAIFEX.
daily_futures_uri
daily_options_uri
Chia-liang Kao <clkao@clkao.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.taifex.com.tw/
To install Finance::TW::TAIFEX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::TW::TAIFEX
CPAN shell
perl -MCPAN -e shell install Finance::TW::TAIFEX
For more information on module installation, please visit the detailed CPAN module installation guide.