test_cfe_calendar.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:pandas_market_calendars 作者: rsheftel 项目源码 文件源码
def test_2016_holidays():
    # new years: jan 1
    # mlk: jan 18
    # presidents: feb 15
    # good friday: mar 25
    # mem day: may 30
    # independence day: july 4
    # labor day: sep 5
    # thanksgiving day: nov 24
    # christmas (observed): dec 26
    # new years (observed): jan 2 2017
    cfe = CFEExchangeCalendar()
    good_dates = cfe.valid_days('2016-01-01', '2016-12-31')
    for day in ["2016-01-01", "2016-01-18", "2016-02-15", "2016-03-25",
                "2016-05-30", "2016-07-04", "2016-09-05", "2016-11-24",
                "2016-12-26", "2017-01-02"]:
        assert pd.Timestamp(day, tz='UTC') not in good_dates
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号