Create trading holiday calendar with Pandas

I'm trying to create a Trading calendar using Pandas. I'm able to create a cal instance based on the USFederalHolidayCalendar. The USFederalHolidayCalendar is not consistent with the Trading...

Reading table from webpage to R

I am trying to read the webpage(http://www.cmegroup.com/trading/energy/crude-oil/west-texas-intermediate-wti-crude-oil-calendar-swap-futures_quotes_settlements_futures.html. I am using the...

Export to word by Syncfusion Essential JS 2 Grid for Angular 5

'PDF export' and 'Excel export' features are listed under the documentation for syncfusion-ej2 Grid (https://ej2.syncfusion.com/16.1.32/angular/documentation/grid/). I have already implemented...

Module not Found: zipline import

Getting the following stack trace from line: zipline/zipline/__init__.py", line 17, in <module> import numpy as np ImportError: No module named 'numpy' however, when I check pip list pip list...

Select next unique value

I am looking to copy data from a column to a column on another sheet. Sheet one has a list of ID numbers (starting at F3) next to clock in and out times. There will be anything from 5 - 31 entries...

zipline cannot be imported into environment

I have installed zipline (from Quantopian) to be able to backtest my investement strategies. However I cannot import zipline or any of its components into my Spyder IDE. If it has any bearing on...

How to print the date of the bar x bars after the selected bar?

In the interpretation window I want to print the date of the bar that follows say 10 bars after the selected bar. Let's assume I have selected Monday, the third of September 2018. Then Amibroker...

How to add custom Trading Calendar in Zipline

I'm using zipline and trying to add a custom calendar to the system so that I can apply it to our country's exchange. I've looked up on stackoverflow and found this post :...

Python Zipline Offline Testing

I want to use zipline offline without jupyter notebooks. I have tried to get zipline to ingest from quandl and use the data successfully but I haven't succeeded. Here is my environment - python...

How to fix clang 'invalid deployment target' error when installing bcolz

I want to install zipline in my Mac OS X Mojave (0.14.2 (18C54)) using Python 3.5.4, but the installation fails every time the compiler tries to install bcolz through pip install. I've already...

Python Web Scraping: Interacting with calendar

Using the following url I have managed to parse all the table content by accessing the iframe...

How to calculate the number of business days between two date columns across multiple holiday calendars quickly in pandas?

Is there a way to use vector calculations to apply multiple holiday calendars in Pandas depending on the contents in a given column? In my case, I have currency pairs with a start date and end...

Replace the last 3 business day of month data in dataframe by another

How can I replace the data of last 3 business day of month(custom calendar) of a dataframe from another? I am trying to do some data analysis for investment (trading HSI futures to be specific). ...

How to implement a 24 hour trading calendar with Zipline. Can't instantiate abstract class {} with abstract methods

I am following an online tutorial to set up zipline with a 24 hour calender and perform a backtest. I am running python 2.7. I am using spyder. I have a mac using OSX 10.11.6. I have exactly the...

How to find out how many trading days in each month in R?

I have a dataframe like this. The time span is 10 years. Because it's Chinese market data, and China has Lunar Holidays. So each year have different holiday times in terms of the western...

How to pull last nth trading day of month in XTS in R?

This question is closely related to https://stackoverflow.com/questions/13005663/pull-nth-day-of-month-in-xts-in-r, in which I got a good answer: library(xts) data(sample_matrix) x <-...

programmatically check if today is a market open trading day

What might be the simplest way to check if today the U.S. stock exchanges are open for trading? The prolonged way I am hoping to avoid is by creating routines to parse a feed with calendar info...

Python code for filling gaps for weekends and holidays in financial data when analyzing daily time series from regular calendar

I have two daily time series, one for VIX market data and one for daily sentiment. I need to align the two series by either padding the VIX data with null values for non-trading days or dropping...

Find the trading date every 2 weeks (if Saturday or Sunday, then show Friday date)

For a backtesting trading system, I need to rotation my positions every 2 weeks, BUT if the day is a Saturday or Sunday, I need to take the Friday. Semi-Monthly updates are made twice a month;...

Pull CME price data into Python 3.6.8

I am relatively new to Python so I apologize if this is a 'bush league' question. I am trying to retrieve the WTI futures prices from this...

Current working method to install zipline? tried everything

Hey im trying to install zipline on Python but nothing works I already tried it with Python 3.7 but it fails at the following libaries bcolz lru dict bottleneck cyordereddict (and zipline...

How to check where Jupyter is looking for packages

I'm not able to find a package from my notebook when I have installed it via pip / conda in my terminal. For example, I did pip install trading-calendars and conda install trading-calendars in...

Get next trading day using pandas market calendar

I would like to modify the code below so that I can get the trading days n days from now or n days ago: import pandas_market_calendars as mcal holidays = nyse.holidays() mydate =...

Exception error relating to method signature

I'm super new to JavaScript, am an editor by trade, but need to create a Google Calendar view from a Google Sheet for story assignments for my writers. I've gone through a tutorial on how to make...

Can not import Zipline with Anaconda

So I am trying to import zipline with anaconda. Though due to the fact that zipline requires python 3.5 I created an environment with python 3.5 in it. I did conda install zipline in the...

Plotting intraday only n days back

//@version=4 study("PlayGround", overlay=true) history_days = input(4, "History days") source = close*0.95 plot(source) This yields (yellow highlight added manually) I'm attempting to show...

Python Pandas Market Calendars day count (Trading day vs Calendar Days)

I am conducting some market research and one of the variables I am investigating is the distribution of time for an event to occur as a log distribution and create a cumulative probability density...

TA-lib Exception: inputs are all NaN error?

I'm trying to run a backtest using zipline and I use TA-lib for some of my technical analysis. My dataset is enormous (gigabites in size). Because I wanted my data to work in zipline, *I have a...

C# Ninjascript - NinjaTrader 8 (NT8) - Code to obtain the time and date of an event to then be displayed on chart in a textbox

Having as base the NinjaTrader 8 open source indicator Position Display Indicator which can be downloaded form the official NinjaTrader site to check the .cs...

Jupyter Notebook Cannot Connect to Kernel, Likely due to Zipline / AssertionError

All of my virtual environments work fine, except for one in which the jupyter notebook won't connect for kernel. This environment has Zipline in it, so I expect there is some dependency that is a...

Relevant tags