All Projects â†’ rsheftel â†’ Pandas_market_calendars

rsheftel / Pandas_market_calendars

Licence: mit
Exchange calendars to use with pandas for trading applications

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pandas market calendars

nepali-datetime
Python's core datetime inspired nepali datetime (BS date & NPT) package 🇳🇵
Stars: ✭ 36 (-88.71%)
Mutual labels:  datetime, date, calendar
Calendar
📅 PHP Date & Time library that solves common problems in object oriented, immutable way.
Stars: ✭ 113 (-64.58%)
Mutual labels:  date, datetime, calendar
Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
Stars: ✭ 536 (+68.03%)
Mutual labels:  date, datetime, calendar
Period
PHP's time range API
Stars: ✭ 616 (+93.1%)
Mutual labels:  date, datetime, calendar
React Datetime Picker
A datetime picker for your React app.
Stars: ✭ 294 (-7.84%)
Mutual labels:  date, datetime, calendar
Calendarview
An Easy to Use Calendar for iOS (Swift 5.0)
Stars: ✭ 429 (+34.48%)
Mutual labels:  date, datetime, calendar
Laydate
layDate(日期与时间组件) 是 layui 独立维护的三大组件之一
Stars: ✭ 1,066 (+234.17%)
Mutual labels:  date, datetime, calendar
Zebra datepicker
A super-lightweight, highly configurable, cross-browser date / time picker jQuery plugin
Stars: ✭ 367 (+15.05%)
Mutual labels:  date, datetime, calendar
Date
A date and time library based on the C++11/14/17 <chrono> header
Stars: ✭ 2,389 (+648.9%)
Mutual labels:  date, datetime, calendar
Time
Building a better date/time library for Swift
Stars: ✭ 1,983 (+521.63%)
Mutual labels:  date, datetime, calendar
Tail.datetime
A lightweight, translat- and configurable Open Source DateTime Picker, written in pure vanilla JavaScript!
Stars: ✭ 139 (-56.43%)
Mutual labels:  date, datetime, calendar
shamsi date
A Flutter and Dart package for using Jalali (Shamsi, Solar, Persian or Jalaali) calendar. You can convert, format and manipulate Jalali and Gregorian (Miladi) date and times.
Stars: ✭ 59 (-81.5%)
Mutual labels:  datetime, date, calendar
Dpicker
A framework-agnostic minimal date picker
Stars: ✭ 187 (-41.38%)
Mutual labels:  date, datetime, calendar
Datez
📆 Breeze through Date, DateComponents, and TimeInterval with Swift!
Stars: ✭ 254 (-20.38%)
Mutual labels:  date, datetime, calendar
fiscalyear
📆 Utilities for managing the fiscal calendar
Stars: ✭ 33 (-89.66%)
Mutual labels:  datetime, calendar
isoweek
Go package for calculating a start date and time of ISO 8601 week. (golang)
Stars: ✭ 32 (-89.97%)
Mutual labels:  date, calendar
vue-timeselector
🕒 Simply customizable powerful time picker for Vue.js
Stars: ✭ 41 (-87.15%)
Mutual labels:  datetime, date
ember-dayjs-helpers
Ember Template helpers based on day.js
Stars: ✭ 19 (-94.04%)
Mutual labels:  datetime, date
vuejs3-datepicker
vue 3 datepicker. supports disabling, highlighting of dates and programmatic access of date.
Stars: ✭ 23 (-92.79%)
Mutual labels:  date, calendar
inquirer-datepicker-prompt
Datepicker prompt for inquirer.js
Stars: ✭ 24 (-92.48%)
Mutual labels:  datetime, date

pandas_market_calendars

Market calendars to use with pandas for trading applications.

.. image:: https://badge.fury.io/py/pandas-market-calendars.svg :target: https://badge.fury.io/py/pandas-market-calendars

.. image:: https://travis-ci.org/rsheftel/pandas_market_calendars.svg?branch=master :target: https://travis-ci.org/rsheftel/pandas_market_calendars

.. image:: https://coveralls.io/repos/github/rsheftel/pandas_market_calendars/badge.svg?branch=master :target: https://coveralls.io/github/rsheftel/pandas_market_calendars?branch=master

.. image:: https://readthedocs.org/projects/pandas-market-calendars/badge/?version=latest :target: http://pandas-market-calendars.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

Documentation

http://pandas_market_calendars.readthedocs.io/en/latest/

Overview

The Pandas package is widely used in finance and specifically for time series analysis. It includes excellent functionality for generating sequences of dates and capabilities for custom holiday calendars, but as an explicit design choice it does not include the actual holiday calendars for specific exchanges or OTC markets.

The pandas_market_calendars package looks to fill that role with the holiday, late open and early close calendars for specific exchanges and OTC conventions. pandas_market_calendars also adds several functions to manipulate the market calendars and includes a date_range function to create a pandas DatetimeIndex including only the datetimes when the markets are open. Additionally the package contains product specific calendars for future exchanges which have different market open, closes, breaks and holidays based on product type.

This package is a fork of the Zipline package from Quantopian and extracts just the relevant parts. All credit for their excellent work to Quantopian.

