GithubHelp home page GithubHelp logo

finance-tw-taifex's Introduction

NAME
    Finance::TW::TAIFEX - Helper functions for Taiwan Futures Exchange

SYNOPSIS
      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;

DESCRIPTION
    Finance::TW::TAIFEX provides useful helper functions for the Taiwan
    Future Exchanges.

METHODS
  product NAME
    Returns the Finance::TW::TAIFEX::Product object represented by NAME.

    Currently supported product names:

    Futures
        TX MTX TE TF T5F MSF CPF XIF GTF

    Options
        TXO TEO TFO MSO XIO GTO

  has_product NAME
    Checks if the given product exists.

  contract NAME YEAR MONTH
    Returns the Finance::TW::TAIFEX::Contract of the given product expires
    on YEAR/MONTH.

  calendar_for YEAR
    Returns the trading calendar for YEAR.

  is_trading_day [DATE]
    Checks if the given DATE is a known trading day. Default DATE is the
    date in the current context.

  next_trading_day [DATE]
    Returns the next known trading day in string after the given DATE.

  previous_trading_day [DATE]
    Returns the previous known trading day in string after the given DATE.

  daily_futures_uri DATE
    Returns the URI of the official TAIFEX futures trading records for DATE.

  interday_futures_request($product, [$DATE])
    Returns a HTTP::Request object that fetches futures monthly interday csv
    file for $product of $DATE.

  interday_options_request($product, [$DATE])
    Returns a HTTP::Request object that fetches options monthly interday csv
    file for $product of $DATE.

  daily_options_uri DATE
    Returns the URI of the official TAIFEX options trading records for DATE.

  ensure_rpt DIR, TYPE, PREFIX
CAVEATS
    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.

AUTHOR
    Chia-liang Kao <[email protected]>

LICENSE
    This library is free software; you can redistribute it and/or modify it
    under the same terms as Perl itself.

SEE ALSO
    <http://www.taifex.com.tw/>

finance-tw-taifex's People

Contributors

clkao avatar

Stargazers

 avatar Leonard Huang avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

careyjou

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.