pandas-market-calendars 4.1.4__tar.gz → 4.2.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. pandas_market_calendars-4.2.0/NOTICE +206 -0
  2. {pandas_market_calendars-4.1.4 → pandas_market_calendars-4.2.0}/PKG-INFO +195 -183
  3. {pandas_market_calendars-4.1.4 → pandas_market_calendars-4.2.0}/README.rst +9 -1
  4. {pandas_market_calendars-4.1.4 → pandas_market_calendars-4.2.0}/pandas_market_calendars.egg-info/PKG-INFO +195 -183
  5. pandas_market_calendars-4.2.0/pandas_market_calendars.egg-info/SOURCES.txt +37 -0
  6. {pandas_market_calendars-4.1.4 → pandas_market_calendars-4.2.0}/pandas_market_calendars.egg-info/requires.txt +3 -0
  7. {pandas_market_calendars-4.1.4 → pandas_market_calendars-4.2.0}/pyproject.toml +13 -4
  8. pandas_market_calendars-4.2.0/setup.cfg +4 -0
  9. pandas_market_calendars-4.2.0/tests/test_XNYS_calendar.py +264 -0
  10. pandas_market_calendars-4.2.0/tests/test_asx_calendar.py +65 -0
  11. pandas_market_calendars-4.2.0/tests/test_bmf_calendar.py +31 -0
  12. pandas_market_calendars-4.2.0/tests/test_bse_calendar.py +40 -0
  13. pandas_market_calendars-4.2.0/tests/test_cboe_calendars.py +90 -0
  14. pandas_market_calendars-4.2.0/tests/test_class_registry.py +162 -0
  15. pandas_market_calendars-4.2.0/tests/test_cme_agriculture_calendar.py +49 -0
  16. pandas_market_calendars-4.2.0/tests/test_cme_bond_calendar.py +59 -0
  17. pandas_market_calendars-4.2.0/tests/test_cme_equity_calendar.py +54 -0
  18. pandas_market_calendars-4.2.0/tests/test_eurex_calendar.py +36 -0
  19. pandas_market_calendars-4.2.0/tests/test_exchange_calendar_cme_globex_energy_and_metals.py +146 -0
  20. pandas_market_calendars-4.2.0/tests/test_exchange_calendar_cme_globex_equities.py +368 -0
  21. pandas_market_calendars-4.2.0/tests/test_exchange_calendar_cme_globex_fixed_income.py +445 -0
  22. pandas_market_calendars-4.2.0/tests/test_exchange_calendar_cme_globex_fx.py +108 -0
  23. pandas_market_calendars-4.2.0/tests/test_hkex_calendar.py +43 -0
  24. pandas_market_calendars-4.2.0/tests/test_ice_calendar.py +51 -0
  25. pandas_market_calendars-4.2.0/tests/test_iex_calendar.py +35 -0
  26. pandas_market_calendars-4.2.0/tests/test_jpx_calendar.py +251 -0
  27. pandas_market_calendars-4.2.0/tests/test_lse_calendar.py +120 -0
  28. pandas_market_calendars-4.2.0/tests/test_market_calendar.py +1204 -0
  29. pandas_market_calendars-4.2.0/tests/test_nyse_calendar.py +394 -0
  30. pandas_market_calendars-4.2.0/tests/test_nyse_calendar_early_years.py +3806 -0
  31. pandas_market_calendars-4.2.0/tests/test_ose_calendar.py +165 -0
  32. pandas_market_calendars-4.2.0/tests/test_sifma_calendars.py +398 -0
  33. pandas_market_calendars-4.2.0/tests/test_six_calendar.py +67 -0
  34. pandas_market_calendars-4.2.0/tests/test_sse_calendar.py +45 -0
  35. pandas_market_calendars-4.2.0/tests/test_tsx_calendar.py +31 -0
  36. pandas_market_calendars-4.2.0/tests/test_utils.py +451 -0
  37. pandas_market_calendars-4.1.4/pandas_market_calendars/__init__.py +0 -37
  38. pandas_market_calendars-4.1.4/pandas_market_calendars/calendar_registry.py +0 -47
  39. pandas_market_calendars-4.1.4/pandas_market_calendars/calendar_utils.py +0 -225
  40. pandas_market_calendars-4.1.4/pandas_market_calendars/class_registry.py +0 -111
  41. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_asx.py +0 -63
  42. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_bmf.py +0 -227
  43. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_bse.py +0 -409
  44. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_cboe.py +0 -115
  45. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_cme.py +0 -240
  46. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_cme_globex_agriculture.py +0 -109
  47. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_cme_globex_base.py +0 -106
  48. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_cme_globex_energy_and_metals.py +0 -146
  49. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_cme_globex_equities.py +0 -104
  50. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_cme_globex_fixed_income.py +0 -114
  51. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_cme_globex_fx.py +0 -78
  52. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_eurex.py +0 -119
  53. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_hkex.py +0 -408
  54. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_ice.py +0 -65
  55. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_iex.py +0 -98
  56. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_jpx.py +0 -98
  57. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_lse.py +0 -91
  58. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_nyse.py +0 -1127
  59. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_ose.py +0 -150
  60. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_sifma.py +0 -300
  61. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_six.py +0 -114
  62. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_sse.py +0 -290
  63. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_tase.py +0 -195
  64. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendar_tsx.py +0 -159
  65. pandas_market_calendars-4.1.4/pandas_market_calendars/exchange_calendars_mirror.py +0 -114
  66. pandas_market_calendars-4.1.4/pandas_market_calendars/holidays_cme.py +0 -341
  67. pandas_market_calendars-4.1.4/pandas_market_calendars/holidays_cme_globex.py +0 -169
  68. pandas_market_calendars-4.1.4/pandas_market_calendars/holidays_cn.py +0 -1436
  69. pandas_market_calendars-4.1.4/pandas_market_calendars/holidays_jp.py +0 -362
  70. pandas_market_calendars-4.1.4/pandas_market_calendars/holidays_nyse.py +0 -1474
  71. pandas_market_calendars-4.1.4/pandas_market_calendars/holidays_oz.py +0 -65
  72. pandas_market_calendars-4.1.4/pandas_market_calendars/holidays_sifma.py +0 -321
  73. pandas_market_calendars-4.1.4/pandas_market_calendars/holidays_uk.py +0 -177
  74. pandas_market_calendars-4.1.4/pandas_market_calendars/holidays_us.py +0 -364
  75. pandas_market_calendars-4.1.4/pandas_market_calendars/jpx_equinox.py +0 -147
  76. pandas_market_calendars-4.1.4/pandas_market_calendars/market_calendar.py +0 -770
  77. pandas_market_calendars-4.1.4/pandas_market_calendars.egg-info/SOURCES.txt +0 -50
  78. pandas_market_calendars-4.1.4/setup.cfg +0 -15
  79. pandas_market_calendars-4.1.4/setup.py +0 -78
  80. {pandas_market_calendars-4.1.4 → pandas_market_calendars-4.2.0}/LICENSE +0 -0
  81. {pandas_market_calendars-4.1.4 → pandas_market_calendars-4.2.0}/pandas_market_calendars.egg-info/dependency_links.txt +0 -0
  82. {pandas_market_calendars-4.1.4 → pandas_market_calendars-4.2.0}/pandas_market_calendars.egg-info/top_level.txt +0 -0