As of v1.0 this package only works with Python3. This is consistent with Pandas dropping support for Python2.

As of v1.4 this package now has the concept of a break during the trading day. For example this can accommodate Asian markets that have a lunch break, or futures markets that are open 24 hours with a break in the day for trade processing.

Source location

Hosted on GitHub: https://github.com/rsheftel/pandas_market_calendars

Installation
~~~~~~~~~~~~
``pip install pandas_market_calendars``

Arch Linux package available here: https://aur.archlinux.org/packages/python-pandas_market_calendars/

Calendars
---------
The list of `available calendars <https://pandas-market-calendars.readthedocs.io/en/latest/calendars.html>`_

Quick Start
-----------
.. code:: python

    import pandas_market_calendars as mcal
    
    # Create a calendar
    nyse = mcal.get_calendar('NYSE')

    # Show available calendars
    print(mcal.get_calendar_names())

.. code:: python

    early = nyse.schedule(start_date='2012-07-01', end_date='2012-07-10')
    early

    
.. parsed-literal::

                      market_open             market_close
    =========== ========================= =========================
     2012-07-02 2012-07-02 13:30:00+00:00 2012-07-02 20:00:00+00:00
     2012-07-03 2012-07-03 13:30:00+00:00 2012-07-03 17:00:00+00:00
     2012-07-05 2012-07-05 13:30:00+00:00 2012-07-05 20:00:00+00:00
     2012-07-06 2012-07-06 13:30:00+00:00 2012-07-06 20:00:00+00:00
     2012-07-09 2012-07-09 13:30:00+00:00 2012-07-09 20:00:00+00:00
     2012-07-10 2012-07-10 13:30:00+00:00 2012-07-10 20:00:00+00:00

    
.. code:: python

    mcal.date_range(early, frequency='1D')




.. parsed-literal::

    DatetimeIndex(['2012-07-02 20:00:00+00:00', '2012-07-03 17:00:00+00:00',
                   '2012-07-05 20:00:00+00:00', '2012-07-06 20:00:00+00:00',
                   '2012-07-09 20:00:00+00:00', '2012-07-10 20:00:00+00:00'],
                  dtype='datetime64[ns, UTC]', freq=None)



.. code:: python

    mcal.date_range(early, frequency='1H')




.. parsed-literal::

    DatetimeIndex(['2012-07-02 14:30:00+00:00', '2012-07-02 15:30:00+00:00',
                   '2012-07-02 16:30:00+00:00', '2012-07-02 17:30:00+00:00',
                   '2012-07-02 18:30:00+00:00', '2012-07-02 19:30:00+00:00',
                   '2012-07-02 20:00:00+00:00', '2012-07-03 14:30:00+00:00',
                   '2012-07-03 15:30:00+00:00', '2012-07-03 16:30:00+00:00',
                   '2012-07-03 17:00:00+00:00', '2012-07-05 14:30:00+00:00',
                   '2012-07-05 15:30:00+00:00', '2012-07-05 16:30:00+00:00',
                   '2012-07-05 17:30:00+00:00', '2012-07-05 18:30:00+00:00',
                   '2012-07-05 19:30:00+00:00', '2012-07-05 20:00:00+00:00',
                   '2012-07-06 14:30:00+00:00', '2012-07-06 15:30:00+00:00',
                   '2012-07-06 16:30:00+00:00', '2012-07-06 17:30:00+00:00',
                   '2012-07-06 18:30:00+00:00', '2012-07-06 19:30:00+00:00',
                   '2012-07-06 20:00:00+00:00', '2012-07-09 14:30:00+00:00',
                   '2012-07-09 15:30:00+00:00', '2012-07-09 16:30:00+00:00',
                   '2012-07-09 17:30:00+00:00', '2012-07-09 18:30:00+00:00',
                   '2012-07-09 19:30:00+00:00', '2012-07-09 20:00:00+00:00',
                   '2012-07-10 14:30:00+00:00', '2012-07-10 15:30:00+00:00',
                   '2012-07-10 16:30:00+00:00', '2012-07-10 17:30:00+00:00',
                   '2012-07-10 18:30:00+00:00', '2012-07-10 19:30:00+00:00',
                   '2012-07-10 20:00:00+00:00'],
                  dtype='datetime64[ns, UTC]', freq=None)

Contributing
------------
All improvements and additional (and corrections) in the form of pull requests are welcome. This package will grow in
value and correctness the more eyes are on it.

To add new functionality please include tests which are in standard pytest format. 

Use pytest to run the test suite.

Future
------
This package is open sourced under the MIT license. Everyone is welcome to add more exchanges or OTC markets, confirm
or correct the existing calendars, and generally do whatever they desire with this code.

Merger with Quantopian Trading-Calendars
========================================
Work has begun to merge this project with the Quantopian `trading-calendars <https://github.com/quantopian/trading_calendars>`_ project that it was originally forked from.
The end-state is to have one unified project that brings together the superset of all funcationality in this project
and trading-calendars, and to have one source for all market calendars.

The process of this merger will be updated in `#120 <https://github.com/rsheftel/pandas_market_calendars/issues/120>`_, everyone is welcome to comment or provide their input
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].