@@ -0,0 +1,206 @@
1
+ The pandas_exchange_calendars package is a fork with extensive modification of the zipline package by Quantopian. The
2
+ core of this package is derived from, and in some places an exact copy of zipline. All credit goes to the creators
3
+ of zipline for an excellent package and open sourcing it under the Apache Licence v2.0 copied below.
4
+
5
+
6
+ Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction,
15
+ and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by
18
+ the copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all
21
+ other entities that control, are controlled by, or are under common
22
+ control with that entity. For the purposes of this definition,
23
+ "control" means (i) the power, direct or indirect, to cause the
24
+ direction or management of such entity, whether by contract or
25
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
26
+ outstanding shares, or (iii) beneficial ownership of such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity
29
+ exercising permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation
33
+ source, and configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical
36
+ transformation or translation of a Source form, including but
37
+ not limited to compiled object code, generated documentation,
38
+ and conversions to other media types.
39
+
40
+ "Work" shall mean the work of authorship, whether in Source or
41
+ Object form, made available under the License, as indicated by a
42
+ copyright notice that is included in or attached to the work
43
+ (an example is provided in the Appendix below).
44
+
45
+ "Derivative Works" shall mean any work, whether in Source or Object
46
+ form, that is based on (or derived from) the Work and for which the
47
+ editorial revisions, annotations, elaborations, or other modifications
48
+ represent, as a whole, an original work of authorship. For the purposes
49
+ of this License, Derivative Works shall not include works that remain
50
+ separable from, or merely link (or bind by name) to the interfaces of,
51
+ the Work and Derivative Works thereof.
52
+
53
+ "Contribution" shall mean any work of authorship, including
54
+ the original version of the Work and any modifications or additions
55
+ to that Work or Derivative Works thereof, that is intentionally
56
+ submitted to Licensor for inclusion in the Work by the copyright owner
57
+ or by an individual or Legal Entity authorized to submit on behalf of
58
+ the copyright owner. For the purposes of this definition, "submitted"
59
+ means any form of electronic, verbal, or written communication sent
60
+ to the Licensor or its representatives, including but not limited to
61
+ communication on electronic mailing lists, source code control systems,
62
+ and issue tracking systems that are managed by, or on behalf of, the
63
+ Licensor for the purpose of discussing and improving the Work, but
64
+ excluding communication that is conspicuously marked or otherwise
65
+ designated in writing by the copyright owner as "Not a Contribution."
66
+
67
+ "Contributor" shall mean Licensor and any individual or Legal Entity
68
+ on behalf of whom a Contribution has been received by Licensor and
69
+ subsequently incorporated within the Work.
70
+
71
+ 2. Grant of Copyright License. Subject to the terms and conditions of
72
+ this License, each Contributor hereby grants to You a perpetual,
73
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
74
+ copyright license to reproduce, prepare Derivative Works of,
75
+ publicly display, publicly perform, sublicense, and distribute the
76
+ Work and such Derivative Works in Source or Object form.
77
+
78
+ 3. Grant of Patent License. Subject to the terms and conditions of
79
+ this License, each Contributor hereby grants to You a perpetual,
80
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81
+ (except as stated in this section) patent license to make, have made,
82
+ use, offer to sell, sell, import, and otherwise transfer the Work,
83
+ where such license applies only to those patent claims licensable
84
+ by such Contributor that are necessarily infringed by their
85
+ Contribution(s) alone or by combination of their Contribution(s)
86
+ with the Work to which such Contribution(s) was submitted. If You
87
+ institute patent litigation against any entity (including a
88
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
89
+ or a Contribution incorporated within the Work constitutes direct
90
+ or contributory patent infringement, then any patent licenses
91
+ granted to You under this License for that Work shall terminate
92
+ as of the date such litigation is filed.
93
+
94
+ 4. Redistribution. You may reproduce and distribute copies of the
95
+ Work or Derivative Works thereof in any medium, with or without
96
+ modifications, and in Source or Object form, provided that You
97
+ meet the following conditions:
98
+
99
+ (a) You must give any other recipients of the Work or
100
+ Derivative Works a copy of this License; and
101
+
102
+ (b) You must cause any modified files to carry prominent notices
103
+ stating that You changed the files; and
104
+
105
+ (c) You must retain, in the Source form of any Derivative Works
106
+ that You distribute, all copyright, patent, trademark, and
107
+ attribution notices from the Source form of the Work,
108
+ excluding those notices that do not pertain to any part of
109
+ the Derivative Works; and
110
+
111
+ (d) If the Work includes a "NOTICE" text file as part of its
112
+ distribution, then any Derivative Works that You distribute must
113
+ include a readable copy of the attribution notices contained
114
+ within such NOTICE file, excluding those notices that do not
115
+ pertain to any part of the Derivative Works, in at least one
116
+ of the following places: within a NOTICE text file distributed
117
+ as part of the Derivative Works; within the Source form or
118
+ documentation, if provided along with the Derivative Works; or,
119
+ within a display generated by the Derivative Works, if and
120
+ wherever such third-party notices normally appear. The contents
121
+ of the NOTICE file are for informational purposes only and
122
+ do not modify the License. You may add Your own attribution
123
+ notices within Derivative Works that You distribute, alongside
124
+ or as an addendum to the NOTICE text from the Work, provided
125
+ that such additional attribution notices cannot be construed
126
+ as modifying the License.
127
+
128
+ You may add Your own copyright statement to Your modifications and
129
+ may provide additional or different license terms and conditions
130
+ for use, reproduction, or distribution of Your modifications, or
131
+ for any such Derivative Works as a whole, provided Your use,
132
+ reproduction, and distribution of the Work otherwise complies with
133
+ the conditions stated in this License.
134
+
135
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
136
+ any Contribution intentionally submitted for inclusion in the Work
137
+ by You to the Licensor shall be under the terms and conditions of
138
+ this License, without any additional terms or conditions.
139
+ Notwithstanding the above, nothing herein shall supersede or modify
140
+ the terms of any separate license agreement you may have executed
141
+ with Licensor regarding such Contributions.
142
+
143
+ 6. Trademarks. This License does not grant permission to use the trade
144
+ names, trademarks, service marks, or product names of the Licensor,
145
+ except as required for reasonable and customary use in describing the
146
+ origin of the Work and reproducing the content of the NOTICE file.
147
+
148
+ 7. Disclaimer of Warranty. Unless required by applicable law or
149
+ agreed to in writing, Licensor provides the Work (and each
150
+ Contributor provides its Contributions) on an "AS IS" BASIS,
151
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
152
+ implied, including, without limitation, any warranties or conditions
153
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
154
+ PARTICULAR PURPOSE. You are solely responsible for determining the
155
+ appropriateness of using or redistributing the Work and assume any
156
+ risks associated with Your exercise of permissions under this License.
157
+
158
+ 8. Limitation of Liability. In no event and under no legal theory,
159
+ whether in tort (including negligence), contract, or otherwise,
160
+ unless required by applicable law (such as deliberate and grossly
161
+ negligent acts) or agreed to in writing, shall any Contributor be
162
+ liable to You for damages, including any direct, indirect, special,
163
+ incidental, or consequential damages of any character arising as a
164
+ result of this License or out of the use or inability to use the
165
+ Work (including but not limited to damages for loss of goodwill,
166
+ work stoppage, computer failure or malfunction, or any and all
167
+ other commercial damages or losses), even if such Contributor
168
+ has been advised of the possibility of such damages.
169
+
170
+ 9. Accepting Warranty or Additional Liability. While redistributing
171
+ the Work or Derivative Works thereof, You may choose to offer,
172
+ and charge a fee for, acceptance of support, warranty, indemnity,
173
+ or other liability obligations and/or rights consistent with this
174
+ License. However, in accepting such obligations, You may act only
175
+ on Your own behalf and on Your sole responsibility, not on behalf
176
+ of any other Contributor, and only if You agree to indemnify,
177
+ defend, and hold each Contributor harmless for any liability
178
+ incurred by, or claims asserted against, such Contributor by reason
179
+ of your accepting any such warranty or additional liability.
180
+
181
+ END OF TERMS AND CONDITIONS
182
+
183
+ APPENDIX: How to apply the Apache License to your work.
184
+
185
+ To apply the Apache License to your work, attach the following
186
+ boilerplate notice, with the fields enclosed by brackets "[]"
187
+ replaced with your own identifying information. (Don't include
188
+ the brackets!) The text should be enclosed in the appropriate
189
+ comment syntax for the file format. We also recommend that a
190
+ file or class name and description of purpose be included on the
191
+ same "printed page" as the copyright notice for easier
192
+ identification within third-party archives.
193
+
194
+ Copyright [yyyy] [name of copyright owner]
195
+
196
+ Licensed under the Apache License, Version 2.0 (the "License");
197
+ you may not use this file except in compliance with the License.
198
+ You may obtain a copy of the License at
199
+
200
+ http://www.apache.org/licenses/LICENSE-2.0
201
+
202
+ Unless required by applicable law or agreed to in writing, software
203
+ distributed under the License is distributed on an "AS IS" BASIS,
204
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205
+ See the License for the specific language governing permissions and
206
+ limitations under the License.
@@ -1,183 +1,195 @@
1
- Metadata-Version: 2.1
2
- Name: pandas_market_calendars
3
- Version: 4.1.4
4
- Summary: Market and exchange trading calendars for pandas
5
- Home-page: https://github.com/rsheftel/pandas_market_calendars
6
- Author: Ryan Sheftel
7
- Author-email: Ryan Sheftel <rsheftel@alumni.upenn.edu>
8
- License: MIT
9
- Project-URL: Homepage, https://github.com/rsheftel/pandas_market_calendars
10
- Project-URL: Bug Tracker, https://github.com/rsheftel/pandas_market_calendars/issues
11
- Keywords: trading exchanges markets OTC datetime holiday business days
12
- Classifier: Development Status :: 5 - Production/Stable
13
- Classifier: Intended Audience :: Developers
14
- Classifier: Topic :: Software Development
15
- Classifier: License :: OSI Approved :: MIT License
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
- Classifier: Programming Language :: Python :: 3.10
19
- Requires-Python: >=3.8.0
20
- Description-Content-Type: text/x-rst
21
- License-File: LICENSE
22
-
23
- pandas_market_calendars
24
- =======================
25
- Market calendars to use with pandas for trading applications.
26
-
27
- .. image:: https://badge.fury.io/py/pandas-market-calendars.svg
28
- :target: https://badge.fury.io/py/pandas-market-calendars
29
-
30
- .. image:: https://travis-ci.com/rsheftel/pandas_market_calendars.svg?branch=master
31
- :target: https://travis-ci.com/rsheftel/pandas_market_calendars
32
-
33
- .. image:: https://coveralls.io/repos/github/rsheftel/pandas_market_calendars/badge.svg?branch=master
34
- :target: https://coveralls.io/github/rsheftel/pandas_market_calendars?branch=master
35
-
36
- .. image:: https://readthedocs.org/projects/pandas-market-calendars/badge/?version=latest
37
- :target: http://pandas-market-calendars.readthedocs.io/en/latest/?badge=latest
38
- :alt: Documentation Status
39
-
40
- Documentation
41
- -------------
42
- http://pandas_market_calendars.readthedocs.io/en/latest/
43
-
44
- Overview
45
- --------
46
- The Pandas package is widely used in finance and specifically for time series analysis. It includes excellent
47
- functionality for generating sequences of dates and capabilities for custom holiday calendars, but as an explicit
48
- design choice it does not include the actual holiday calendars for specific exchanges or OTC markets.
49
-
50
- The pandas_market_calendars package looks to fill that role with the holiday, late open and early close calendars
51
- for specific exchanges and OTC conventions. pandas_market_calendars also adds several functions to manipulate the
52
- market calendars and includes a date_range function to create a pandas DatetimeIndex including only the datetimes
53
- when the markets are open. Additionally the package contains product specific calendars for future exchanges which
54
- have different market open, closes, breaks and holidays based on product type.
55
-
56
- This package provides access to over 50+ unique exchange calendars for global equity and futures markets.
57
-
58
- This package is a fork of the Zipline package from Quantopian and extracts just the relevant parts. All credit for
59
- their excellent work to Quantopian.
60
-
61
- Major Releases
62
- ~~~~~~~~~~~~~~
63
- As of v1.0 this package only works with Python3. This is consistent with Pandas dropping support for Python2.
64
-
65
- As of v1.4 this package now has the concept of a break during the trading day. For example this can accommodate Asian
66
- markets that have a lunch break, or futures markets that are open 24 hours with a break in the day for trade processing.
67
-
68
- As of v2.0 this package provides a mirror of all the calendars from the `exchange_calendars <https://github.com/gerrymanoim/exchange_calendars>`_
69
- package, which itself is the now maintained fork of the original trading_calendars package. This adds over 50 calendars.
70
-
71
- As of v3.0, the function date_range() is more complete and consistent, for more discussion on the topic refer to PR #142 and Issue #138.
72
-
73
- As of v4.0, this package provides the framework to add interruptions to calendars. These can also be added to a schedule and viewed using
74
- the new interruptions_df property. A full list of changes can be found in PR #210.
75
-
76
- Source location
77
- ~~~~~~~~~~~~~~~
78
- Hosted on GitHub: https://github.com/rsheftel/pandas_market_calendars
79
-
80
- Installation
81
- ~~~~~~~~~~~~
82
- ``pip install pandas_market_calendars``
83
-
84
- Arch Linux package available here: https://aur.archlinux.org/packages/python-pandas_market_calendars/
85
-
86
- Calendars
87
- ---------
88
- The list of `available calendars <https://pandas-market-calendars.readthedocs.io/en/latest/calendars.html>`_
89
-
90
- Quick Start
91
- -----------
92
- .. code:: python
93
-
94
- import pandas_market_calendars as mcal
95
-
96
- # Create a calendar
97
- nyse = mcal.get_calendar('NYSE')
98
-
99
- # Show available calendars
100
- print(mcal.get_calendar_names())
101
-
102
- .. code:: python
103
-
104
- early = nyse.schedule(start_date='2012-07-01', end_date='2012-07-10')
105
- early
106
-
107
-
108
- .. parsed-literal::
109
-
110
- market_open market_close
111
- =========== ========================= =========================
112
- 2012-07-02 2012-07-02 13:30:00+00:00 2012-07-02 20:00:00+00:00
113
- 2012-07-03 2012-07-03 13:30:00+00:00 2012-07-03 17:00:00+00:00
114
- 2012-07-05 2012-07-05 13:30:00+00:00 2012-07-05 20:00:00+00:00
115
- 2012-07-06 2012-07-06 13:30:00+00:00 2012-07-06 20:00:00+00:00
116
- 2012-07-09 2012-07-09 13:30:00+00:00 2012-07-09 20:00:00+00:00
117
- 2012-07-10 2012-07-10 13:30:00+00:00 2012-07-10 20:00:00+00:00
118
-
119
-
120
- .. code:: python
121
-
122
- mcal.date_range(early, frequency='1D')
123
-
124
-
125
-
126
-
127
- .. parsed-literal::
128
-
129
- DatetimeIndex(['2012-07-02 20:00:00+00:00', '2012-07-03 17:00:00+00:00',
130
- '2012-07-05 20:00:00+00:00', '2012-07-06 20:00:00+00:00',
131
- '2012-07-09 20:00:00+00:00', '2012-07-10 20:00:00+00:00'],
132
- dtype='datetime64[ns, UTC]', freq=None)
133
-
134
-
135
-
136
- .. code:: python
137
-
138
- mcal.date_range(early, frequency='1H')
139
-
140
-
141
-
142
-
143
- .. parsed-literal::
144
-
145
- DatetimeIndex(['2012-07-02 14:30:00+00:00', '2012-07-02 15:30:00+00:00',
146
- '2012-07-02 16:30:00+00:00', '2012-07-02 17:30:00+00:00',
147
- '2012-07-02 18:30:00+00:00', '2012-07-02 19:30:00+00:00',
148
- '2012-07-02 20:00:00+00:00', '2012-07-03 14:30:00+00:00',
149
- '2012-07-03 15:30:00+00:00', '2012-07-03 16:30:00+00:00',
150
- '2012-07-03 17:00:00+00:00', '2012-07-05 14:30:00+00:00',
151
- '2012-07-05 15:30:00+00:00', '2012-07-05 16:30:00+00:00',
152
- '2012-07-05 17:30:00+00:00', '2012-07-05 18:30:00+00:00',
153
- '2012-07-05 19:30:00+00:00', '2012-07-05 20:00:00+00:00',
154
- '2012-07-06 14:30:00+00:00', '2012-07-06 15:30:00+00:00',
155
- '2012-07-06 16:30:00+00:00', '2012-07-06 17:30:00+00:00',
156
- '2012-07-06 18:30:00+00:00', '2012-07-06 19:30:00+00:00',
157
- '2012-07-06 20:00:00+00:00', '2012-07-09 14:30:00+00:00',
158
- '2012-07-09 15:30:00+00:00', '2012-07-09 16:30:00+00:00',
159
- '2012-07-09 17:30:00+00:00', '2012-07-09 18:30:00+00:00',
160
- '2012-07-09 19:30:00+00:00', '2012-07-09 20:00:00+00:00',
161
- '2012-07-10 14:30:00+00:00', '2012-07-10 15:30:00+00:00',
162
- '2012-07-10 16:30:00+00:00', '2012-07-10 17:30:00+00:00',
163
- '2012-07-10 18:30:00+00:00', '2012-07-10 19:30:00+00:00',
164
- '2012-07-10 20:00:00+00:00'],
165
- dtype='datetime64[ns, UTC]', freq=None)
166
-
167
- Contributing
168
- ------------
169
- All improvements and additional (and corrections) in the form of pull requests are welcome. This package will grow in
170
- value and correctness the more eyes are on it.
171
-
172
- To add new functionality please include tests which are in standard pytest format.
173
-
174
- Use pytest to run the test suite.
175
-
176
- For complete information on contributing see CONTRIBUTING.md_
177
-
178
- .. _CONTRIBUTING.md: https://github.com/rsheftel/pandas_market_calendars/blob/master/CONTRIBUTING.md
179
-
180
- Future
181
- ------
182
- This package is open sourced under the MIT license. Everyone is welcome to add more exchanges or OTC markets, confirm
183
- or correct the existing calendars, and generally do whatever they desire with this code.
1
+ Metadata-Version: 2.1
2
+ Name: pandas_market_calendars
3
+ Version: 4.2.0
4
+ Summary: Market and exchange trading calendars for pandas
5
+ Author-email: Ryan Sheftel <rsheftel@alumni.upenn.edu>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/rsheftel/pandas_market_calendars
8
+ Project-URL: Source, https://github.com/rsheftel/pandas_market_calendars
9
+ Project-URL: Documentation, https://pandas-market-calendars.readthedocs.io/en/latest/
10
+ Project-URL: Changelog, https://pandas-market-calendars.readthedocs.io/en/latest/change_log.html
11
+ Project-URL: Bug Tracker, https://github.com/rsheftel/pandas_market_calendars/issues
12
+ Keywords: trading,exchanges,markets,OTC,datetime,holiday,business days
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Topic :: Software Development
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/x-rst
23
+ Provides-Extra: test
24
+ License-File: LICENSE
25
+ License-File: NOTICE
26
+
27
+ pandas_market_calendars
28
+ =======================
29
+ Market calendars to use with pandas for trading applications.
30
+
31
+ .. image:: https://badge.fury.io/py/pandas-market-calendars.svg
32
+ :target: https://badge.fury.io/py/pandas-market-calendars
33
+
34
+ .. image:: https://travis-ci.com/rsheftel/pandas_market_calendars.svg?branch=master
35
+ :target: https://travis-ci.com/rsheftel/pandas_market_calendars
36
+
37
+ .. image:: https://coveralls.io/repos/github/rsheftel/pandas_market_calendars/badge.svg?branch=master
38
+ :target: https://coveralls.io/github/rsheftel/pandas_market_calendars?branch=master
39
+
40
+ .. image:: https://readthedocs.org/projects/pandas-market-calendars/badge/?version=latest
41
+ :target: http://pandas-market-calendars.readthedocs.io/en/latest/?badge=latest
42
+ :alt: Documentation Status
43
+
44
+ Documentation
45
+ -------------
46
+ http://pandas-market-calendars.readthedocs.io/en/latest/
47
+
48
+ Overview
49
+ --------
50
+ The Pandas package is widely used in finance and specifically for time series analysis. It includes excellent
51
+ functionality for generating sequences of dates and capabilities for custom holiday calendars, but as an explicit
52
+ design choice it does not include the actual holiday calendars for specific exchanges or OTC markets.
53
+
54
+ The pandas_market_calendars package looks to fill that role with the holiday, late open and early close calendars
55
+ for specific exchanges and OTC conventions. pandas_market_calendars also adds several functions to manipulate the
56
+ market calendars and includes a date_range function to create a pandas DatetimeIndex including only the datetimes
57
+ when the markets are open. Additionally the package contains product specific calendars for future exchanges which
58
+ have different market open, closes, breaks and holidays based on product type.
59
+
60
+ This package provides access to over 50+ unique exchange calendars for global equity and futures markets.
61
+
62
+ This package is a fork of the Zipline package from Quantopian and extracts just the relevant parts. All credit for
63
+ their excellent work to Quantopian.
64
+
65
+ Major Releases
66
+ ~~~~~~~~~~~~~~
67
+ As of v1.0 this package only works with Python3. This is consistent with Pandas dropping support for Python2.
68
+
69
+ As of v1.4 this package now has the concept of a break during the trading day. For example this can accommodate Asian
70
+ markets that have a lunch break, or futures markets that are open 24 hours with a break in the day for trade processing.
71
+
72
+ As of v2.0 this package provides a mirror of all the calendars from the `exchange_calendars <https://github.com/gerrymanoim/exchange_calendars>`_
73
+ package, which itself is the now maintained fork of the original trading_calendars package. This adds over 50 calendars.
74
+
75
+ As of v3.0, the function date_range() is more complete and consistent, for more discussion on the topic refer to PR #142 and Issue #138.
76
+
77
+ As of v4.0, this package provides the framework to add interruptions to calendars. These can also be added to a schedule and viewed using
78
+ the new interruptions_df property. A full list of changes can be found in PR #210.
79
+
80
+ Source location
81
+ ~~~~~~~~~~~~~~~
82
+ Hosted on GitHub: https://github.com/rsheftel/pandas_market_calendars
83
+
84
+ Installation
85
+ ~~~~~~~~~~~~
86
+ ``pip install pandas_market_calendars``
87
+
88
+ Arch Linux package available here: https://aur.archlinux.org/packages/python-pandas_market_calendars/
89
+
90
+ Calendars
91
+ ---------
92
+ The list of `available calendars <https://pandas-market-calendars.readthedocs.io/en/latest/calendars.html>`_
93
+
94
+ Quick Start
95
+ -----------
96
+ .. code:: python
97
+
98
+ import pandas_market_calendars as mcal
99
+
100
+ # Create a calendar
101
+ nyse = mcal.get_calendar('NYSE')
102
+
103
+ # Show available calendars
104
+ print(mcal.get_calendar_names())
105
+
106
+ .. code:: python
107
+
108
+ early = nyse.schedule(start_date='2012-07-01', end_date='2012-07-10')
109
+ early
110
+
111
+
112
+ .. parsed-literal::
113
+
114
+ market_open market_close
115
+ =========== ========================= =========================
116
+ 2012-07-02 2012-07-02 13:30:00+00:00 2012-07-02 20:00:00+00:00
117
+ 2012-07-03 2012-07-03 13:30:00+00:00 2012-07-03 17:00:00+00:00
118
+ 2012-07-05 2012-07-05 13:30:00+00:00 2012-07-05 20:00:00+00:00
119
+ 2012-07-06 2012-07-06 13:30:00+00:00 2012-07-06 20:00:00+00:00
120
+ 2012-07-09 2012-07-09 13:30:00+00:00 2012-07-09 20:00:00+00:00
121
+ 2012-07-10 2012-07-10 13:30:00+00:00 2012-07-10 20:00:00+00:00
122
+
123
+
124
+ .. code:: python
125
+
126
+ mcal.date_range(early, frequency='1D')
127
+
128
+
129
+
130
+
131
+ .. parsed-literal::
132
+
133
+ DatetimeIndex(['2012-07-02 20:00:00+00:00', '2012-07-03 17:00:00+00:00',
134
+ '2012-07-05 20:00:00+00:00', '2012-07-06 20:00:00+00:00',
135
+ '2012-07-09 20:00:00+00:00', '2012-07-10 20:00:00+00:00'],
136
+ dtype='datetime64[ns, UTC]', freq=None)
137
+
138
+
139
+
140
+ .. code:: python
141
+
142
+ mcal.date_range(early, frequency='1H')
143
+
144
+
145
+
146
+
147
+ .. parsed-literal::
148
+
149
+ DatetimeIndex(['2012-07-02 14:30:00+00:00', '2012-07-02 15:30:00+00:00',
150
+ '2012-07-02 16:30:00+00:00', '2012-07-02 17:30:00+00:00',
151
+ '2012-07-02 18:30:00+00:00', '2012-07-02 19:30:00+00:00',
152
+ '2012-07-02 20:00:00+00:00', '2012-07-03 14:30:00+00:00',
153
+ '2012-07-03 15:30:00+00:00', '2012-07-03 16:30:00+00:00',
154
+ '2012-07-03 17:00:00+00:00', '2012-07-05 14:30:00+00:00',
155
+ '2012-07-05 15:30:00+00:00', '2012-07-05 16:30:00+00:00',
156
+ '2012-07-05 17:30:00+00:00', '2012-07-05 18:30:00+00:00',
157
+ '2012-07-05 19:30:00+00:00', '2012-07-05 20:00:00+00:00',
158
+ '2012-07-06 14:30:00+00:00', '2012-07-06 15:30:00+00:00',
159
+ '2012-07-06 16:30:00+00:00', '2012-07-06 17:30:00+00:00',
160
+ '2012-07-06 18:30:00+00:00', '2012-07-06 19:30:00+00:00',
161
+ '2012-07-06 20:00:00+00:00', '2012-07-09 14:30:00+00:00',
162
+ '2012-07-09 15:30:00+00:00', '2012-07-09 16:30:00+00:00',
163
+ '2012-07-09 17:30:00+00:00', '2012-07-09 18:30:00+00:00',
164
+ '2012-07-09 19:30:00+00:00', '2012-07-09 20:00:00+00:00',
165
+ '2012-07-10 14:30:00+00:00', '2012-07-10 15:30:00+00:00',
166
+ '2012-07-10 16:30:00+00:00', '2012-07-10 17:30:00+00:00',
167
+ '2012-07-10 18:30:00+00:00', '2012-07-10 19:30:00+00:00',
168
+ '2012-07-10 20:00:00+00:00'],
169
+ dtype='datetime64[ns, UTC]', freq=None)
170
+
171
+ Contributing
172
+ ------------
173
+ All improvements and additional (and corrections) in the form of pull requests are welcome. This package will grow in
174
+ value and correctness the more eyes are on it.
175
+
176
+ To add new functionality please include tests which are in standard pytest format.
177
+
178
+ Use pytest to run the test suite.
179
+
180
+ For complete information on contributing see CONTRIBUTING.md_
181
+
182
+ .. _CONTRIBUTING.md: https://github.com/rsheftel/pandas_market_calendars/blob/master/CONTRIBUTING.md
183
+
184
+ Future
185
+ ------
186
+ This package is open sourced under the MIT license. Everyone is welcome to add more exchanges or OTC markets, confirm
187
+ or correct the existing calendars, and generally do whatever they desire with this code.
188
+
189
+ Sponsor
190
+ -------
191
+ .. image:: https://www.tradinghours.com/img/logo-with-words.png
192
+ :target: https://www.tradinghours.com/data
193
+ :alt: TradingHours.com
194
+
195
+ `TradingHours.com <https://www.tradinghours.com>`_ provides the most accurate and comprehensive coverage of market holidays and trading hours data available. They cover over 900 markets around the world. Their data is continually monitored for changes and updated daily. `Learn more <https://www.tradinghours.com/data>`_
@@ -17,7 +17,7 @@ Market calendars to use with pandas for trading applications.
17
17
 
18
18
  Documentation
19
19
  -------------
20
- http://pandas_market_calendars.readthedocs.io/en/latest/
20
+ http://pandas-market-calendars.readthedocs.io/en/latest/
21
21
 
22
22
  Overview
23
23
  --------
@@ -159,3 +159,11 @@ Future
159
159
  ------
160
160
  This package is open sourced under the MIT license. Everyone is welcome to add more exchanges or OTC markets, confirm
161
161
  or correct the existing calendars, and generally do whatever they desire with this code.
162
+
163
+ Sponsor
164
+ -------
165
+ .. image:: https://www.tradinghours.com/img/logo-with-words.png
166
+ :target: https://www.tradinghours.com/data
167
+ :alt: TradingHours.com
168
+
169
+ `TradingHours.com <https://www.tradinghours.com>`_ provides the most accurate and comprehensive coverage of market holidays and trading hours data available. They cover over 900 markets around the world. Their data is continually monitored for changes and updated daily. `Learn more <https://www.tradinghours.com/data>`_